diff options
-rw-r--r-- | doc/contributions.txt | 1 | ||||
-rw-r--r-- | indra/cmake/FindGoogleBreakpad.cmake | 40 | ||||
-rw-r--r-- | indra/cmake/GoogleBreakpad.cmake | 4 | ||||
-rw-r--r-- | indra/llplugin/slplugin/slplugin.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llbottomtray.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llgroupactions.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanelgroup.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanellandmarks.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 46 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.h | 2 | ||||
-rw-r--r-- | indra/newview/llsidetray.h | 16 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 4 |
12 files changed, 122 insertions, 18 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt index d8dec69269..d179c0fb8c 100644 --- a/doc/contributions.txt +++ b/doc/contributions.txt @@ -665,6 +665,7 @@ Techwolf Lupindo SNOW-681 SNOW-685 SNOW-690 + SNOW-746 VWR-12385 tenebrous pau VWR-247 diff --git a/indra/cmake/FindGoogleBreakpad.cmake b/indra/cmake/FindGoogleBreakpad.cmake new file mode 100644 index 0000000000..1a0493be5e --- /dev/null +++ b/indra/cmake/FindGoogleBreakpad.cmake @@ -0,0 +1,40 @@ +# -*- cmake -*- + +# - Find Google BreakPad +# Find the Google BreakPad includes and library +# This module defines +# BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR, where to find exception_handler.h, etc. +# BREAKPAD_EXCEPTION_HANDLER_LIBRARIES, the libraries needed to use Google BreakPad. +# BREAKPAD_EXCEPTION_HANDLER_FOUND, If false, do not try to use Google BreakPad. +# also defined, but not for general use are +# BREAKPAD_EXCEPTION_HANDLER_LIBRARY, where to find the Google BreakPad library. + +FIND_PATH(BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR google_breakpad/exception_handler.h) + +SET(BREAKPAD_EXCEPTION_HANDLER_NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} breakpad_client) +FIND_LIBRARY(BREAKPAD_EXCEPTION_HANDLER_LIBRARY + NAMES ${BREAKPAD_EXCEPTION_HANDLER_NAMES} + ) + +IF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + SET(BREAKPAD_EXCEPTION_HANDLER_LIBRARIES ${BREAKPAD_EXCEPTION_HANDLER_LIBRARY}) + SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "YES") +ELSE (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + SET(BREAKPAD_EXCEPTION_HANDLER_FOUND "NO") +ENDIF (BREAKPAD_EXCEPTION_HANDLER_LIBRARY AND BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR) + + +IF (BREAKPAD_EXCEPTION_HANDLER_FOUND) + IF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY) + MESSAGE(STATUS "Found Google BreakPad: ${BREAKPAD_EXCEPTION_HANDLER_LIBRARIES}") + ENDIF (NOT BREAKPAD_EXCEPTION_HANDLER_FIND_QUIETLY) +ELSE (BREAKPAD_EXCEPTION_HANDLER_FOUND) + IF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could not find Google BreakPad library") + ENDIF (BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED) +ENDIF (BREAKPAD_EXCEPTION_HANDLER_FOUND) + +MARK_AS_ADVANCED( + BREAKPAD_EXCEPTION_HANDLER_LIBRARY + BREAKPAD_EXCEPTION_HANDLER_INCLUDE_DIR + ) diff --git a/indra/cmake/GoogleBreakpad.cmake b/indra/cmake/GoogleBreakpad.cmake index 8270c0fabb..7498674042 100644 --- a/indra/cmake/GoogleBreakpad.cmake +++ b/indra/cmake/GoogleBreakpad.cmake @@ -2,8 +2,8 @@ include(Prebuilt) if (STANDALONE) - MESSAGE(FATAL_ERROR "*TODO standalone support for google breakad is unimplemented") - # *TODO - implement this include(FindGoogleBreakpad) + set(BREAKPAD_EXCEPTION_HANDLER_FIND_REQUIRED ON) + include(FindGoogleBreakpad) else (STANDALONE) use_prebuilt_binary(google_breakpad) if (DARWIN) diff --git a/indra/llplugin/slplugin/slplugin.cpp b/indra/llplugin/slplugin/slplugin.cpp index 7d69e1c5cd..516a58db88 100644 --- a/indra/llplugin/slplugin/slplugin.cpp +++ b/indra/llplugin/slplugin/slplugin.cpp @@ -281,7 +281,7 @@ int main(int argc, char **argv) } // Check for a change in this process's frontmost window. - if(FrontWindow() != front_window) + if(GetFrontWindowOfClass(kAllWindowClasses, true) != front_window) { ProcessSerialNumber self = { 0, kCurrentProcess }; ProcessSerialNumber parent = { 0, kNoProcess }; @@ -307,7 +307,7 @@ int main(int argc, char **argv) } } - if((FrontWindow() != NULL) && (front_window == NULL)) + if((GetFrontWindowOfClass(kAllWindowClasses, true) != NULL) && (front_window == NULL)) { // Opening the first window @@ -319,7 +319,7 @@ int main(int argc, char **argv) if(layer_group) { - SetWindowGroup(FrontWindow(), layer_group); + SetWindowGroup(GetFrontWindowOfClass(kAllWindowClasses, true), layer_group); } if(parent_is_front_process) @@ -328,9 +328,9 @@ int main(int argc, char **argv) (void) SetFrontProcess( &self ); } - ActivateWindow(FrontWindow(), true); + ActivateWindow(GetFrontWindowOfClass(kAllWindowClasses, true), true); } - else if((FrontWindow() == NULL) && (front_window != NULL)) + else if((GetFrontWindowOfClass(kAllWindowClasses, true) == NULL) && (front_window != NULL)) { // Closing the last window @@ -350,7 +350,7 @@ int main(int argc, char **argv) window_hack_state = 2; } - front_window = FrontWindow(); + front_window = GetFrontWindowOfClass(kAllWindowClasses, true); } } diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 33d006578d..ef6f2f7337 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -770,7 +770,7 @@ void LLBottomTray::loadButtonsOrder() } // Nearbychat is not stored in order settings file, but it must be the first of the panels, so moving it // manually here - mToolbarStack->movePanel(mNearbyChatBar, NULL, true); + mToolbarStack->movePanel(mChatBarContainer, NULL, true); } void LLBottomTray::onDraggableButtonMouseUp(LLUICtrl* ctrl, S32 x, S32 y) diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index c42b397252..5393678a6b 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -235,7 +235,7 @@ static bool isGroupUIVisible() { static LLPanel* panel = 0; if(!panel) - panel = LLSideTray::getInstance()->findChild<LLPanel>("panel_group_info_sidetray"); + panel = LLSideTray::getInstance()->getPanel("panel_group_info_sidetray"); if(!panel) return false; return panel->isInVisibleChain(); diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index 62ed7acb15..76b85d5bec 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -597,7 +597,7 @@ void LLPanelGroup::showNotice(const std::string& subject, //static void LLPanelGroup::refreshCreatedGroup(const LLUUID& group_id) { - LLPanelGroup* panel = LLSideTray::getInstance()->findChild<LLPanelGroup>("panel_group_info_sidetray"); + LLPanelGroup* panel = LLSideTray::getInstance()->getPanel<LLPanelGroup>("panel_group_info_sidetray"); if(!panel) return; panel->setGroupID(group_id); @@ -612,7 +612,7 @@ void LLPanelGroup::showNotice(const std::string& subject, const std::string& inventory_name, LLOfferInfo* inventory_offer) { - LLPanelGroup* panel = LLSideTray::getInstance()->findChild<LLPanelGroup>("panel_group_info_sidetray"); + LLPanelGroup* panel = LLSideTray::getInstance()->getPanel<LLPanelGroup>("panel_group_info_sidetray"); if(!panel) return; diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index b09360a2d6..c4a484d368 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -1245,7 +1245,12 @@ void LLLandmarksPanel::doProcessParcelInfo(LLLandmark* landmark, landmark->getGlobalPos(landmark_global_pos); // let's toggle pick panel into panel places - LLPanel* panel_places = LLSideTray::getInstance()->getChild<LLPanel>("panel_places");//-> sidebar_places + LLPanel* panel_places = LLSideTray::getInstance()->getPanel("panel_places");//-> sidebar_places + if (!panel_places) + { + llassert(NULL != panel_places); + return; + } panel_places->addChild(panel_pick); LLRect paren_rect(panel_places->getRect()); panel_pick->reshape(paren_rect.getWidth(),paren_rect.getHeight(), TRUE); diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 1e585ece23..31ea542743 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -182,8 +182,26 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action) void LLSidepanelInventory::onWearButtonClicked() { - performActionOnSelection("wear"); - performActionOnSelection("attach"); + LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); + if (!panel_main_inventory) + { + llassert(panel_main_inventory != NULL); + return; + } + + // Get selected items set. + const std::set<LLUUID> selected_uuids_set = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(); + if (selected_uuids_set.empty()) return; // nothing selected + + // Convert the set to a vector. + uuid_vec_t selected_uuids_vec; + for (std::set<LLUUID>::const_iterator it = selected_uuids_set.begin(); it != selected_uuids_set.end(); ++it) + { + selected_uuids_vec.push_back(*it); + } + + // Wear all selected items. + wear_multiple(selected_uuids_vec, true); } void LLSidepanelInventory::onPlayButtonClicked() @@ -286,7 +304,7 @@ void LLSidepanelInventory::updateVerbs() case LLInventoryType::IT_OBJECT: case LLInventoryType::IT_ATTACHMENT: mWearBtn->setVisible(TRUE); - mWearBtn->setEnabled(get_can_item_be_worn(item->getLinkedUUID())); + mWearBtn->setEnabled(canWearSelected()); mShopBtn->setVisible(FALSE); break; case LLInventoryType::IT_SOUND: @@ -324,6 +342,28 @@ bool LLSidepanelInventory::canShare() return LLAvatarActions::canShareSelectedItems(active_panel); } +bool LLSidepanelInventory::canWearSelected() +{ + LLPanelMainInventory* panel_main_inventory = + mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); + + if (!panel_main_inventory) + { + llassert(panel_main_inventory != NULL); + return false; + } + + std::set<LLUUID> selected_uuids = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(); + for (std::set<LLUUID>::const_iterator it = selected_uuids.begin(); + it != selected_uuids.end(); + ++it) + { + if (!get_can_item_be_worn(*it)) return false; + } + + return true; +} + LLInventoryItem *LLSidepanelInventory::getSelectedItem() { LLPanelMainInventory *panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index 4776dd7530..32c98bc034 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -65,6 +65,8 @@ protected: void performActionOnSelection(const std::string &action); void updateVerbs(); + bool canWearSelected(); // check whether selected items can be worn + // // UI Elements // diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 4e79007c13..4c23a1920b 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -109,6 +109,22 @@ public: LLPanel* getPanel (const std::string& panel_name); LLPanel* getActivePanel (); bool isPanelActive (const std::string& panel_name); + + /* + * get the panel of given type T (don't show it or do anything else with it) + */ + template <typename T> + T* getPanel(const std::string& panel_name) + { + T* panel = dynamic_cast<T*>(getPanel(panel_name)); + if (!panel) + { + llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl; + return NULL; + } + return panel; + } + /* * get currently active tab */ diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 33c74e7465..26b7e0fb6d 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6453,7 +6453,7 @@ void process_covenant_reply(LLMessageSystem* msg, void**) LLPanelLandCovenant::updateEstateOwnerName(owner_name); LLFloaterBuyLand::updateEstateOwnerName(owner_name); - LLPanelPlaceProfile* panel = LLSideTray::getInstance()->findChild<LLPanelPlaceProfile>("panel_place_profile"); + LLPanelPlaceProfile* panel = LLSideTray::getInstance()->getPanel<LLPanelPlaceProfile>("panel_place_profile"); if (panel) { panel->updateEstateName(estate_name); @@ -6587,7 +6587,7 @@ void onCovenantLoadComplete(LLVFS *vfs, LLPanelLandCovenant::updateCovenantText(covenant_text); LLFloaterBuyLand::updateCovenantText(covenant_text, asset_uuid); - LLPanelPlaceProfile* panel = LLSideTray::getInstance()->findChild<LLPanelPlaceProfile>("panel_place_profile"); + LLPanelPlaceProfile* panel = LLSideTray::getInstance()->getPanel<LLPanelPlaceProfile>("panel_place_profile"); if (panel) { panel->updateCovenantText(covenant_text); |