diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-11-02 15:39:54 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-11-02 15:39:54 -0700 |
commit | 2aa8e1d52a121fd0d641276ae2f3d890fc8b02e0 (patch) | |
tree | 54e7a465e1168c9d42685ecd08df7c3966422b08 | |
parent | 86927066473a912a8f65b03c60776a99debc70b8 (diff) | |
parent | 9d829def5bb07bde1aa14646106196ad1fd40e29 (diff) |
Merge
-rw-r--r-- | indra/media_plugins/webkit/media_plugin_webkit.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llfavoritesbar.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanelplaces.cpp | 154 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_places.xml | 4 |
4 files changed, 99 insertions, 68 deletions
diff --git a/indra/media_plugins/webkit/media_plugin_webkit.cpp b/indra/media_plugins/webkit/media_plugin_webkit.cpp index c7c66e5895..13d51099a8 100644 --- a/indra/media_plugins/webkit/media_plugin_webkit.cpp +++ b/indra/media_plugins/webkit/media_plugin_webkit.cpp @@ -383,8 +383,11 @@ private: //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() ); diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 1f269fb666..f577ef7fd0 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -1016,7 +1016,9 @@ void LLFavoritesBarCtrl::addOpenLandmarksMenuItem(LLToggleableMenu* menu) 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); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 7f8f9b29af..6d321d4716 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -82,6 +82,7 @@ static const std::string CREATE_LANDMARK_INFO_TYPE = "create_landmark"; 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 @@ -365,83 +366,104 @@ void LLPanelPlaces::onOpen(const LLSD& key) if (key.size() != 0) { - mFilterEditor->clear(); - onFilterEdit("", false); - - mPlaceInfoType = key["type"].asString(); - mPosGlobal.setZero(); - mItem = NULL; - isLandmarkEditModeOn = false; - togglePlaceInfoPanel(TRUE); - - if (mPlaceInfoType == AGENT_INFO_TYPE) + std::string key_type = key["type"].asString(); + if (key_type == LANDMARK_TAB_INFO_TYPE) { - mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT); + // 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 if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE) + else { - mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK); + mFilterEditor->clear(); + onFilterEdit("", false); - if (key.has("x") && key.has("y") && key.has("z")) + mPlaceInfoType = key_type; + mPosGlobal.setZero(); + mItem = NULL; + isLandmarkEditModeOn = false; + togglePlaceInfoPanel(TRUE); + + if (mPlaceInfoType == AGENT_INFO_TYPE) { - mPosGlobal = LLVector3d(key["x"].asReal(), - key["y"].asReal(), - key["z"].asReal()); + mPlaceProfile->setInfoType(LLPanelPlaceInfo::AGENT); } - else + else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE) { - mPosGlobal = gAgent.getPositionGlobal(); + mLandmarkInfo->setInfoType(LLPanelPlaceInfo::CREATE_LANDMARK); + + 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); } - - mLandmarkInfo->displayParcelInfo(LLUUID(), mPosGlobal); - - mSaveBtn->setEnabled(FALSE); - } - else if (mPlaceInfoType == LANDMARK_INFO_TYPE) - { - mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); - - LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); - if (!item) - return; - - setItem(item); - } - else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) - { - if (key.has("id")) + else if (mPlaceInfoType == LANDMARK_INFO_TYPE) { - LLUUID parcel_id = key["id"].asUUID(); - mPlaceProfile->setParcelID(parcel_id); + mLandmarkInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); - // query the server to get the global 3D position of this - // parcel - we need this for teleport/mapping functions. - mRemoteParcelObserver->setParcelID(parcel_id); + LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); + if (!item) + return; + + setItem(item); } - else + else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) { - mPosGlobal = LLVector3d(key["x"].asReal(), - key["y"].asReal(), - key["z"].asReal()); - mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + 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(); - mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE); - } - else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) - { - S32 index = key["id"].asInteger(); + const LLTeleportHistoryStorage::slurl_list_t& hist_items = + LLTeleportHistoryStorage::getInstance()->getItems(); - const LLTeleportHistoryStorage::slurl_list_t& hist_items = - LLTeleportHistoryStorage::getInstance()->getItems(); + mPosGlobal = hist_items[index].mGlobalPos; - mPosGlobal = hist_items[index].mGlobalPos; + mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + } - mPlaceProfile->setInfoType(LLPanelPlaceInfo::TELEPORT_HISTORY); - mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + updateVerbs(); } - - updateVerbs(); } LLViewerParcelMgr* parcel_mgr = LLViewerParcelMgr::getInstance(); @@ -942,7 +964,8 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL visible) } } else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE || - mPlaceInfoType == LANDMARK_INFO_TYPE) + mPlaceInfoType == LANDMARK_INFO_TYPE || + mPlaceInfoType == LANDMARK_TAB_INFO_TYPE) { mLandmarkInfo->setVisible(visible); @@ -960,13 +983,15 @@ void LLPanelPlaces::togglePlaceInfoPanel(BOOL 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); + } } } } @@ -1163,7 +1188,8 @@ LLPanelPlaceInfo* LLPanelPlaces::getCurrentInfoPanel() return mPlaceProfile; } else if (mPlaceInfoType == CREATE_LANDMARK_INFO_TYPE || - mPlaceInfoType == LANDMARK_INFO_TYPE) + mPlaceInfoType == LANDMARK_INFO_TYPE || + mPlaceInfoType == LANDMARK_TAB_INFO_TYPE) { return mLandmarkInfo; } diff --git a/indra/newview/skins/default/xui/en/panel_places.xml b/indra/newview/skins/default/xui/en/panel_places.xml index 5d7334f780..670aa47313 100644 --- a/indra/newview/skins/default/xui/en/panel_places.xml +++ b/indra/newview/skins/default/xui/en/panel_places.xml @@ -202,7 +202,7 @@ background_visible="true" </layout_panel> <layout_panel - follows="bottom|left|right" + follows="bottom|right" height="23" layout="bottomleft" left_pad="0" @@ -212,7 +212,7 @@ background_visible="true" auto_resize="true" width="24"> <menu_button - follows="bottom|left|right" + follows="bottom|right" height="23" image_disabled="ComboButton_UpOff" image_unselected="ComboButton_UpOff" |