Commits

leslie_linden committed 66f04e8 Merge

Merge

Comments (0)

Files changed (4)

indra/media_plugins/webkit/media_plugin_webkit.cpp

 		//lldebugs << "data url is: " << url.str() << llendl;
 
 		// loading overlay debug screen follows media debugging flag from client for now.
+#if LLQTWEBKIT_API_VERSION >= 16
 		LLQtWebKit::getInstance()->enableLoadingOverlay(mBrowserWindowId, mEnableMediaPluginDebugging);
-
+#else
+		llwarns << "Ignoring enableLoadingOverlay() call (llqtwebkit version is too old)." << llendl;
+#endif
 		str.clear();
 		str << "Loading overlay enabled = " << mEnableMediaPluginDebugging << " for mBrowserWindowId = " << mBrowserWindowId;
 		postDebugMessage( str.str() );

indra/newview/llfavoritesbar.cpp

 	LLMenuItemCallGL::Params item_params;
 	item_params.name("open_my_landmarks");
 	item_params.label(translated ? label_transl: label_untrans);
-	item_params.on_click.function(boost::bind(&LLFloaterSidePanelContainer::showPanel, "places", LLSD()));
+	LLSD key;
+	key["type"] = "open_landmark_tab";
+	item_params.on_click.function(boost::bind(&LLFloaterSidePanelContainer::showPanel, "places", key));
 	LLMenuItemCallGL* menu_item = LLUICtrlFactory::create<LLMenuItemCallGL>(item_params);
 
 	fitLabelWidth(menu_item);

indra/newview/llpanelplaces.cpp

 static const std::string LANDMARK_INFO_TYPE			= "landmark";
 static const std::string REMOTE_PLACE_INFO_TYPE		= "remote_place";
 static const std::string TELEPORT_HISTORY_INFO_TYPE	= "teleport_history";
+static const std::string LANDMARK_TAB_INFO_TYPE     = "open_landmark_tab";
 
 // Support for secondlife:///app/parcel/{UUID}/about SLapps
 class LLParcelHandler : public LLCommandHandler
 
 	if (key.size() != 0)
 	{
-		mFilterEditor->clear();
-		onFilterEdit("", false);
+		std::string key_type = key["type"].asString();
+		if (key_type == LANDMARK_TAB_INFO_TYPE)
+		{
+			// Small hack: We need to toggle twice. The first toggle moves from the Landmark 
+			// or Teleport History info panel to the Landmark or Teleport History list panel.
+			// For this first toggle, the mPlaceInfoType should be the one previously used so 
+			// that the state can be corretly set.
+			// The second toggle forces the list to be set to Landmark.
+			// This avoids extracting and duplicating all the state logic from togglePlaceInfoPanel() 
+			// here or some specific private method
+			togglePlaceInfoPanel(FALSE);
+			mPlaceInfoType = key_type;
+			togglePlaceInfoPanel(FALSE);
+			// Update the active tab
+			onTabSelected();
+			// Update the buttons at the bottom of the panel
+			updateVerbs();
+		}
+		else
+		{
+			mFilterEditor->clear();
+			onFilterEdit("", false);
 
-		mPlaceInfoType = key["type"].asString();
-		mPosGlobal.setZero();
-		mItem = NULL;
-		isLandmarkEditModeOn = false;
-		togglePlaceInfoPanel(TRUE);
+			mPlaceInfoType = key_type;
+			mPosGlobal.setZero();
+			mItem = NULL;
+			isLandmarkEditModeOn = false;
+			togglePlaceInfoPanel(TRUE);
 
-		if (mPlaceInfoType == AGENT_INFO_TYPE)
-		{
-			mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT);
-		}
-		else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
-		{
-			mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
+			if (mPlaceInfoType == AGENT_INFO_TYPE)
+			{
+				mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT);
+			}
+			else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE)
+			{
+				mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK);
 
-			if (key.has("x") && key.has("y") && key.has("z"))
+				if (key.has("x") && key.has("y") && key.has("z"))
+				{
+					mPosGlobal = LLVector3d(key["x"].asReal(),
+											key["y"].asReal(),
+											key["z"].asReal());
+				}
+				else
+				{
+					mPosGlobal = gAgent.getPositionGlobal();
+				}
+
+				mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
+
+				mSaveBtn->setEnabled(FALSE);
+			}
+			else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
 			{
-				mPosGlobal = LLVector3d(key["x"].asReal(),
-										key["y"].asReal(),
-										key["z"].asReal());
+				mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK);
+
+				LLInventoryItem* item = gInventory.getItem(key["id"].asUUID());
+				if (!item)
+					return;
+
+				setItem(item);
 			}
-			else
+			else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
 			{
-				mPosGlobal = gAgent.getPositionGlobal();
+				if (key.has("id"))
+				{
+					LLUUID parcel_id = key["id"].asUUID();
+					mPlaceProfile->setParcelID(parcel_id);
+
+					// query the server to get the global 3D position of this
+					// parcel - we need this for teleport/mapping functions.
+					mRemoteParcelObserver->setParcelID(parcel_id);
+				}
+				else
+				{
+					mPosGlobal = LLVector3d(key["x"].asReal(),
+											key["y"].asReal(),
+											key["z"].asReal());
+					mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
+				}
+
+				mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE);
 			}
+			else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE)
+			{
+				S32 index = key["id"].asInteger();
 
-			mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal);
+				const LLTeleportHistoryStorage::slurl_list_t& hist_items =
+							LLTeleportHistoryStorage::getInstance()->getItems();
 
-			mSaveBtn->setEnabled(FALSE);
-		}
-		else if (mPlaceInfoType == LANDMARK_INFO_TYPE)
-		{
-			mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK);
+				mPosGlobal = hist_items[index].mGlobalPos;
 
-			LLInventoryItem* item = gInventory.getItem(key["id"].asUUID());
-			if (!item)
-				return;
-
-			setItem(item);
-		}
-		else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE)
-		{
-			if (key.has("id"))
-			{
-				LLUUID parcel_id = key["id"].asUUID();
-				mPlaceProfile->setParcelID(parcel_id);
-
-				// query the server to get the global 3D position of this
-				// parcel - we need this for teleport/mapping functions.
-				mRemoteParcelObserver->setParcelID(parcel_id);
-			}
-			else
-			{
-				mPosGlobal = LLVector3d(key["x"].asReal(),
-										key["y"].asReal(),
-										key["z"].asReal());
+				mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
 				mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
 			}
 
-			mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE);
+			updateVerbs();
 		}
-		else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE)
-		{
-			S32 index = key["id"].asInteger();
-
-			const LLTeleportHistoryStorage::slurl_list_t& hist_items =
-						LLTeleportHistoryStorage::getInstance()->getItems();
-
-			mPosGlobal = hist_items[index].mGlobalPos;
-
-			mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY);
-			mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal);
-		}
-
-		updateVerbs();
 	}
 
 	LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance();
 		}
 	}
 	else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE ||
-			 mPlaceInfoType == LANDMARK_INFO_TYPE)
+			 mPlaceInfoType == LANDMARK_INFO_TYPE ||
+			 mPlaceInfoType == LANDMARK_TAB_INFO_TYPE)
 	{
 		mLandmarkInfo->setVisible(visible);
 
 		{
 			LLLandmarksPanel* landmarks_panel =
 					dynamic_cast<LLLandmarksPanel*>(mTabContainer->getPanelByName("Landmarks"));
-			if (landmarks_panel && mItem.notNull())
+			if (landmarks_panel)
 			{
 				// If a landmark info is being closed we open the landmarks tab
 				// and set this landmark selected.
 				mTabContainer->selectTabPanel(landmarks_panel);
-
-				landmarks_panel->setItemSelected(mItem->getUUID(), TRUE);
+				if (mItem.notNull())
+				{
+					landmarks_panel->setItemSelected(mItem->getUUID(), TRUE);
+				}
 			}
 		}
 	}
 		return mPlaceProfile;
 	}
 	else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE ||
-			 mPlaceInfoType == LANDMARK_INFO_TYPE)
+			 mPlaceInfoType == LANDMARK_INFO_TYPE ||
+			 mPlaceInfoType == LANDMARK_TAB_INFO_TYPE)
 	{
 		return mLandmarkInfo;
 	}

indra/newview/skins/default/xui/en/panel_places.xml

 					</layout_panel>
 					
 					<layout_panel
-					follows="bottom|left|right"
+					follows="bottom|right"
 					height="23"
 					layout="bottomleft"
 					left_pad="0"
 				    auto_resize="true"
 					width="24">
 						<menu_button
-				         follows="bottom|left|right"
+				         follows="bottom|right"
 				         height="23"
 						 image_disabled="ComboButton_UpOff"
 						 image_unselected="ComboButton_UpOff"