diff options
Diffstat (limited to 'indra')
23 files changed, 280 insertions, 121 deletions
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/cmake/PulseAudio.cmake b/indra/cmake/PulseAudio.cmake index f8087a8083..e918de0198 100644 --- a/indra/cmake/PulseAudio.cmake +++ b/indra/cmake/PulseAudio.cmake @@ -1,28 +1,28 @@ # -*- cmake -*- include(Prebuilt) -if (STANDALONE) - include(FindPkgConfig) +set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.") - pkg_check_modules(PULSEAUDIO REQUIRED libpulse-mainloop-glib) +if (PULSEAUDIO) + if (STANDALONE) + include(FindPkgConfig) + + pkg_check_modules(PULSEAUDIO libpulse) -elseif (LINUX) - use_prebuilt_binary(pulseaudio) - set(PULSEAUDIO_FOUND ON FORCE BOOL) - set(PULSEAUDIO_INCLUDE_DIRS - ${LIBS_PREBUILT_DIR}/include + elseif (LINUX) + use_prebuilt_binary(pulseaudio) + set(PULSEAUDIO_FOUND ON FORCE BOOL) + set(PULSEAUDIO_INCLUDE_DIRS + ${LIBS_PREBUILT_DIR}/include + ) + # We don't need to explicitly link against pulseaudio itself, because + # the viewer probes for the system's copy at runtime. + set(PULSEAUDIO_LIBRARIES + # none needed! ) - # We don't need to explicitly link against pulseaudio itself, because - # the viewer probes for the system's copy at runtime. - set(PULSEAUDIO_LIBRARIES - # none needed! - ) -endif (STANDALONE) + endif (STANDALONE) +endif (PULSEAUDIO) if (PULSEAUDIO_FOUND) - set(PULSEAUDIO ON CACHE BOOL "Build with PulseAudio support, if available.") -endif (PULSEAUDIO_FOUND) - -if (PULSEAUDIO) add_definitions(-DLL_PULSEAUDIO_ENABLED=1) -endif (PULSEAUDIO) +endif (PULSEAUDIO_FOUND) 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/media_plugins/webkit/CMakeLists.txt b/indra/media_plugins/webkit/CMakeLists.txt index 619b4baeef..57478ddf27 100644 --- a/indra/media_plugins/webkit/CMakeLists.txt +++ b/indra/media_plugins/webkit/CMakeLists.txt @@ -53,6 +53,8 @@ set(media_plugin_webkit_LINK_LIBRARIES if (LINUX) if (PULSEAUDIO_FOUND) list(APPEND media_plugin_webkit_SOURCE_FILES linux_volume_catcher.cpp) + else (PULSEAUDIO_FOUND) + list(APPEND media_plugin_webkit_SOURCE_FILES dummy_volume_catcher.cpp) endif (PULSEAUDIO_FOUND) list(APPEND media_plugin_webkit_LINK_LIBRARIES ${UI_LIBRARIES} # for glib/GTK @@ -67,9 +69,6 @@ elseif (DARWIN) ) elseif (WINDOWS) list(APPEND media_plugin_webkit_SOURCE_FILES windows_volume_catcher.cpp) -else (LINUX) - # All other platforms use the dummy volume catcher for now. - list(APPEND media_plugin_webkit_SOURCE_FILES dummy_volume_catcher.cpp) endif (LINUX) set_source_files_properties(${media_plugin_webkit_HEADER_FILES} diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 00c2e9faba..066b4d8bc3 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -49,6 +49,7 @@ #include "llfloaterpay.h" #include "llfloaterworldmap.h" #include "llgiveinventory.h" +#include "llinventorybridge.h" #include "llinventorymodel.h" // for gInventory.findCategoryUUIDForType #include "llinventorypanel.h" #include "llimview.h" // for gIMMgr @@ -435,17 +436,27 @@ namespace action_give_inventory } /** - * Checks My Inventory visibility. + * @return active inventory panel, or NULL if there's no such panel */ - static bool is_give_inventory_acceptable() + static LLInventoryPanel* get_active_inventory_panel() { LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); if (!active_panel) { active_panel = get_outfit_editor_inventory_panel(); - if (!active_panel) return false; } + return active_panel; + } + + /** + * Checks My Inventory visibility. + */ + static bool is_give_inventory_acceptable() + { + LLInventoryPanel* active_panel = get_active_inventory_panel(); + if (!active_panel) return false; + // check selection in the panel const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); if (inventory_selected_uuids.empty()) return false; // nothing selected @@ -536,12 +547,8 @@ namespace action_give_inventory return; } - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - if (!active_panel) - { - active_panel = get_outfit_editor_inventory_panel(); - if (!active_panel) return; - } + LLInventoryPanel* active_panel = get_active_inventory_panel(); + if (!active_panel) return; const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); if (inventory_selected_uuids.empty()) @@ -624,12 +631,8 @@ namespace action_give_inventory { llassert(avatar_names.size() == avatar_uuids.size()); - LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); - if (!active_panel) - { - active_panel = get_outfit_editor_inventory_panel(); - if (!active_panel) return; - } + LLInventoryPanel* active_panel = get_active_inventory_panel(); + if (!active_panel) return; const uuid_set_t inventory_selected_uuids = active_panel->getRootFolder()->getSelectionList(); if (inventory_selected_uuids.empty()) @@ -664,6 +667,53 @@ void LLAvatarActions::shareWithAvatars() LLNotificationsUtil::add("ShareNotification"); } + +// static +bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NULL*/) +{ + using namespace action_give_inventory; + + if (!inv_panel) + { + LLInventoryPanel* active_panel = get_active_inventory_panel(); + if (!active_panel) return false; + inv_panel = active_panel; + } + + // check selection in the panel + LLFolderView* root_folder = inv_panel->getRootFolder(); + const uuid_set_t inventory_selected_uuids = root_folder->getSelectionList(); + if (inventory_selected_uuids.empty()) return false; // nothing selected + + bool can_share = true; + uuid_set_t::const_iterator it = inventory_selected_uuids.begin(); + const uuid_set_t::const_iterator it_end = inventory_selected_uuids.end(); + for (; it != it_end; ++it) + { + LLViewerInventoryCategory* inv_cat = gInventory.getCategory(*it); + // any category can be offered. + if (inv_cat) + { + continue; + } + + // check if inventory item can be given + LLFolderViewItem* item = root_folder->getItemByID(*it); + if (!item) return false; + LLInvFVBridge* bridge = dynamic_cast<LLInvFVBridge*>(item->getListener()); + if (bridge && bridge->canShare()) + { + continue; + } + + // there are neither item nor category in inventory + can_share = false; + break; + } + + return can_share; +} + // static void LLAvatarActions::toggleBlock(const LLUUID& id) { diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 9cfdc884dc..2db2918eed 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -34,6 +34,8 @@ #include <string> #include <vector> +class LLInventoryPanel; + /** * Friend-related actions (add, remove, offer teleport, etc) */ @@ -183,6 +185,15 @@ public: */ static bool canOfferTeleport(const uuid_vec_t& ids); + /** + * Checks whether all items selected in the given inventory panel can be shared + * + * @param inv_panel Inventory panel to get selection from. If NULL, the active inventory panel is used. + * + * @return false if the selected items cannot be shared or the active inventory panel cannot be obtained + */ + static bool canShareSelectedItems(LLInventoryPanel* inv_panel = NULL); + private: static bool callbackAddFriendWithMessage(const LLSD& notification, const LLSD& response); static bool handleRemove(const LLSD& notification, const LLSD& response); 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/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index dd1f92a25c..3981b887ad 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -290,20 +290,6 @@ public: return TRUE; } - void setVisible(BOOL b) - { - // Overflow menu shouldn't hide when it still has focus. See EXT-4217. - if (!b && hasFocus()) - return; - LLToggleableMenu::setVisible(b); - setFocus(b); - } - - void onFocusLost() - { - setVisible(FALSE); - } - protected: LLFavoriteLandmarkToggleableMenu(const LLToggleableMenu::Params& p): LLToggleableMenu(p) @@ -790,7 +776,6 @@ void LLFavoritesBarCtrl::updateButtons() LLToggleableMenu* overflow_menu = static_cast <LLToggleableMenu*> (mPopupMenuHandle.get()); if (overflow_menu && overflow_menu->getVisible()) { - overflow_menu->setFocus(FALSE); overflow_menu->setVisible(FALSE); if (mUpdateDropDownItems) showDropDownMenu(); @@ -911,8 +896,6 @@ void LLFavoritesBarCtrl::showDropDownMenu() if (menu) { - // Release focus to allow changing of visibility. - menu->setFocus(FALSE); if (!menu->toggleVisibility()) return; @@ -1093,6 +1076,14 @@ void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) { gInventory.removeItem(mSelectedItemID); } + + // Pop-up the overflow menu again (it gets hidden whenever the user clicks a context menu item). + // See EXT-4217 and STORM-207. + LLToggleableMenu* menu = (LLToggleableMenu*) mPopupMenuHandle.get(); + if (menu && !menu->getVisible()) + { + showDropDownMenu(); + } } BOOL LLFavoritesBarCtrl::isClipboardPasteable() const 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/llimview.cpp b/indra/newview/llimview.cpp index aaedfddc9b..5dd03783ad 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -504,6 +504,11 @@ LLIMModel::LLIMSession* LLIMModel::findAdHocIMSession(const uuid_vec_t& ids) return NULL; } +bool LLIMModel::LLIMSession::isOutgoingAdHoc() +{ + return IM_SESSION_CONFERENCE_START == mType; +} + bool LLIMModel::LLIMSession::isAdHoc() { return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID)); @@ -1052,24 +1057,25 @@ void LLIMModel::sendMessage(const std::string& utf8_text, // to Recent People to prevent showing of an item with (???)(???). See EXT-8246. // Concrete participants will be added into this list once they sent message in chat. if (IM_SESSION_INVITE == dialog) return; - // Add only online members to recent (EXT-8658) - LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); - LLSpeakerMgr::speaker_list_t speaker_list; - if(speaker_mgr != NULL) - { - speaker_mgr->getSpeakerList(&speaker_list, true); - } - for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) - { - const LLPointer<LLSpeaker>& speakerp = *it; - - LLRecentPeople::instance().add(speakerp->mID); - } + addSpeakersToRecent(im_session_id); } } +} - +void LLIMModel::addSpeakersToRecent(const LLUUID& im_session_id) +{ + LLIMSpeakerMgr* speaker_mgr = LLIMModel::getInstance()->getSpeakerManager(im_session_id); + LLSpeakerMgr::speaker_list_t speaker_list; + if(speaker_mgr != NULL) + { + speaker_mgr->getSpeakerList(&speaker_list, true); + } + for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) + { + const LLPointer<LLSpeaker>& speakerp = *it; + LLRecentPeople::instance().add(speakerp->mID); + } } void session_starter_helper( diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index fb68d919b6..3da4465862 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -84,6 +84,7 @@ public: /** @deprecated */ static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); + bool isOutgoingAdHoc(); bool isAdHoc(); bool isP2P(); bool isOtherParticipantAvaline(); @@ -275,6 +276,9 @@ public: static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id, const LLUUID& other_participant_id, EInstantMessage dialog); + // Adds people from speakers list (people with whom you are currently speaking) to the Recent People List + static void addSpeakersToRecent(const LLUUID& im_session_id); + void testMessages(); /** 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 23e96c22fa..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: @@ -311,18 +329,39 @@ bool LLSidepanelInventory::canShare() LLPanelMainInventory* panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); - LLFolderView* root_folder = - panel_main_inventory->getActivePanel()->getRootFolder(); + if (!panel_main_inventory) + { + llwarns << "Failed to get the main inventory panel" << llendl; + return false; + } + + LLInventoryPanel* active_panel = panel_main_inventory->getActivePanel(); + // Avoid flicker in the Recent tab while inventory is being loaded. + if (!active_panel->getRootFolder()->hasVisibleChildren()) return false; + + return LLAvatarActions::canShareSelectedItems(active_panel); +} - LLFolderViewItem* current_item = root_folder->hasVisibleChildren() - ? root_folder->getCurSelectedItem() - : NULL; +bool LLSidepanelInventory::canWearSelected() +{ + LLPanelMainInventory* panel_main_inventory = + mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); - LLInvFVBridge* bridge = current_item - ? dynamic_cast <LLInvFVBridge*> (current_item->getListener()) - : NULL; + 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 bridge ? bridge->canShare() : false; + return true; } LLInventoryItem *LLSidepanelInventory::getSelectedItem() 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/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index c3e4775fe1..e9fc25404a 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -217,8 +217,6 @@ BOOL LLStatusBar::postBuild() mSGPacketLoss->mPerSec = FALSE; addChild(mSGPacketLoss); - getChild<LLTextBox>("stat_btn")->setClickedCallback(onClickStatGraph); - mPanelVolumePulldown = new LLPanelVolumePulldown(); addChild(mPanelVolumePulldown); mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); @@ -516,12 +514,6 @@ void LLStatusBar::onClickMediaToggle(void* data) LLViewerMedia::setAllMediaEnabled(enable); } -// static -void LLStatusBar::onClickStatGraph(void* data) -{ - LLFloaterReg::showInstance("lagmeter"); -} - BOOL can_afford_transaction(S32 cost) { return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost))); diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 8840db2c4a..2388aeb0c8 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -92,7 +92,6 @@ private: void onMouseEnterVolume(); void onMouseEnterNearbyMedia(); void onClickScreen(S32 x, S32 y); - static void onClickStatGraph(void* data); static void onClickMediaToggle(void* data); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d6455d360c..9b1f2e67c6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6714,7 +6714,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); @@ -6848,7 +6848,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); diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index a4efacdca9..8738ad7687 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6226,9 +6226,9 @@ void LLVOAvatar::updateMeshTextures() // use the last-known good baked texture until it finish the first // render of the new layerset. - const BOOL layerset_invalid = !mBakedTextureDatas[i].mTexLayerSet - || !mBakedTextureDatas[i].mTexLayerSet->getComposite()->isInitialized() - || !mBakedTextureDatas[i].mTexLayerSet->isLocalTextureDataAvailable(); + const BOOL layerset_invalid = mBakedTextureDatas[i].mTexLayerSet + && ( !mBakedTextureDatas[i].mTexLayerSet->getComposite()->isInitialized() + || !mBakedTextureDatas[i].mTexLayerSet->isLocalTextureDataAvailable() ); use_lkg_baked_layer[i] = (!is_layer_baked[i] && (mBakedTextureDatas[i].mLastTextureIndex != IMG_DEFAULT_AVATAR) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index 9e3d61ae44..b692093fb9 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -497,14 +497,28 @@ void LLVoiceChannelGroup::activate() mURI, mCredentials); -#if 0 // *TODO if (!gAgent.isInGroup(mSessionID)) // ad-hoc channel { - // Add the party to the list of people with which we've recently interacted. - for (/*people in the chat*/) - LLRecentPeople::instance().add(buddy_id); + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(mSessionID); + // Adding ad-hoc call participants to Recent People List. + // If it's an outgoing ad-hoc, we can use mInitialTargetIDs that holds IDs of people we + // called(both online and offline) as source to get people for recent (STORM-210). + if (session->isOutgoingAdHoc()) + { + for (uuid_vec_t::iterator it = session->mInitialTargetIDs.begin(); + it!=session->mInitialTargetIDs.end();++it) + { + const LLUUID id = *it; + LLRecentPeople::instance().add(id); + } + } + // If this ad-hoc is incoming then trying to get ids of people from mInitialTargetIDs + // would lead to EXT-8246. So in this case we get them from speakers list. + else + { + LLIMModel::addSpeakersToRecent(mSessionID); + } } -#endif //Mic default state is OFF on initiating/joining Ad-Hoc/Group calls if (LLVoiceClient::getInstance()->getUserPTTState() && LLVoiceClient::getInstance()->getPTTIsToggle()) diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml index 4ccd7b3629..2f52ca660b 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -118,13 +118,4 @@ name="volume_btn" tool_tip="Global Volume Control" width="16" /> - <text - follows="right|top" - halign="center" - height="12" - layout="topleft" - left_delta="0" - name="stat_btn" - top_delta="0" - width="20"/> </panel> |