diff options
author | richard <none@none> | 2009-11-13 18:28:20 -0800 |
---|---|---|
committer | richard <none@none> | 2009-11-13 18:28:20 -0800 |
commit | 4c4f329acb7792e4713b7e38bd437b9a7d239ec5 (patch) | |
tree | cf15c27f8e66a3dfc95644a8673dead729e040d8 /indra/newview | |
parent | 890da1d3914ffb52d0899c333fe8b8c280fe4d34 (diff) | |
parent | f4fdaa8ee9d8016ca23957e78fe246206579723f (diff) |
merge
Diffstat (limited to 'indra/newview')
52 files changed, 1410 insertions, 839 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 8d57c68cf2..fd711b72b0 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -52,6 +52,7 @@ LLBottomTray::LLBottomTray(const LLSD&) mNearbyChatBar(NULL), mToolbarStack(NULL) , mMovementButton(NULL) +, mResizeState(RS_NORESIZE) // Add more members { mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); @@ -261,22 +262,22 @@ void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask) void LLBottomTray::showGestureButton(BOOL visible) { - showTrayButton(RS_BUTTON_GESTURES, visible); + setTrayButtonVisibleIfPossible(RS_BUTTON_GESTURES, visible); } void LLBottomTray::showMoveButton(BOOL visible) { - showTrayButton(RS_BUTTON_MOVEMENT, visible); + setTrayButtonVisibleIfPossible(RS_BUTTON_MOVEMENT, visible); } void LLBottomTray::showCameraButton(BOOL visible) { - showTrayButton(RS_BUTTON_CAMERA, visible); + setTrayButtonVisibleIfPossible(RS_BUTTON_CAMERA, visible); } void LLBottomTray::showSnapshotButton(BOOL visible) { - showTrayButton(RS_BUTTON_SNAPSHOT, visible); + setTrayButtonVisibleIfPossible(RS_BUTTON_SNAPSHOT, visible); } namespace @@ -367,74 +368,87 @@ void LLBottomTray::verifyChildControlsSizes() mNearbyChatBar->setRect(rect); } } -#define __FEATURE_EXT_991 + void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) { - lldebugs << "****************************************" << llendl; + static S32 debug_calling_number = 0; + lldebugs << "**************************************** " << ++debug_calling_number << llendl; S32 current_width = getRect().getWidth(); + S32 delta_width = width - current_width; lldebugs << "Reshaping: " << ", width: " << width - << ", height: " << height - << ", called_from_parent: " << called_from_parent << ", cur width: " << current_width - << ", cur height: " << getRect().getHeight() + << ", delta_width: " << delta_width + << ", called_from_parent: " << called_from_parent << llendl; if (mNearbyChatBar) log(mNearbyChatBar, "before"); if (mChicletPanel) log(mChicletPanel, "before"); + // stores width size on which bottom tray is less than width required by its children. EXT-991 + static S32 extra_shrink_width = 0; + bool should_be_reshaped = true; + if (mChicletPanel && mToolbarStack && mNearbyChatBar) { mToolbarStack->updatePanelAutoResize(PANEL_CHICLET_NAME, TRUE); verifyChildControlsSizes(); - updateResizeState(width, current_width); - } - - LLPanel::reshape(width, height, called_from_parent); - - - if (mNearbyChatBar) log(mNearbyChatBar, "after"); - if (mChicletPanel) log(mChicletPanel, "after"); -} - -void LLBottomTray::updateResizeState(S32 new_width, S32 cur_width) -{ - mResizeState = RS_NORESIZE; - - S32 delta_width = new_width - cur_width; -// if (delta_width == 0) return; - bool shrink = new_width < cur_width; - - const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); - const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); - const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); - const S32 chatbar_panel_max_width = mNearbyChatBar->getMaxWidth(); - - lldebugs << "chatbar_panel_width: " << chatbar_panel_width - << ", chatbar_panel_min_width: " << chatbar_panel_min_width - << ", chatbar_panel_max_width: " << chatbar_panel_max_width - << ", chiclet_panel_width: " << chiclet_panel_width - << ", chiclet_panel_min_width: " << chiclet_panel_min_width - << llendl; + // bottom tray is narrowed + if (delta_width < 0) + { + if (extra_shrink_width > 0) + { + // is world rect was extra shrunk and decreasing again only update this value + // to delta_width negative + extra_shrink_width -= delta_width; // use "-=" because delta_width is negative + should_be_reshaped = false; + } + else + { + extra_shrink_width = processWidthDecreased(delta_width); - // bottom tray is narrowed - if (shrink) - { - processWidthDecreased(delta_width); + // increase new width to extra_shrink_width value to not reshape less than bottom tray minimum + width += extra_shrink_width; + } + } + // bottom tray is widen + else + { + if (extra_shrink_width > delta_width) + { + // Less than minimum width is more than increasing (delta_width) + // only reduce it value and make no reshape + extra_shrink_width -= delta_width; + should_be_reshaped = false; + } + else + { + if (extra_shrink_width > 0) + { + // If we have some extra shrink width let's reduce delta_width & width + delta_width -= extra_shrink_width; + width -= extra_shrink_width; + extra_shrink_width = 0; + } + processWidthIncreased(delta_width); + } + } } - // bottom tray is widen - else + + lldebugs << "There is no enough width to reshape all children: " << extra_shrink_width << llendl; + if (should_be_reshaped) { - processWidthIncreased(delta_width); + lldebugs << "Reshape all children with width: " << width << llendl; + LLPanel::reshape(width, height, called_from_parent); } - lldebugs << "New resize state: " << mResizeState << llendl; + if (mNearbyChatBar) log(mNearbyChatBar, "after"); + if (mChicletPanel) log(mChicletPanel, "after"); } -void LLBottomTray::processWidthDecreased(S32 delta_width) +S32 LLBottomTray::processWidthDecreased(S32 delta_width) { bool still_should_be_processed = true; @@ -445,7 +459,6 @@ void LLBottomTray::processWidthDecreased(S32 delta_width) { // we have some space to decrease chiclet panel S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width; - mResizeState |= RS_CHICLET_PANEL; S32 delta_panel = llmin(-delta_width, panel_delta_min); @@ -473,27 +486,25 @@ void LLBottomTray::processWidthDecreased(S32 delta_width) { // we have some space to decrease chatbar panel S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width; - mResizeState |= RS_CHATBAR_INPUT; S32 delta_panel = llmin(-delta_width, panel_delta_min); - // is chatbar panel width enough to process resizing? + // whether chatbar panel width is enough to process resizing? delta_width += panel_delta_min; - still_should_be_processed = delta_width < 0; mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight()); + log(mChicletPanel, "after processing panel decreasing via nearby chatbar panel"); + lldebugs << "RS_CHATBAR_INPUT" << ", delta_panel: " << delta_panel << ", delta_width: " << delta_width << llendl; - - log(mChicletPanel, "after nearby was processed"); - } + S32 extra_shrink_width = 0; S32 buttons_freed_width = 0; if (still_should_be_processed) { @@ -516,7 +527,9 @@ void LLBottomTray::processWidthDecreased(S32 delta_width) if (delta_width < 0) { - llwarns << "WARNING: there is no enough room for bottom tray, resizing still should be processed" << llendl; + extra_shrink_width = -delta_width; + lldebugs << "There is no enough room for bottom tray, resizing still should be processed: " + << extra_shrink_width << llendl; } if (buttons_freed_width > 0) @@ -527,10 +540,14 @@ void LLBottomTray::processWidthDecreased(S32 delta_width) lldebugs << buttons_freed_width << llendl; } } + + return extra_shrink_width; } void LLBottomTray::processWidthIncreased(S32 delta_width) { + if (delta_width <= 0) return; + const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); @@ -609,7 +626,6 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) S32 chatbar_panel_width_ = mNearbyChatBar->getRect().getWidth(); if (delta_width > 0 && chatbar_panel_width_ < chatbar_panel_max_width) { - mResizeState |= RS_CHATBAR_INPUT; S32 delta_panel_max = chatbar_panel_max_width - chatbar_panel_width_; S32 delta_panel = llmin(delta_width, delta_panel_max); delta_width -= delta_panel_max; @@ -625,7 +641,7 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa lldebugs << "There is no object to process for state: " << shown_object_type << llendl; return false; } - bool can_be_shown = canButtonBeShown(panel); + bool can_be_shown = canButtonBeShown(shown_object_type); if (can_be_shown) { //validate if we have enough room to show this button @@ -636,22 +652,23 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa *available_width -= required_width; *buttons_required_width += required_width; - showTrayButton(shown_object_type, true); + setTrayButtonVisible(shown_object_type, true); lldebugs << "processing object type: " << shown_object_type << ", buttons_required_width: " << *buttons_required_width << llendl; + mResizeState &= ~shown_object_type; } } return can_be_shown; } -void LLBottomTray::processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width) +void LLBottomTray::processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width) { - LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; + LLPanel* panel = mStateProcessedObjectMap[processed_object_type]; if (NULL == panel) { - lldebugs << "There is no object to process for state: " << shown_object_type << llendl; + lldebugs << "There is no object to process for state: " << processed_object_type << llendl; return; } @@ -664,20 +681,41 @@ void LLBottomTray::processHideButton(EResizeState shown_object_type, S32* requir *buttons_freed_width += *required_width; } - showTrayButton(shown_object_type, false); + setTrayButtonVisible(processed_object_type, false); + + mResizeState |= processed_object_type; - lldebugs << "processing object type: " << shown_object_type + lldebugs << "processing object type: " << processed_object_type << ", buttons_freed_width: " << *buttons_freed_width << llendl; } } -bool LLBottomTray::canButtonBeShown(LLPanel* panel) const +bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const { - bool can_be_shown = !panel->getVisible(); + bool can_be_shown = mResizeState & processed_object_type; if (can_be_shown) { - // *TODO: mantipov: synchronize with situation when button was hidden via context menu; + static MASK MOVEMENT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES; + static MASK CAMERA_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT; + static MASK SNAPSHOT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT | RS_BUTTON_CAMERA; + + switch(processed_object_type) + { + case RS_BUTTON_GESTURES: // Gestures should be shown first + break; + case RS_BUTTON_MOVEMENT: // Move only if gesture is shown + can_be_shown = !(MOVEMENT_PREVIOUS_BUTTONS_MASK & mResizeState); + break; + case RS_BUTTON_CAMERA: + can_be_shown = !(CAMERA_PREVIOUS_BUTTONS_MASK & mResizeState); + break; + case RS_BUTTON_SNAPSHOT: + can_be_shown = !(SNAPSHOT_PREVIOUS_BUTTONS_MASK & mResizeState); + break; + default: // nothing to do here + break; + } } return can_be_shown; } @@ -690,7 +728,7 @@ void LLBottomTray::initStateProcessedObjectMap() mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); } -void LLBottomTray::showTrayButton(EResizeState shown_object_type, bool visible) +void LLBottomTray::setTrayButtonVisible(EResizeState shown_object_type, bool visible) { LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; if (NULL == panel) @@ -701,4 +739,49 @@ void LLBottomTray::showTrayButton(EResizeState shown_object_type, bool visible) panel->setVisible(visible); } + +void LLBottomTray::setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible) +{ + bool can_be_set = true; + + if (visible) + { + LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; + if (NULL == panel) + { + lldebugs << "There is no object to process for state: " << shown_object_type << llendl; + return; + } + + const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); + const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); + + const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); + const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); + + const S32 available_width = (chatbar_panel_width - chatbar_panel_min_width) + + (chiclet_panel_width - chiclet_panel_min_width); + + const S32 required_width = panel->getRect().getWidth(); + can_be_set = available_width >= required_width; + } + + if (can_be_set) + { + setTrayButtonVisible(shown_object_type, visible); + + // if we hide the button mark it NOT to show while future bottom tray extending + if (!visible) + { + mResizeState &= ~shown_object_type; + } + } + else + { + // mark this button to show it while future bottom tray extending + mResizeState |= shown_object_type; + LLNotifications::instance().add("BottomTrayButtonCanNotBeShown"); + } +} + //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 3847168ae1..974289d5e0 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -103,14 +103,39 @@ private: void updateResizeState(S32 new_width, S32 cur_width); void verifyChildControlsSizes(); - void processWidthDecreased(S32 delta_width); + S32 processWidthDecreased(S32 delta_width); void processWidthIncreased(S32 delta_width); void log(LLView* panel, const std::string& descr); bool processShowButton(EResizeState shown_object_type, S32* available_width, S32* buttons_required_width); - void processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width); - bool canButtonBeShown(LLPanel* panel) const; + void processHideButton(EResizeState processed_object_type, S32* required_width, S32* buttons_freed_width); + + /** + * Determines if specified by type object can be shown. It should be hidden by shrink before. + * + * Processes buttons a such way to show buttons in constant order: + * - Gestures, Move, View, Snapshot + */ + bool canButtonBeShown(EResizeState processed_object_type) const; void initStateProcessedObjectMap(); - void showTrayButton(EResizeState shown_object_type, bool visible); + + /** + * Sets passed visibility to object specified by resize type. + */ + void setTrayButtonVisible(EResizeState shown_object_type, bool visible); + + /** + * Sets passed visibility to object specified by resize type if it is possible. + * + * If it is impossible to show required button due to there is no enough room in bottom tray + * it will no be shown. Is called via context menu commands. + * In this case Alert Dialog will be shown to notify user about that. + * + * Method also stores resize state to be processed while future bottom tray extending: + * - if hidden while resizing button should be hidden it will not be shown while extending; + * - if hidden via context menu button should be shown but there is no enough room for now + * it will be shown while extending. + */ + void setTrayButtonVisibleIfPossible(EResizeState shown_object_type, bool visible); MASK mResizeState; diff --git a/indra/newview/llchatbar.cpp b/indra/newview/llchatbar.cpp index 4523267edd..442dc660cd 100644 --- a/indra/newview/llchatbar.cpp +++ b/indra/newview/llchatbar.cpp @@ -210,8 +210,9 @@ void LLChatBar::refreshGestures() // collect list of unique gestures std::map <std::string, BOOL> unique; - LLGestureManager::item_map_t::iterator it; - for (it = LLGestureManager::instance().mActive.begin(); it != LLGestureManager::instance().mActive.end(); ++it) + LLGestureManager::item_map_t::const_iterator it; + const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures(); + for (it = active_gestures.begin(); it != active_gestures.end(); ++it) { LLMultiGesture* gesture = (*it).second; if (gesture) diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 0070e654ee..028bb7a384 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -53,7 +53,7 @@ std::string formatCurrentTime() time_t utc_time; utc_time = time_corrected(); std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" - +LLTrans::getString("TimeMin")+"] "; + +LLTrans::getString("TimeMin")+"]"; LLSD substitution; @@ -84,6 +84,10 @@ public: if (level == "profile") { + LLSD params; + params["object_id"] = getAvatarId(); + + LLFloaterReg::showInstance("inspect_object", params); } else if (level == "block") { @@ -344,7 +348,9 @@ LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style void LLChatHistory::appendWidgetMessage(const LLChat& chat) { LLView* view = NULL; - std::string view_text = "\n[" + formatCurrentTime() + "] " + chat.mFromName + ": "; + std::string view_text = "\n[" + formatCurrentTime() + "] "; + if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM) + view_text += chat.mFromName + ": "; LLInlineViewSegment::Params p; diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index fd86192650..9e290c8c04 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -838,11 +838,15 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ LLUUID session_id = data["session_id"].asUUID(); LLUUID from_id = data["from_id"].asUUID(); const std::string from = data["from"].asString(); + S32 unread = data["num_unread"].asInteger(); - //we do not show balloon (indicator of new messages) for system messages and our own messages - if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return; + // if new message came + if(unread != 0) + { + //we do not show balloon (indicator of new messages) for system messages and our own messages + if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return; + } - S32 unread = data["num_unread"].asInteger(); LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); if (im_floater && im_floater->getVisible()) { @@ -862,7 +866,6 @@ void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ llwarns << "Unable to set counter for chiclet " << session_id << llendl; } } - } diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp index c114eed4a2..ca0ba96a08 100644 --- a/indra/newview/llfloatergesture.cpp +++ b/indra/newview/llfloatergesture.cpp @@ -89,6 +89,52 @@ LLFloaterGesture::LLFloaterGesture(const LLSD& key) //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_gesture.xml"); } +void LLFloaterGesture::done() +{ + //this method can be called twice: for GestureFolder and once after loading all sudir of GestureFolder + if (gInventory.isCategoryComplete(mGestureFolderID)) + { + LL_DEBUGS("Gesture")<< "mGestureFolderID loaded" << LL_ENDL; + // we load only gesture folder without childred. + LLInventoryModel::cat_array_t* categories; + LLInventoryModel::item_array_t* items; + folder_ref_t unloaded_folders; + LL_DEBUGS("Gesture")<< "Get subdirs of Gesture Folder...." << LL_ENDL; + gInventory.getDirectDescendentsOf(mGestureFolderID, categories, items); + if (categories->empty()) + { + gInventory.removeObserver(this); + LL_INFOS("Gesture")<< "Gesture dos NOT contains sub-directories."<< LL_ENDL; + return; + } + LL_DEBUGS("Gesture")<< "There are " << categories->size() << " Folders "<< LL_ENDL; + for (LLInventoryModel::cat_array_t::iterator it = categories->begin(); it != categories->end(); it++) + { + if (!gInventory.isCategoryComplete(it->get()->getUUID())) + { + unloaded_folders.push_back(it->get()->getUUID()); + LL_DEBUGS("Gesture")<< it->get()->getName()<< " Folder added to fetchlist"<< LL_ENDL; + } + + } + if (!unloaded_folders.empty()) + { + LL_DEBUGS("Gesture")<< "Fetching subdirectories....." << LL_ENDL; + fetchDescendents(unloaded_folders); + } + else + { + LL_DEBUGS("Gesture")<< "All Gesture subdirectories have been loaded."<< LL_ENDL; + gInventory.removeObserver(this); + buildGestureList(); + } + } + else + { + LL_WARNS("Gesture")<< "Gesture list was NOT loaded"<< LL_ENDL; + } +} + // virtual LLFloaterGesture::~LLFloaterGesture() { @@ -121,7 +167,14 @@ BOOL LLFloaterGesture::postBuild() childSetVisible("play_btn", true); childSetVisible("stop_btn", false); setDefaultBtn("play_btn"); - + mGestureFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_GESTURE, false); + + folder_ref_t folders; + folders.push_back(mGestureFolderID); + //perform loading Gesture directory anyway to make sure that all subdirectory are loaded too. See method done() for details. + gInventory.addObserver(this); + fetchDescendents(folders); + buildGestureList(); childSetFocus("gesture_list"); @@ -171,101 +224,125 @@ void LLFloaterGesture::buildGestureList() if (! (list && scroll)) return; - // attempt to preserve scroll position through re-builds - // since we do re-build any time anything dirties - S32 current_scroll_pos = scroll->getScrollPos(); - + LLUUID selected_item = list->getCurrentID(); + LL_DEBUGS("Gesture")<< "Rebuilding gesture list "<< LL_ENDL; list->operateOnAll(LLCtrlListInterface::OP_DELETE); - LLGestureManager::item_map_t::iterator it; - for (it = LLGestureManager::instance().mActive.begin(); it != LLGestureManager::instance().mActive.end(); ++it) + LLGestureManager::item_map_t::const_iterator it; + const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures(); + for (it = active_gestures.begin(); it != active_gestures.end(); ++it) { - const LLUUID& item_id = (*it).first; - LLMultiGesture* gesture = (*it).second; + addGesture(it->first,it->second, list); + } + if (gInventory.isCategoryComplete(mGestureFolderID)) + { + LLIsType is_gesture(LLAssetType::AT_GESTURE); + LLInventoryModel::cat_array_t categories; + LLInventoryModel::item_array_t items; + gInventory.collectDescendentsIf(mGestureFolderID, categories, items, + LLInventoryModel::EXCLUDE_TRASH, is_gesture); - // Note: Can have NULL item if inventory hasn't arrived yet. - std::string item_name = getString("loading"); - LLInventoryItem* item = gInventory.getItem(item_id); - if (item) + for (LLInventoryModel::item_array_t::iterator it = items.begin(); it!= items.end(); ++it) { - item_name = item->getName(); + LLInventoryItem* item = it->get(); + if (active_gestures.find(item->getUUID()) == active_gestures.end()) + { + // if gesture wasn't loaded yet, we can display only name + addGesture(item->getUUID(), NULL, list); + } } + } + // attempt to preserve scroll position through re-builds + // since we do re-build any time anything dirties + if(list->selectByValue(LLSD(selected_item))) + { + scroll->scrollToShowSelected(); + } +} - std::string font_style = "NORMAL"; - // If gesture is playing, bold it +void LLFloaterGesture::addGesture(const LLUUID& item_id , LLMultiGesture* gesture,LLCtrlListInterface * list ) +{ + // Note: Can have NULL item if inventory hasn't arrived yet. + static std::string item_name = getString("loading"); + LLInventoryItem* item = gInventory.getItem(item_id); + if (item) + { + item_name = item->getName(); + } + + static std::string font_style = "NORMAL"; + // If gesture is playing, bold it - LLSD element; - element["id"] = item_id; + LLSD element; + element["id"] = item_id; - if (gesture) + if (gesture) + { + if (gesture->mPlaying) { - if (gesture->mPlaying) - { - font_style = "BOLD"; - } + font_style = "BOLD"; + } - element["columns"][0]["column"] = "trigger"; - element["columns"][0]["value"] = gesture->mTrigger; - element["columns"][0]["font"]["name"] = "SANSSERIF"; - element["columns"][0]["font"]["style"] = font_style; + element["columns"][0]["column"] = "trigger"; + element["columns"][0]["value"] = gesture->mTrigger; + element["columns"][0]["font"]["name"] = "SANSSERIF"; + element["columns"][0]["font"]["style"] = font_style; - std::string key_string = LLKeyboard::stringFromKey(gesture->mKey); - std::string buffer; + std::string key_string = LLKeyboard::stringFromKey(gesture->mKey); + std::string buffer; - if (gesture->mKey == KEY_NONE) - { - buffer = "---"; - key_string = "~~~"; // alphabetize to end - } - else - { - buffer = LLKeyboard::stringFromAccelerator( gesture->mMask, gesture->mKey ); - } + if (gesture->mKey == KEY_NONE) + { + buffer = "---"; + key_string = "~~~"; // alphabetize to end + } + else + { + buffer = LLKeyboard::stringFromAccelerator(gesture->mMask, + gesture->mKey); + } - element["columns"][1]["column"] = "shortcut"; - element["columns"][1]["value"] = buffer; - element["columns"][1]["font"]["name"] = "SANSSERIF"; - element["columns"][1]["font"]["style"] = font_style; + element["columns"][1]["column"] = "shortcut"; + element["columns"][1]["value"] = buffer; + element["columns"][1]["font"]["name"] = "SANSSERIF"; + element["columns"][1]["font"]["style"] = font_style; - // hidden column for sorting - element["columns"][2]["column"] = "key"; - element["columns"][2]["value"] = key_string; - element["columns"][2]["font"]["name"] = "SANSSERIF"; - element["columns"][2]["font"]["style"] = font_style; + // hidden column for sorting + element["columns"][2]["column"] = "key"; + element["columns"][2]["value"] = key_string; + element["columns"][2]["font"]["name"] = "SANSSERIF"; + element["columns"][2]["font"]["style"] = font_style; - // Only add "playing" if we've got the name, less confusing. JC - if (item && gesture->mPlaying) - { - item_name += " " + getString("playing"); - } - element["columns"][3]["column"] = "name"; - element["columns"][3]["value"] = item_name; - element["columns"][3]["font"]["name"] = "SANSSERIF"; - element["columns"][3]["font"]["style"] = font_style; - } - else + // Only add "playing" if we've got the name, less confusing. JC + if (item && gesture->mPlaying) { - element["columns"][0]["column"] = "trigger"; - element["columns"][0]["value"] = ""; - element["columns"][0]["font"]["name"] = "SANSSERIF"; - element["columns"][0]["font"]["style"] = font_style; - element["columns"][0]["column"] = "trigger"; - element["columns"][0]["value"] = "---"; - element["columns"][0]["font"]["name"] = "SANSSERIF"; - element["columns"][0]["font"]["style"] = font_style; - element["columns"][2]["column"] = "key"; - element["columns"][2]["value"] = "~~~"; - element["columns"][2]["font"]["name"] = "SANSSERIF"; - element["columns"][2]["font"]["style"] = font_style; - element["columns"][3]["column"] = "name"; - element["columns"][3]["value"] = item_name; - element["columns"][3]["font"]["name"] = "SANSSERIF"; - element["columns"][3]["font"]["style"] = font_style; + item_name += " " + getString("playing"); } - list->addElement(element, ADD_BOTTOM); + element["columns"][3]["column"] = "name"; + element["columns"][3]["value"] = item_name; + element["columns"][3]["font"]["name"] = "SANSSERIF"; + element["columns"][3]["font"]["style"] = font_style; } - - scroll->setScrollPos(current_scroll_pos); + else + { + element["columns"][0]["column"] = "trigger"; + element["columns"][0]["value"] = ""; + element["columns"][0]["font"]["name"] = "SANSSERIF"; + element["columns"][0]["font"]["style"] = font_style; + element["columns"][0]["column"] = "trigger"; + element["columns"][0]["value"] = "---"; + element["columns"][0]["font"]["name"] = "SANSSERIF"; + element["columns"][0]["font"]["style"] = font_style; + element["columns"][2]["column"] = "key"; + element["columns"][2]["value"] = "~~~"; + element["columns"][2]["font"]["name"] = "SANSSERIF"; + element["columns"][2]["font"]["style"] = font_style; + element["columns"][3]["column"] = "name"; + element["columns"][3]["value"] = item_name; + element["columns"][3]["font"]["name"] = "SANSSERIF"; + element["columns"][3]["font"]["style"] = font_style; + } + list->addElement(element, ADD_BOTTOM); } void LLFloaterGesture::onClickInventory() @@ -284,14 +361,21 @@ void LLFloaterGesture::onClickPlay() LLCtrlListInterface *list = childGetListInterface("gesture_list"); if (!list) return; const LLUUID& item_id = list->getCurrentID(); + if(item_id.isNull()) return; - if (LLGestureManager::instance().isGesturePlaying(item_id)) + LL_DEBUGS("Gesture")<<" Trying to play gesture id: "<< item_id <<LL_ENDL; + if(!LLGestureManager::instance().isGestureActive(item_id)) { - LLGestureManager::instance().stopGesture(item_id); + // we need to inform server about gesture activating to be consistent with LLPreviewGesture. + BOOL inform_server = TRUE; + BOOL deactivate_similar = FALSE; + LLGestureManager::instance().activateGestureWithAsset(item_id, gInventory.getItem(item_id)->getAssetUUID(), inform_server, deactivate_similar); + LL_DEBUGS("Gesture")<< "Activating gesture with inventory ID: " << item_id <<LL_ENDL; + LLGestureManager::instance().setGestureLoadedCallback(item_id, boost::bind(&LLFloaterGesture::playGesture, this, item_id)); } else { - LLGestureManager::instance().playGesture(item_id); + playGesture(item_id); } } @@ -345,3 +429,14 @@ void LLFloaterGesture::onCommitList() childSetVisible("stop_btn", false); } } +void LLFloaterGesture::playGesture(LLUUID item_id) +{ + if (LLGestureManager::instance().isGesturePlaying(item_id)) + { + LLGestureManager::instance().stopGesture(item_id); + } + else + { + LLGestureManager::instance().playGesture(item_id); + } +} diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index 9c1ab27cb0..9d047bf1cf 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -38,7 +38,7 @@ #define LL_LLFLOATERGESTURE_H #include "llfloater.h" - +#include "llinventorymodel.h" #include "lldarray.h" class LLScrollContainer; @@ -51,31 +51,35 @@ class LLGestureOptions; class LLScrollListCtrl; class LLFloaterGestureObserver; class LLFloaterGestureInventoryObserver; +class LLMultiGesture; class LLFloaterGesture -: public LLFloater +: public LLFloater, LLInventoryFetchDescendentsObserver { + LOG_CLASS(LLFloaterGesture); public: LLFloaterGesture(const LLSD& key); virtual ~LLFloaterGesture(); virtual BOOL postBuild(); - + virtual void done (); void refreshAll(); protected: // Reads from the gesture manager's list of active gestures // and puts them in this list. void buildGestureList(); - + void addGesture(const LLUUID& item_id, LLMultiGesture* gesture, LLCtrlListInterface * list); void onClickInventory(); void onClickEdit(); void onClickPlay(); void onClickNew(); void onCommitList(); + void playGesture(LLUUID item_id); protected: LLUUID mSelectedID; + LLUUID mGestureFolderID; LLFloaterGestureObserver* mObserver; }; diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp index 1ff2566dca..481b75cf73 100644 --- a/indra/newview/llfriendcard.cpp +++ b/indra/newview/llfriendcard.cpp @@ -91,44 +91,39 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect return LLUUID::null; } - -// LLViewerInventoryCategory::fetchDescendents has it own period of fetching. -// for now it is FETCH_TIMER_EXPIRY = 10.0f; So made our period a bit more. -const F32 FETCH_FRIENDS_DESCENDENTS_PERIOD = 11.0f; - - /** - * Intended to call passed callback after the specified period of time. + * Class for fetching initial friend cards data * - * Implemented to fix an issue when Inventory folders are in incomplete state. See EXT-2061, EXT-1935, EXT-813. - * For now it uses to periodically sync Inventory Friends/All folder with a Agent's Friends List - * until it is complete. - */ -class FriendListUpdater : public LLEventTimer + * Implemented to fix an issue when Inventory folders are in incomplete state. + * See EXT-2320, EXT-2061, EXT-1935, EXT-813. + * Uses a callback to sync Inventory Friends/All folder with agent's Friends List. + */ +class LLInitialFriendCardsFetch : public LLInventoryFetchDescendentsObserver { public: - typedef boost::function<bool()> callback_t; + typedef boost::function<void()> callback_t; - FriendListUpdater(callback_t cb, F32 period) - : LLEventTimer(period) - , mCallback(cb) - { - mEventTimer.start(); - } + LLInitialFriendCardsFetch(callback_t cb) + : mCheckFolderCallback(cb) {} - virtual BOOL tick() // from LLEventTimer - { - return mCallback(); - } + /* virtual */ void done(); private: - callback_t mCallback; + callback_t mCheckFolderCallback; }; +void LLInitialFriendCardsFetch::done() +{ + // This observer is no longer needed. + gInventory.removeObserver(this); + + mCheckFolderCallback(); + + delete this; +} // LLFriendCardsManager Constructor / Destructor LLFriendCardsManager::LLFriendCardsManager() -: mFriendsAllFolderCompleted(true) { LLAvatarTracker::instance().addObserver(this); } @@ -167,30 +162,6 @@ const LLUUID LLFriendCardsManager::extractAvatarID(const LLUUID& avatarID) return rv; } -// be sure LLInventoryModel::buildParentChildMap() has been called before it. -// and this method must be called before any actions with friend list -void LLFriendCardsManager::ensureFriendFoldersExist() -{ - const LLUUID callingCardsFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); - - LLUUID friendFolderUUID = findFriendFolderUUIDImpl(); - - if (friendFolderUUID.isNull()) - { - friendFolderUUID = gInventory.createNewCategory(callingCardsFolderID, - LLFolderType::FT_CALLINGCARD, get_friend_folder_name()); - } - - LLUUID friendAllSubfolderUUID = findFriendAllSubfolderUUIDImpl(); - - if (friendAllSubfolderUUID.isNull()) - { - friendAllSubfolderUUID = gInventory.createNewCategory(friendFolderUUID, - LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name()); - } -} - - bool LLFriendCardsManager::isItemInAnyFriendsList(const LLViewerInventoryItem* item) { if (item->getType() != LLAssetType::AT_CALLINGCARD) @@ -305,63 +276,12 @@ bool LLFriendCardsManager::isAnyFriendCategory(const LLUUID& catID) const return TRUE == gInventory.isObjectDescendentOf(catID, friendFolderID); } -bool LLFriendCardsManager::syncFriendsFolder() +void LLFriendCardsManager::syncFriendCardsFolders() { - //lets create "Friends" and "Friends/All" in the Inventory "Calling Cards" if they are absent - LLFriendCardsManager::instance().ensureFriendFoldersExist(); - - LLAvatarTracker::buddy_map_t all_buddies; - LLAvatarTracker::instance().copyBuddyList(all_buddies); - - // 1. Remove Friend Cards for non-friends - LLInventoryModel::cat_array_t cats; - LLInventoryModel::item_array_t items; - - gInventory.collectDescendents(findFriendAllSubfolderUUIDImpl(), cats, items, LLInventoryModel::EXCLUDE_TRASH); - - LLInventoryModel::item_array_t::const_iterator it; - for (it = items.begin(); it != items.end(); ++it) - { - lldebugs << "Check if buddy is in list: " << (*it)->getName() << " " << (*it)->getCreatorUUID() << llendl; - if (NULL == get_ptr_in_map(all_buddies, (*it)->getCreatorUUID())) - { - lldebugs << "NONEXISTS, so remove it" << llendl; - removeFriendCardFromInventory((*it)->getCreatorUUID()); - } - } - - // 2. Add missing Friend Cards for friends - LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); - llinfos << "try to build friends, count: " << all_buddies.size() << llendl; - mFriendsAllFolderCompleted = true; - for(; buddy_it != all_buddies.end(); ++buddy_it) - { - const LLUUID& buddy_id = (*buddy_it).first; - addFriendCardToInventory(buddy_id); - } - - if (!mFriendsAllFolderCompleted) - { - forceFriendListIsLoaded(findFriendAllSubfolderUUIDImpl()); - - static bool timer_started = false; - if (!timer_started) - { - lldebugs << "Create and start timer to sync Inventory Friends All folder with Friends list" << llendl; - - // do not worry about destruction of the FriendListUpdater. - // It will be deleted by LLEventTimer::updateClass when FriendListUpdater::tick() returns true. - new FriendListUpdater(boost::bind(&LLFriendCardsManager::syncFriendsFolder, this), - FETCH_FRIENDS_DESCENDENTS_PERIOD); - } - timer_started = true; - } - else - { - lldebugs << "Friends/All Inventory folder is synchronized with the Agent's Friends List" << llendl; - } + const LLUUID callingCardsFolderID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); - return mFriendsAllFolderCompleted; + fetchAndCheckFolderDescendents(callingCardsFolderID, + boost::bind(&LLFriendCardsManager::ensureFriendsFolderExists, this)); } void LLFriendCardsManager::collectFriendsLists(folderid_buddies_map_t& folderBuddiesMap) const @@ -482,6 +402,122 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve } } +void LLFriendCardsManager::fetchAndCheckFolderDescendents(const LLUUID& folder_id, callback_t cb) +{ + // This instance will be deleted in LLInitialFriendCardsFetch::done(). + LLInitialFriendCardsFetch* fetch = new LLInitialFriendCardsFetch(cb); + + LLInventoryFetchDescendentsObserver::folder_ref_t folders; + folders.push_back(folder_id); + + fetch->fetchDescendents(folders); + if(fetch->isEverythingComplete()) + { + // everything is already here - call done. + fetch->done(); + } + else + { + // it's all on it's way - add an observer, and the inventory + // will call done for us when everything is here. + gInventory.addObserver(fetch); + } +} + +// Make sure LLInventoryModel::buildParentChildMap() has been called before it. +// This method must be called before any actions with friends list. +void LLFriendCardsManager::ensureFriendsFolderExists() +{ + const LLUUID calling_cards_folder_ID = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); + + // If "Friends" folder exists in "Calling Cards" we should check if "All" sub-folder + // exists in "Friends", otherwise we create it. + LLUUID friends_folder_ID = findFriendFolderUUIDImpl(); + if (friends_folder_ID.notNull()) + { + fetchAndCheckFolderDescendents(friends_folder_ID, + boost::bind(&LLFriendCardsManager::ensureFriendsAllFolderExists, this)); + } + else + { + if (!gInventory.isCategoryComplete(calling_cards_folder_ID)) + { + LLViewerInventoryCategory* cat = gInventory.getCategory(calling_cards_folder_ID); + std::string cat_name = cat ? cat->getName() : "unknown"; + llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl; + } + + friends_folder_ID = gInventory.createNewCategory(calling_cards_folder_ID, + LLFolderType::FT_CALLINGCARD, get_friend_folder_name()); + + gInventory.createNewCategory(friends_folder_ID, + LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name()); + + // Now when we have all needed folders we can sync their contents with buddies list. + syncFriendsFolder(); + } +} + +// Make sure LLFriendCardsManager::ensureFriendsFolderExists() has been called before it. +void LLFriendCardsManager::ensureFriendsAllFolderExists() +{ + LLUUID friends_all_folder_ID = findFriendAllSubfolderUUIDImpl(); + if (friends_all_folder_ID.notNull()) + { + fetchAndCheckFolderDescendents(friends_all_folder_ID, + boost::bind(&LLFriendCardsManager::syncFriendsFolder, this)); + } + else + { + LLUUID friends_folder_ID = findFriendFolderUUIDImpl(); + + if (!gInventory.isCategoryComplete(friends_folder_ID)) + { + LLViewerInventoryCategory* cat = gInventory.getCategory(friends_folder_ID); + std::string cat_name = cat ? cat->getName() : "unknown"; + llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl; + } + + friends_all_folder_ID = gInventory.createNewCategory(friends_folder_ID, + LLFolderType::FT_CALLINGCARD, get_friend_all_subfolder_name()); + + // Now when we have all needed folders we can sync their contents with buddies list. + syncFriendsFolder(); + } +} + +void LLFriendCardsManager::syncFriendsFolder() +{ + LLAvatarTracker::buddy_map_t all_buddies; + LLAvatarTracker::instance().copyBuddyList(all_buddies); + + // 1. Remove Friend Cards for non-friends + LLInventoryModel::cat_array_t cats; + LLInventoryModel::item_array_t items; + + gInventory.collectDescendents(findFriendAllSubfolderUUIDImpl(), cats, items, LLInventoryModel::EXCLUDE_TRASH); + + LLInventoryModel::item_array_t::const_iterator it; + for (it = items.begin(); it != items.end(); ++it) + { + lldebugs << "Check if buddy is in list: " << (*it)->getName() << " " << (*it)->getCreatorUUID() << llendl; + if (NULL == get_ptr_in_map(all_buddies, (*it)->getCreatorUUID())) + { + lldebugs << "NONEXISTS, so remove it" << llendl; + removeFriendCardFromInventory((*it)->getCreatorUUID()); + } + } + + // 2. Add missing Friend Cards for friends + LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin(); + llinfos << "try to build friends, count: " << all_buddies.size() << llendl; + for(; buddy_it != all_buddies.end(); ++buddy_it) + { + const LLUUID& buddy_id = (*buddy_it).first; + addFriendCardToInventory(buddy_id); + } +} + class CreateFriendCardCallback : public LLInventoryCallback { public: @@ -494,9 +530,8 @@ public: } }; -bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) +void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) { - LLInventoryModel* invModel = &gInventory; bool shouldBeAdded = true; std::string name; @@ -518,13 +553,6 @@ bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) lldebugs << "is found in sentRequests: " << name << llendl; } - LLUUID friendListFolderID = findFriendAllSubfolderUUIDImpl(); - if (friendListFolderID.notNull() && shouldBeAdded && !invModel->isCategoryComplete(friendListFolderID)) - { - mFriendsAllFolderCompleted = false; - shouldBeAdded = false; - lldebugs << "Friends/All category is not completed" << llendl; - } if (shouldBeAdded) { putAvatarData(avatarID); @@ -533,10 +561,8 @@ bool LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID) // TODO: mantipov: Is CreateFriendCardCallback really needed? Probably not LLPointer<LLInventoryCallback> cb = new CreateFriendCardCallback(); - create_inventory_callingcard(avatarID, friendListFolderID, cb); + create_inventory_callingcard(avatarID, findFriendAllSubfolderUUIDImpl(), cb); } - - return shouldBeAdded; } void LLFriendCardsManager::removeFriendCardFromInventory(const LLUUID& avatarID) @@ -582,11 +608,4 @@ void LLFriendCardsManager::onFriendListUpdate(U32 changed_mask) } } -void LLFriendCardsManager::forceFriendListIsLoaded(const LLUUID& folder_id) const -{ - bool fetching_inventory = gInventory.fetchDescendentsOf(folder_id); - lldebugs << "Trying to fetch descendants of Friends/All Inventory folder, fetched: " - << fetching_inventory << llendl; -} - // EOF diff --git a/indra/newview/llfriendcard.h b/indra/newview/llfriendcard.h index feea05bc1d..98dc3153d0 100644 --- a/indra/newview/llfriendcard.h +++ b/indra/newview/llfriendcard.h @@ -58,14 +58,6 @@ public: } /** - * Ensures that all necessary folders are created in Inventory. - * - * For now it processes Calling Card, Calling Card/Friends & Calling Card/Friends/All folders - */ - void ensureFriendFoldersExist(); - - - /** * Determines if specified Inventory Calling Card exists in any of lists * in the Calling Card/Friends/ folder (Default, or Custom) */ @@ -88,11 +80,10 @@ public: bool isAnyFriendCategory(const LLUUID& catID) const; /** - * Synchronizes content of the Calling Card/Friends/All Global Inventory folder with Agent's Friend List - * - * @return true - if folder is already synchronized, false otherwise. + * Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" category + * (creates them otherwise) and fetches their contents to synchronize with Agent's Friends List. */ - bool syncFriendsFolder(); + void syncFriendCardsFolders(); /*! * \brief @@ -108,6 +99,8 @@ public: void collectFriendsLists(folderid_buddies_map_t& folderBuddiesMap) const; private: + typedef boost::function<void()> callback_t; + LLFriendCardsManager(); ~LLFriendCardsManager(); @@ -133,10 +126,29 @@ private: const LLUUID& findFriendCardInventoryUUIDImpl(const LLUUID& avatarID); void findMatchedFriendCards(const LLUUID& avatarID, LLInventoryModel::item_array_t& items) const; + void fetchAndCheckFolderDescendents(const LLUUID& folder_id, callback_t cb); + + /** + * Checks whether "Calling Cards/Friends" folder exists. If not, creates it with "All" + * sub-folder and synchronizes its contents with buddies list. + */ + void ensureFriendsFolderExists(); + + /** + * Checks whether "Calling Cards/Friends/All" folder exists. If not, creates it and + * synchronizes its contents with buddies list. + */ + void ensureFriendsAllFolderExists(); + + /** + * Synchronizes content of the Calling Card/Friends/All Global Inventory folder with Agent's Friend List + */ + void syncFriendsFolder(); + /** * Adds avatar specified by its UUID into the Calling Card/Friends/All Global Inventory folder */ - bool addFriendCardToInventory(const LLUUID& avatarID); + void addFriendCardToInventory(const LLUUID& avatarID); /** * Removes an avatar specified by its UUID from the Calling Card/Friends/All Global Inventory folder @@ -146,20 +158,11 @@ private: void onFriendListUpdate(U32 changed_mask); - /** - * Force fetching of the Inventory folder specified by passed folder's LLUUID. - * - * It only sends request to server, server reply should be processed in other place. - * Because request can be sent via UDP we need to periodically check if request was completed with success. - */ - void forceFriendListIsLoaded(const LLUUID& folder_id) const; - private: typedef std::set<LLUUID> avatar_uuid_set_t; avatar_uuid_set_t mBuddyIDSet; - bool mFriendsAllFolderCompleted; }; #endif // LL_LLFRIENDCARD_H diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 59274c8638..8e774dc199 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -37,7 +37,6 @@ // system #include <functional> #include <algorithm> -#include <boost/tokenizer.hpp> // library #include "lldatapacker.h" @@ -206,6 +205,9 @@ struct LLLoadInfo // If inform_server is true, will send a message upstream to update // the user_gesture_active table. +/** + * It will load a gesture from remote storage + */ void LLGestureManager::activateGestureWithAsset(const LLUUID& item_id, const LLUUID& asset_id, BOOL inform_server, @@ -921,8 +923,8 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, delete info; info = NULL; - - LLGestureManager::instance().mLoadingCount--; + LLGestureManager& self = LLGestureManager::instance(); + self.mLoadingCount--; if (0 == status) { @@ -944,15 +946,15 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, { if (deactivate_similar) { - LLGestureManager::instance().deactivateSimilarGestures(gesture, item_id); + self.deactivateSimilarGestures(gesture, item_id); // Display deactivation message if this was the last of the bunch. - if (LLGestureManager::instance().mLoadingCount == 0 - && LLGestureManager::instance().mDeactivateSimilarNames.length() > 0) + if (self.mLoadingCount == 0 + && self.mDeactivateSimilarNames.length() > 0) { // we're done with this set of deactivations LLSD args; - args["NAMES"] = LLGestureManager::instance().mDeactivateSimilarNames; + args["NAMES"] = self.mDeactivateSimilarNames; LLNotifications::instance().add("DeactivatedGesturesTrigger", args); } } @@ -965,9 +967,9 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, else { // Watch this item and set gesture name when item exists in inventory - LLGestureManager::instance().watchItem(item_id); + self.watchItem(item_id); } - LLGestureManager::instance().mActive[item_id] = gesture; + self.mActive[item_id] = gesture; // Everything has been successful. Add to the active list. gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id); @@ -989,14 +991,21 @@ void LLGestureManager::onLoadComplete(LLVFS *vfs, gAgent.sendReliableMessage(); } + callback_map_t::iterator i_cb = self.mCallbackMap.find(item_id); + + if(i_cb != self.mCallbackMap.end()) + { + i_cb->second(gesture); + self.mCallbackMap.erase(i_cb); + } - LLGestureManager::instance().notifyObservers(); + self.notifyObservers(); } else { llwarns << "Unable to load gesture" << llendl; - LLGestureManager::instance().mActive.erase(item_id); + self.mActive.erase(item_id); delete gesture; gesture = NULL; diff --git a/indra/newview/llgesturemgr.h b/indra/newview/llgesturemgr.h index 947773d66d..7c3b742780 100644 --- a/indra/newview/llgesturemgr.h +++ b/indra/newview/llgesturemgr.h @@ -57,6 +57,12 @@ public: class LLGestureManager : public LLSingleton<LLGestureManager>, public LLInventoryCompletionObserver { public: + + typedef boost::function<void (LLMultiGesture* loaded_gesture)> gesture_loaded_callback_t; + // Maps inventory item_id to gesture + typedef std::map<LLUUID, LLMultiGesture*> item_map_t; + typedef std::map<LLUUID, gesture_loaded_callback_t> callback_map_t; + LLGestureManager(); ~LLGestureManager(); @@ -97,6 +103,7 @@ public: BOOL isGesturePlaying(const LLUUID& item_id); + const item_map_t& getActiveGestures() const { return mActive; } // Force a gesture to be played, for example, if it is being // previewed. void playGesture(LLMultiGesture* gesture); @@ -106,7 +113,15 @@ public: // Also remove from playing list void stopGesture(LLMultiGesture* gesture); void stopGesture(const LLUUID& item_id); - + /** + * Add cb into callbackMap. + * Note: + * Manager will call cb after gesture will be loaded and will remove cb automatically. + */ + void setGestureLoadedCallback(LLUUID inv_item_id, gesture_loaded_callback_t cb) + { + mCallbackMap[inv_item_id] = cb; + } // Trigger the first gesture that matches this key. // Returns TRUE if it finds a gesture bound to that key. BOOL triggerGesture(KEY key, MASK mask); @@ -144,13 +159,7 @@ protected: LLAssetType::EType type, void* user_data, S32 status, LLExtStat ext_status); -public: - BOOL mValid; - std::vector<LLMultiGesture*> mPlaying; - - // Maps inventory item_id to gesture - typedef std::map<LLUUID, LLMultiGesture*> item_map_t; - +private: // Active gestures. // NOTE: The gesture pointer CAN BE NULL. This means that // there is a gesture with that item_id, but the asset data @@ -159,8 +168,11 @@ public: S32 mLoadingCount; std::string mDeactivateSimilarNames; - + std::vector<LLGestureManagerObserver*> mObservers; + callback_map_t mCallbackMap; + std::vector<LLMultiGesture*> mPlaying; + BOOL mValid; }; #endif diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 0f32d0b313..e3121fbc7a 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -120,11 +120,7 @@ void LLIMFloater::newIMCallback(const LLSD& data){ LLUUID session_id = data["session_id"].asUUID(); LLIMFloater* floater = LLFloaterReg::findTypedInstance<LLIMFloater>("impanel", session_id); - if (floater == NULL) - { - llwarns << "new_im_callback for non-existent session_id " << session_id << llendl; - return; - } + if (floater == NULL) return; // update if visible, otherwise will be updated when opened if (floater->getVisible()) @@ -479,6 +475,7 @@ void LLIMFloater::updateMessages() LLChat chat; chat.mFromID = from_id; chat.mFromName = from; + chat.mText = message; mChatHistory->appendWidgetMessage(chat); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index ee785e7ecb..dc32291714 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1124,13 +1124,9 @@ void LLOutgoingCallDialog::onOpen(const LLSD& key) LLSD callee_id = mPayload["other_user_id"]; childSetTextArg("calling", "[CALLEE_NAME]", callee_name); + childSetTextArg("connecting", "[CALLEE_NAME]", callee_name); LLAvatarIconCtrl* icon = getChild<LLAvatarIconCtrl>("avatar_icon"); icon->setValue(callee_id); - - // dock the dialog to the sys well, where other sys messages appear - setDockControl(new LLDockControl(LLBottomTray::getInstance()->getSysWell(), - this, getDockTongue(), LLDockControl::TOP, - boost::bind(&LLOutgoingCallDialog::getAllowedRect, this, _1))); } @@ -1155,6 +1151,11 @@ BOOL LLOutgoingCallDialog::postBuild() childSetAction("Cancel", onCancel, this); + // dock the dialog to the sys well, where other sys messages appear + setDockControl(new LLDockControl(LLBottomTray::getInstance()->getSysWell(), + this, getDockTongue(), LLDockControl::TOP, + boost::bind(&LLOutgoingCallDialog::getAllowedRect, this, _1))); + return success; } diff --git a/indra/newview/lljoystickbutton.cpp b/indra/newview/lljoystickbutton.cpp index bd6702a0b2..d7eaad94f0 100644 --- a/indra/newview/lljoystickbutton.cpp +++ b/indra/newview/lljoystickbutton.cpp @@ -134,16 +134,31 @@ void LLJoystick::updateSlop() return; } +BOOL LLJoystick::pointInCircle(S32 x, S32 y) const +{ + //cnt is x and y coordinates of center of joystick circle, and also its radius, + //because area is not just rectangular, it's a square! + //Make sure to change method if this changes. + int cnt = this->getLocalRect().mTop/2; + if((x-cnt)*(x-cnt)+(y-cnt)*(y-cnt)<=cnt*cnt) + return TRUE; + return FALSE; +} BOOL LLJoystick::handleMouseDown(S32 x, S32 y, MASK mask) { //llinfos << "joystick mouse down " << x << ", " << y << llendl; + bool handles = false; - mLastMouse.set(x, y); - mFirstMouse.set(x, y); + if(handles = pointInCircle(x, y)) + { + mLastMouse.set(x, y); + mFirstMouse.set(x, y); + mMouseDownTimer.reset(); + handles = LLButton::handleMouseDown(x, y, mask); + } - mMouseDownTimer.reset(); - return LLButton::handleMouseDown(x, y, mask); + return handles; } diff --git a/indra/newview/lljoystickbutton.h b/indra/newview/lljoystickbutton.h index 4c657913b8..0465f78031 100644 --- a/indra/newview/lljoystickbutton.h +++ b/indra/newview/lljoystickbutton.h @@ -78,6 +78,8 @@ public: static void onBtnHeldDown(void *userdata); // called by llbutton callback handler void setInitialQuadrant(EJoystickQuadrant initial) { mInitialQuadrant = initial; }; + + BOOL pointInCircle(S32 x, S32 y) const; static std::string nameFromQuadrant(const EJoystickQuadrant quadrant); static EJoystickQuadrant quadrantFromName(const std::string& name); diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index a01426ea87..955347bce2 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -73,9 +73,9 @@ LLLoginInstance::LLLoginInstance() : { mLoginModule->getEventPump().listen("lllogininstance", boost::bind(&LLLoginInstance::handleLoginEvent, this, _1)); - mDispatcher.add("fail.login", "", boost::bind(&LLLoginInstance::handleLoginFailure, this, _1)); - mDispatcher.add("connect", "", boost::bind(&LLLoginInstance::handleLoginSuccess, this, _1)); - mDispatcher.add("disconnect", "", boost::bind(&LLLoginInstance::handleDisconnect, this, _1)); + mDispatcher.add("fail.login", boost::bind(&LLLoginInstance::handleLoginFailure, this, _1)); + mDispatcher.add("connect", boost::bind(&LLLoginInstance::handleLoginSuccess, this, _1)); + mDispatcher.add("disconnect", boost::bind(&LLLoginInstance::handleDisconnect, this, _1)); } LLLoginInstance::~LLLoginInstance() diff --git a/indra/newview/llnearbychatbar.cpp b/indra/newview/llnearbychatbar.cpp index 94b8791147..333646d2c5 100644 --- a/indra/newview/llnearbychatbar.cpp +++ b/indra/newview/llnearbychatbar.cpp @@ -97,9 +97,10 @@ void LLGestureComboBox::refreshGestures() clearRows(); mGestures.clear(); - LLGestureManager::item_map_t::iterator it; + LLGestureManager::item_map_t::const_iterator it; + const LLGestureManager::item_map_t& active_gestures = LLGestureManager::instance().getActiveGestures(); LLSD::Integer idx(0); - for (it = LLGestureManager::instance().mActive.begin(); it != LLGestureManager::instance().mActive.end(); ++it) + for (it = active_gestures.begin(); it != active_gestures.end(); ++it) { LLMultiGesture* gesture = (*it).second; if (gesture) diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index e6665a935e..458845fff3 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -63,8 +63,6 @@ class LLNearbyChatScreenChannel: public LLScreenChannelBase public: LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id) { mStopProcessing = false;}; - void init (S32 channel_left, S32 channel_right); - void addNotification (LLSD& notification); void arrangeToasts (); void showToastsBottom (); @@ -120,15 +118,6 @@ protected: bool mStopProcessing; }; -void LLNearbyChatScreenChannel::init(S32 channel_left, S32 channel_right) -{ - S32 channel_top = gViewerWindow->getWorldViewRectRaw().getHeight(); - S32 channel_bottom = gViewerWindow->getWorldViewRectRaw().mBottom; - setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom)); - setVisible(TRUE); -} - - void LLNearbyChatScreenChannel::createOverflowToast(S32 bottom, F32 timer) { //we don't need overflow toast in nearby chat @@ -332,7 +321,8 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) //only messages from AGENTS if(CHAT_SOURCE_OBJECT == chat_msg.mSourceType) { - return;//dn't show toast for messages from objects + if(chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) + return;//ok for now we don't skip messeges from object, so skip only debug messages } LLUUID id; diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 471dd28426..94e733913d 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -96,11 +96,11 @@ bool LLOfferHandler::processNotification(const LLSD& notify) if (!LLIMMgr::instance().hasSession(session_id)) { session_id = LLIMMgr::instance().addSession( - notification->getSubstitutions()["NAME"], IM_NOTHING_SPECIAL, + notification->getSubstitutions()["OBJECTFROMNAME"], IM_NOTHING_SPECIAL, notification->getPayload()["from_id"]); } LLIMMgr::instance().addMessage(session_id, LLUUID(), - notification->getSubstitutions()["NAME"], + notification->getSubstitutions()["OBJECTFROMNAME"], notification->getMessage()); LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 2cf56d5571..ad8a379cc1 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -322,13 +322,19 @@ void LLPanelMediaSettingsGeneral::updateMediaPreview() { if ( mHomeURL->getValue().asString().length() > 0 ) { - mPreviewMedia->navigateTo( mHomeURL->getValue().asString() ); + if(mPreviewMedia->getCurrentNavUrl() != mHomeURL->getValue().asString()) + { + mPreviewMedia->navigateTo( mHomeURL->getValue().asString() ); + } } else // new home URL will be empty if media is deleted so display a // "preview goes here" data url page { - mPreviewMedia->navigateTo( CHECKERBOARD_DATA_URL ); + if(mPreviewMedia->getCurrentNavUrl() != CHECKERBOARD_DATA_URL) + { + mPreviewMedia->navigateTo( CHECKERBOARD_DATA_URL ); + } }; } diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 2bbb2b7153..ca87ebf5a2 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -519,7 +519,6 @@ BOOL LLPanelPeople::postBuild() LLPanel* groups_panel = getChild<LLPanel>(GROUP_TAB_NAME); groups_panel->childSetAction("activate_btn", boost::bind(&LLPanelPeople::onActivateButtonClicked, this)); groups_panel->childSetAction("plus_btn", boost::bind(&LLPanelPeople::onGroupPlusButtonClicked, this)); - groups_panel->childSetAction("minus_btn", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); LLPanel* friends_panel = getChild<LLPanel>(FRIENDS_TAB_NAME); friends_panel->childSetAction("add_btn", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this)); @@ -568,6 +567,7 @@ BOOL LLPanelPeople::postBuild() LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; registrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2)); + registrar.add("People.Group.Minus.Action", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); registrar.add("People.Friends.ViewSort.Action", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemClicked, this, _2)); registrar.add("People.Nearby.ViewSort.Action", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemClicked, this, _2)); registrar.add("People.Groups.ViewSort.Action", boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked, this, _2)); diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp index 2d3f901370..1051326e72 100644 --- a/indra/newview/llpanelpermissions.cpp +++ b/indra/newview/llpanelpermissions.cpp @@ -970,19 +970,32 @@ void LLPanelPermissions::setAllSaleInfo() if (price < 0) sale_type = LLSaleInfo::FS_NOT; - LLSaleInfo sale_info(sale_type, price); - LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(sale_info); + LLSaleInfo old_sale_info; + LLSelectMgr::getInstance()->selectGetSaleInfo(old_sale_info); + + LLSaleInfo new_sale_info(sale_type, price); + LLSelectMgr::getInstance()->selectionSetObjectSaleInfo(new_sale_info); - // If turned off for-sale, make sure click-action buy is turned - // off as well - if (sale_type == LLSaleInfo::FS_NOT) + U8 old_click_action = 0; + LLSelectMgr::getInstance()->selectionGetClickAction(&old_click_action); + + if (old_sale_info.isForSale() + && !new_sale_info.isForSale() + && old_click_action == CLICK_ACTION_BUY) { - U8 click_action = 0; - LLSelectMgr::getInstance()->selectionGetClickAction(&click_action); - if (click_action == CLICK_ACTION_BUY) - { - LLSelectMgr::getInstance()->selectionSetClickAction(CLICK_ACTION_TOUCH); - } + // If turned off for-sale, make sure click-action buy is turned + // off as well + LLSelectMgr::getInstance()-> + selectionSetClickAction(CLICK_ACTION_TOUCH); + } + else if (new_sale_info.isForSale() + && !old_sale_info.isForSale() + && old_click_action == CLICK_ACTION_TOUCH) + { + // If just turning on for-sale, preemptively turn on one-click buy + // unless user have a different click action set + LLSelectMgr::getInstance()-> + selectionSetClickAction(CLICK_ACTION_BUY); } } diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 24de2dcdfc..12ad070efd 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -44,6 +44,7 @@ #include "llbutton.h" #include "llface.h" #include "llcombobox.h" +#include "lllayoutstack.h" #include "llslider.h" #include "llhudview.h" #include "lliconctrl.h" @@ -84,8 +85,7 @@ LLPanelPrimMediaControls::LLPanelPrimMediaControls() : mUpdateSlider(true), mClearFaceOnFade(false), mCurrentRate(0.0), - mMovieDuration(0.0), - mUpdatePercent(0) + mMovieDuration(0.0) { mCommitCallbackRegistrar.add("MediaCtrl.Close", boost::bind(&LLPanelPrimMediaControls::onClickClose, this)); mCommitCallbackRegistrar.add("MediaCtrl.Back", boost::bind(&LLPanelPrimMediaControls::onClickBack, this)); @@ -117,37 +117,69 @@ LLPanelPrimMediaControls::~LLPanelPrimMediaControls() BOOL LLPanelPrimMediaControls::postBuild() { - LLButton* scroll_up_ctrl = getChild<LLButton>("scrollup"); - if (scroll_up_ctrl) + mMediaRegion = getChild<LLView>("media_region"); + mBackCtrl = getChild<LLUICtrl>("back"); + mFwdCtrl = getChild<LLUICtrl>("fwd"); + mReloadCtrl = getChild<LLUICtrl>("reload"); + mPlayCtrl = getChild<LLUICtrl>("play"); + mPauseCtrl = getChild<LLUICtrl>("pause"); + mStopCtrl = getChild<LLUICtrl>("stop"); + mMediaStopCtrl = getChild<LLUICtrl>("media_stop"); + mHomeCtrl = getChild<LLUICtrl>("home"); + mUnzoomCtrl = getChild<LLUICtrl>("close"); // This is actually "unzoom" + mOpenCtrl = getChild<LLUICtrl>("new_window"); + mZoomCtrl = getChild<LLUICtrl>("zoom_frame"); + mMediaProgressPanel = getChild<LLPanel>("media_progress_indicator"); + mMediaProgressBar = getChild<LLProgressBar>("media_progress_bar"); + mMediaAddressCtrl = getChild<LLUICtrl>("media_address"); + mMediaAddress = getChild<LLUICtrl>("media_address_url"); + mMediaPlaySliderPanel = getChild<LLUICtrl>("media_play_position"); + mMediaPlaySliderCtrl = getChild<LLUICtrl>("media_play_slider"); + mVolumeCtrl = getChild<LLUICtrl>("media_volume"); + mVolumeBtn = getChild<LLButton>("media_volume_button"); + mVolumeUpCtrl = getChild<LLUICtrl>("volume_up"); + mVolumeDownCtrl = getChild<LLUICtrl>("volume_down"); + mWhitelistIcon = getChild<LLIconCtrl>("media_whitelist_flag"); + mSecureLockIcon = getChild<LLIconCtrl>("media_secure_lock_flag"); + mMediaControlsStack = getChild<LLLayoutStack>("media_controls"); + mLeftBookend = getChild<LLUICtrl>("left_bookend"); + mRightBookend = getChild<LLUICtrl>("right_bookend"); + mBackgroundImage = LLUI::getUIImage(getString("control_background_image_name")); + + // These are currently removed...but getChild creates a "dummy" widget. + // This class handles them missing. + mMediaPanelScroll = findChild<LLUICtrl>("media_panel_scroll"); + mScrollUpCtrl = findChild<LLButton>("scrollup"); + mScrollLeftCtrl = findChild<LLButton>("scrollleft"); + mScrollRightCtrl = findChild<LLButton>("scrollright"); + mScrollDownCtrl = findChild<LLButton>("scrolldown"); + + if (mScrollUpCtrl) { - scroll_up_ctrl->setClickedCallback(onScrollUp, this); - scroll_up_ctrl->setHeldDownCallback(onScrollUpHeld, this); - scroll_up_ctrl->setMouseUpCallback(onScrollStop, this); + mScrollUpCtrl->setClickedCallback(onScrollUp, this); + mScrollUpCtrl->setHeldDownCallback(onScrollUpHeld, this); + mScrollUpCtrl->setMouseUpCallback(onScrollStop, this); } - LLButton* scroll_left_ctrl = getChild<LLButton>("scrollleft"); - if (scroll_left_ctrl) + if (mScrollLeftCtrl) { - scroll_left_ctrl->setClickedCallback(onScrollLeft, this); - scroll_left_ctrl->setHeldDownCallback(onScrollLeftHeld, this); - scroll_left_ctrl->setMouseUpCallback(onScrollStop, this); + mScrollLeftCtrl->setClickedCallback(onScrollLeft, this); + mScrollLeftCtrl->setHeldDownCallback(onScrollLeftHeld, this); + mScrollLeftCtrl->setMouseUpCallback(onScrollStop, this); } - LLButton* scroll_right_ctrl = getChild<LLButton>("scrollright"); - if (scroll_right_ctrl) + if (mScrollRightCtrl) { - scroll_right_ctrl->setClickedCallback(onScrollRight, this); - scroll_right_ctrl->setHeldDownCallback(onScrollRightHeld, this); - scroll_right_ctrl->setMouseUpCallback(onScrollStop, this); + mScrollRightCtrl->setClickedCallback(onScrollRight, this); + mScrollRightCtrl->setHeldDownCallback(onScrollRightHeld, this); + mScrollRightCtrl->setMouseUpCallback(onScrollStop, this); } - LLButton* scroll_down_ctrl = getChild<LLButton>("scrolldown"); - if (scroll_down_ctrl) + if (mScrollDownCtrl) { - scroll_down_ctrl->setClickedCallback(onScrollDown, this); - scroll_down_ctrl->setHeldDownCallback(onScrollDownHeld, this); - scroll_down_ctrl->setMouseUpCallback(onScrollStop, this); + mScrollDownCtrl->setClickedCallback(onScrollDown, this); + mScrollDownCtrl->setHeldDownCallback(onScrollDownHeld, this); + mScrollDownCtrl->setMouseUpCallback(onScrollStop, this); } - LLUICtrl* media_address = getChild<LLUICtrl>("media_address"); - media_address->setFocusReceivedCallback(boost::bind(&LLPanelPrimMediaControls::onInputURL, _1, this )); + mMediaAddress->setFocusReceivedCallback(boost::bind(&LLPanelPrimMediaControls::onInputURL, _1, this )); mInactiveTimeout = gSavedSettings.getF32("MediaControlTimeout"); mControlFadeTime = gSavedSettings.getF32("MediaControlFadeTime"); @@ -261,90 +293,63 @@ void LLPanelPrimMediaControls::updateShape() // // Set the state of the buttons // - LLUICtrl* back_ctrl = getChild<LLUICtrl>("back"); - LLUICtrl* fwd_ctrl = getChild<LLUICtrl>("fwd"); - LLUICtrl* reload_ctrl = getChild<LLUICtrl>("reload"); - LLUICtrl* play_ctrl = getChild<LLUICtrl>("play"); - LLUICtrl* pause_ctrl = getChild<LLUICtrl>("pause"); - LLUICtrl* stop_ctrl = getChild<LLUICtrl>("stop"); - LLUICtrl* media_stop_ctrl = getChild<LLUICtrl>("media_stop"); - LLUICtrl* home_ctrl = getChild<LLUICtrl>("home"); - LLUICtrl* unzoom_ctrl = getChild<LLUICtrl>("close"); // This is actually "unzoom" - LLUICtrl* open_ctrl = getChild<LLUICtrl>("new_window"); - LLUICtrl* zoom_ctrl = getChild<LLUICtrl>("zoom_frame"); - LLPanel* media_loading_panel = getChild<LLPanel>("media_progress_indicator"); - LLUICtrl* media_address_ctrl = getChild<LLUICtrl>("media_address"); - LLUICtrl* media_play_slider_panel = getChild<LLUICtrl>("media_play_position"); - LLUICtrl* media_play_slider_ctrl = getChild<LLUICtrl>("media_play_slider"); - LLUICtrl* volume_ctrl = getChild<LLUICtrl>("media_volume"); - LLButton* volume_btn = getChild<LLButton>("media_volume_button"); - LLUICtrl* volume_up_ctrl = getChild<LLUICtrl>("volume_up"); - LLUICtrl* volume_down_ctrl = getChild<LLUICtrl>("volume_down"); - LLIconCtrl* whitelist_icon = getChild<LLIconCtrl>("media_whitelist_flag"); - LLIconCtrl* secure_lock_icon = getChild<LLIconCtrl>("media_secure_lock_flag"); - - LLUICtrl* media_panel_scroll = getChild<LLUICtrl>("media_panel_scroll"); - LLUICtrl* scroll_up_ctrl = getChild<LLUICtrl>("scrollup"); - LLUICtrl* scroll_left_ctrl = getChild<LLUICtrl>("scrollleft"); - LLUICtrl* scroll_right_ctrl = getChild<LLUICtrl>("scrollright"); - LLUICtrl* scroll_down_ctrl = getChild<LLUICtrl>("scrolldown"); // XXX RSP: TODO: FIXME: clean this up so that it is clearer what mode we are in, // and that only the proper controls get made visible/enabled according to that mode. - back_ctrl->setVisible(has_focus); - fwd_ctrl->setVisible(has_focus); - reload_ctrl->setVisible(has_focus); - stop_ctrl->setVisible(false); - home_ctrl->setVisible(has_focus); - zoom_ctrl->setVisible(!is_zoomed); - unzoom_ctrl->setVisible(has_focus && is_zoomed); - open_ctrl->setVisible(true); - media_address_ctrl->setVisible(has_focus && !mini_controls); - media_play_slider_panel->setVisible(has_focus && !mini_controls); - volume_ctrl->setVisible(false); - volume_up_ctrl->setVisible(false); - volume_down_ctrl->setVisible(false); + mBackCtrl->setVisible(has_focus); + mFwdCtrl->setVisible(has_focus); + mReloadCtrl->setVisible(has_focus); + mStopCtrl->setVisible(false); + mHomeCtrl->setVisible(has_focus); + mZoomCtrl->setVisible(!is_zoomed); + mUnzoomCtrl->setVisible(has_focus && is_zoomed); + mOpenCtrl->setVisible(true); + mMediaAddressCtrl->setVisible(has_focus && !mini_controls); + mMediaPlaySliderPanel->setVisible(has_focus && !mini_controls); + mVolumeCtrl->setVisible(false); + mVolumeUpCtrl->setVisible(false); + mVolumeDownCtrl->setVisible(false); - whitelist_icon->setVisible(!mini_controls && (media_data)?media_data->getWhiteListEnable():false); + mWhitelistIcon->setVisible(!mini_controls && (media_data)?media_data->getWhiteListEnable():false); // Disable zoom if HUD - zoom_ctrl->setEnabled(!objectp->isHUDAttachment()); - unzoom_ctrl->setEnabled(!objectp->isHUDAttachment()); - secure_lock_icon->setVisible(false); + mZoomCtrl->setEnabled(!objectp->isHUDAttachment()); + mUnzoomCtrl->setEnabled(!objectp->isHUDAttachment()); + mSecureLockIcon->setVisible(false); mCurrentURL = media_impl->getCurrentMediaURL(); - back_ctrl->setEnabled((media_impl != NULL) && media_impl->canNavigateBack() && can_navigate); - fwd_ctrl->setEnabled((media_impl != NULL) && media_impl->canNavigateForward() && can_navigate); - stop_ctrl->setEnabled(has_focus && can_navigate); - home_ctrl->setEnabled(has_focus && can_navigate); + mBackCtrl->setEnabled((media_impl != NULL) && media_impl->canNavigateBack() && can_navigate); + mFwdCtrl->setEnabled((media_impl != NULL) && media_impl->canNavigateForward() && can_navigate); + mStopCtrl->setEnabled(has_focus && can_navigate); + mHomeCtrl->setEnabled(has_focus && can_navigate); LLPluginClassMediaOwner::EMediaStatus result = ((media_impl != NULL) && media_impl->hasMedia()) ? media_plugin->getStatus() : LLPluginClassMediaOwner::MEDIA_NONE; if(media_plugin && media_plugin->pluginSupportsMediaTime()) { - reload_ctrl->setEnabled(FALSE); - reload_ctrl->setVisible(FALSE); - media_stop_ctrl->setVisible(has_focus); - home_ctrl->setVisible(FALSE); - back_ctrl->setEnabled(has_focus); - fwd_ctrl->setEnabled(has_focus); - media_address_ctrl->setVisible(false); - media_address_ctrl->setEnabled(false); - media_play_slider_panel->setVisible(has_focus && !mini_controls); - media_play_slider_panel->setEnabled(has_focus && !mini_controls); + mReloadCtrl->setEnabled(FALSE); + mReloadCtrl->setVisible(FALSE); + mMediaStopCtrl->setVisible(has_focus); + mHomeCtrl->setVisible(FALSE); + mBackCtrl->setEnabled(has_focus); + mFwdCtrl->setEnabled(has_focus); + mMediaAddressCtrl->setVisible(false); + mMediaAddressCtrl->setEnabled(false); + mMediaPlaySliderPanel->setVisible(has_focus && !mini_controls); + mMediaPlaySliderPanel->setEnabled(has_focus && !mini_controls); - volume_ctrl->setVisible(has_focus); - volume_up_ctrl->setVisible(has_focus); - volume_down_ctrl->setVisible(has_focus); - volume_ctrl->setEnabled(has_focus); - - whitelist_icon->setVisible(false); - secure_lock_icon->setVisible(false); - if (media_panel_scroll) + mVolumeCtrl->setVisible(has_focus); + mVolumeUpCtrl->setVisible(has_focus); + mVolumeDownCtrl->setVisible(has_focus); + mVolumeCtrl->setEnabled(has_focus); + + mWhitelistIcon->setVisible(false); + mSecureLockIcon->setVisible(false); + if (mMediaPanelScroll) { - media_panel_scroll->setVisible(false); - scroll_up_ctrl->setVisible(false); - scroll_left_ctrl->setVisible(false); - scroll_right_ctrl->setVisible(false); - scroll_down_ctrl->setVisible(false); + mMediaPanelScroll->setVisible(false); + mScrollUpCtrl->setVisible(false); + mScrollDownCtrl->setVisible(false); + mScrollRightCtrl->setVisible(false); + mScrollDownCtrl->setVisible(false); } F32 volume = media_impl->getVolume(); @@ -358,8 +363,8 @@ void LLPanelPrimMediaControls::updateShape() if(mMovieDuration == 0) { mMovieDuration = media_plugin->getDuration(); - media_play_slider_ctrl->setValue(0); - media_play_slider_ctrl->setEnabled(false); + mMediaPlaySliderCtrl->setValue(0); + mMediaPlaySliderCtrl->setEnabled(false); } // TODO: What if it's not fully loaded @@ -367,48 +372,48 @@ void LLPanelPrimMediaControls::updateShape() { F64 current_time = media_plugin->getCurrentTime(); F32 percent = current_time / mMovieDuration; - media_play_slider_ctrl->setValue(percent); - media_play_slider_ctrl->setEnabled(true); + mMediaPlaySliderCtrl->setValue(percent); + mMediaPlaySliderCtrl->setEnabled(true); } // video vloume if(volume <= 0.0) { - volume_up_ctrl->setEnabled(TRUE); - volume_down_ctrl->setEnabled(FALSE); + mVolumeUpCtrl->setEnabled(TRUE); + mVolumeDownCtrl->setEnabled(FALSE); media_impl->setVolume(0.0); - volume_btn->setToggleState(true); + mVolumeBtn->setToggleState(true); } else if (volume >= 1.0) { - volume_up_ctrl->setEnabled(FALSE); - volume_down_ctrl->setEnabled(TRUE); + mVolumeUpCtrl->setEnabled(FALSE); + mVolumeDownCtrl->setEnabled(TRUE); media_impl->setVolume(1.0); - volume_btn->setToggleState(false); + mVolumeBtn->setToggleState(false); } else { - volume_up_ctrl->setEnabled(TRUE); - volume_down_ctrl->setEnabled(TRUE); + mVolumeUpCtrl->setEnabled(TRUE); + mVolumeDownCtrl->setEnabled(TRUE); } switch(result) { case LLPluginClassMediaOwner::MEDIA_PLAYING: - play_ctrl->setEnabled(FALSE); - play_ctrl->setVisible(FALSE); - pause_ctrl->setEnabled(TRUE); - pause_ctrl->setVisible(has_focus); - media_stop_ctrl->setEnabled(TRUE); + mPlayCtrl->setEnabled(FALSE); + mPlayCtrl->setVisible(FALSE); + mPauseCtrl->setEnabled(TRUE); + mPauseCtrl->setVisible(has_focus); + mMediaStopCtrl->setEnabled(TRUE); break; case LLPluginClassMediaOwner::MEDIA_PAUSED: default: - pause_ctrl->setEnabled(FALSE); - pause_ctrl->setVisible(FALSE); - play_ctrl->setEnabled(TRUE); - play_ctrl->setVisible(has_focus); - media_stop_ctrl->setEnabled(FALSE); + mPauseCtrl->setEnabled(FALSE); + mPauseCtrl->setVisible(FALSE); + mPlayCtrl->setEnabled(TRUE); + mPlayCtrl->setVisible(has_focus); + mMediaStopCtrl->setEnabled(FALSE); break; } } @@ -423,28 +428,28 @@ void LLPanelPrimMediaControls::updateShape() mCurrentURL.clear(); } - play_ctrl->setVisible(FALSE); - pause_ctrl->setVisible(FALSE); - media_stop_ctrl->setVisible(FALSE); - media_address_ctrl->setVisible(has_focus && !mini_controls); - media_address_ctrl->setEnabled(has_focus && !mini_controls); - media_play_slider_panel->setVisible(FALSE); - media_play_slider_panel->setEnabled(FALSE); + mPlayCtrl->setVisible(FALSE); + mPauseCtrl->setVisible(FALSE); + mMediaStopCtrl->setVisible(FALSE); + mMediaAddressCtrl->setVisible(has_focus && !mini_controls); + mMediaAddressCtrl->setEnabled(has_focus && !mini_controls); + mMediaPlaySliderPanel->setVisible(FALSE); + mMediaPlaySliderPanel->setEnabled(FALSE); - volume_ctrl->setVisible(FALSE); - volume_up_ctrl->setVisible(FALSE); - volume_down_ctrl->setVisible(FALSE); - volume_ctrl->setEnabled(FALSE); - volume_up_ctrl->setEnabled(FALSE); - volume_down_ctrl->setEnabled(FALSE); + mVolumeCtrl->setVisible(FALSE); + mVolumeUpCtrl->setVisible(FALSE); + mVolumeDownCtrl->setVisible(FALSE); + mVolumeCtrl->setEnabled(FALSE); + mVolumeUpCtrl->setEnabled(FALSE); + mVolumeDownCtrl->setEnabled(FALSE); - if (media_panel_scroll) + if (mMediaPanelScroll) { - media_panel_scroll->setVisible(has_focus); - scroll_up_ctrl->setVisible(has_focus); - scroll_left_ctrl->setVisible(has_focus); - scroll_right_ctrl->setVisible(has_focus); - scroll_down_ctrl->setVisible(has_focus); + mMediaPanelScroll->setVisible(has_focus); + mScrollUpCtrl->setVisible(has_focus); + mScrollDownCtrl->setVisible(has_focus); + mScrollRightCtrl->setVisible(has_focus); + mScrollDownCtrl->setVisible(has_focus); } // TODO: get the secure lock bool from media plug in std::string prefix = std::string("https://"); @@ -452,7 +457,7 @@ void LLPanelPrimMediaControls::updateShape() LLStringUtil::toLower(test_prefix); if(test_prefix == prefix) { - secure_lock_icon->setVisible(has_focus); + mSecureLockIcon->setVisible(has_focus); } if(mCurrentURL!=mPreviousURL) @@ -463,17 +468,17 @@ void LLPanelPrimMediaControls::updateShape() if(result == LLPluginClassMediaOwner::MEDIA_LOADING) { - reload_ctrl->setEnabled(FALSE); - reload_ctrl->setVisible(FALSE); - stop_ctrl->setEnabled(TRUE); - stop_ctrl->setVisible(has_focus); + mReloadCtrl->setEnabled(FALSE); + mReloadCtrl->setVisible(FALSE); + mStopCtrl->setEnabled(TRUE); + mStopCtrl->setVisible(has_focus); } else { - reload_ctrl->setEnabled(TRUE); - reload_ctrl->setVisible(has_focus); - stop_ctrl->setEnabled(FALSE); - stop_ctrl->setVisible(FALSE); + mReloadCtrl->setEnabled(TRUE); + mReloadCtrl->setVisible(has_focus); + mStopCtrl->setEnabled(FALSE); + mStopCtrl->setVisible(FALSE); } } @@ -483,16 +488,15 @@ void LLPanelPrimMediaControls::updateShape() // // Handle progress bar // - mUpdatePercent = media_plugin->getProgressPercent(); - if(mUpdatePercent<100.0f) - { - media_loading_panel->setVisible(true); - getChild<LLProgressBar>("media_progress_bar")->setPercent(mUpdatePercent); - gFocusMgr.setTopCtrl(media_loading_panel); + if(LLPluginClassMediaOwner::MEDIA_LOADING == media_plugin->getStatus()) + { + mMediaProgressPanel->setVisible(true); + mMediaProgressBar->setPercent(media_plugin->getProgressPercent()); + gFocusMgr.setTopCtrl(mMediaProgressPanel); } else { - media_loading_panel->setVisible(false); + mMediaProgressPanel->setVisible(false); gFocusMgr.setTopCtrl(NULL); } } @@ -589,11 +593,10 @@ void LLPanelPrimMediaControls::updateShape() // grow panel so that screenspace bounding box fits inside "media_region" element of HUD LLRect media_controls_rect; getParent()->screenRectToLocal(LLRect(screen_min.mX, screen_max.mY, screen_max.mX, screen_min.mY), &media_controls_rect); - LLView* media_region = getChild<LLView>("media_region"); - media_controls_rect.mLeft -= media_region->getRect().mLeft; - media_controls_rect.mBottom -= media_region->getRect().mBottom; - media_controls_rect.mTop += getRect().getHeight() - media_region->getRect().mTop; - media_controls_rect.mRight += getRect().getWidth() - media_region->getRect().mRight; + media_controls_rect.mLeft -= mMediaRegion->getRect().mLeft; + media_controls_rect.mBottom -= mMediaRegion->getRect().mBottom; + media_controls_rect.mTop += getRect().getHeight() - mMediaRegion->getRect().mTop; + media_controls_rect.mRight += getRect().getWidth() - mMediaRegion->getRect().mRight; LLRect old_hud_rect = media_controls_rect; // keep all parts of HUD on-screen @@ -669,6 +672,20 @@ void LLPanelPrimMediaControls::draw() } } + // Build rect for icon area in coord system of this panel + // Assumes layout_stack is a direct child of this panel + mMediaControlsStack->updateLayout(); + LLRect icon_area = mMediaControlsStack->getRect(); + + // adjust to ignore space from left bookend padding + icon_area.mLeft += mLeftBookend->getRect().getWidth(); + + // ignore space from right bookend padding + icon_area.mRight -= mRightBookend->getRect().getWidth(); + + // get UI image + mBackgroundImage->draw( icon_area, UI_VERTEX_COLOR % alpha); + { LLViewDrawContext context(alpha); LLPanel::draw(); @@ -711,16 +728,12 @@ bool LLPanelPrimMediaControls::isMouseOver() S32 x, y; getWindow()->getCursorPosition(&cursor_pos_window); getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl); - - LLView* controls_view = NULL; - controls_view = getChild<LLView>("media_controls"); - - //FIXME: rewrite as LLViewQuery or get hover set from LLViewerWindow? - if(controls_view && controls_view->getVisible()) + + if(mMediaControlsStack->getVisible()) { - controls_view->screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &x, &y); + mMediaControlsStack->screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &x, &y); - LLView *hit_child = controls_view->childFromPoint(x, y); + LLView *hit_child = mMediaControlsStack->childFromPoint(x, y); if(hit_child && hit_child->getVisible()) { // This was useful for debugging both coordinate translation and view hieararchy problems... @@ -1002,8 +1015,7 @@ void LLPanelPrimMediaControls::onCommitURL() { focusOnTarget(); - LLUICtrl *media_address_ctrl = getChild<LLUICtrl>("media_address_url"); - std::string url = media_address_ctrl->getValue().asString(); + std::string url = mMediaAddress->getValue().asString(); if(getTargetMediaImpl() && !url.empty()) { getTargetMediaImpl()->navigateTo( url, "", true); @@ -1032,19 +1044,18 @@ void LLPanelPrimMediaControls::onInputURL(LLFocusableElement* caller, void *user void LLPanelPrimMediaControls::setCurrentURL() { #ifdef USE_COMBO_BOX_FOR_MEDIA_URL - LLComboBox* media_address_combo = getChild<LLComboBox>("media_address_combo"); - // redirects will navigate momentarily to about:blank, don't add to history - if (media_address_combo && mCurrentURL != "about:blank") - { - media_address_combo->remove(mCurrentURL); - media_address_combo->add(mCurrentURL, ADD_SORTED); - media_address_combo->selectByValue(mCurrentURL); - } +// LLComboBox* media_address_combo = getChild<LLComboBox>("media_address_combo"); +// // redirects will navigate momentarily to about:blank, don't add to history +// if (media_address_combo && mCurrentURL != "about:blank") +// { +// media_address_combo->remove(mCurrentURL); +// media_address_combo->add(mCurrentURL, ADD_SORTED); +// media_address_combo->selectByValue(mCurrentURL); +// } #else // USE_COMBO_BOX_FOR_MEDIA_URL - LLLineEditor* media_address_url = getChild<LLLineEditor>("media_address_url"); - if (media_address_url && mCurrentURL != "about:blank") + if (mMediaAddress && mCurrentURL != "about:blank") { - media_address_url->setValue(mCurrentURL); + mMediaAddress->setValue(mCurrentURL); } #endif // USE_COMBO_BOX_FOR_MEDIA_URL } @@ -1053,12 +1064,11 @@ void LLPanelPrimMediaControls::onCommitSlider() { focusOnTarget(); - LLSlider* media_play_slider_ctrl = getChild<LLSlider>("media_play_slider"); LLViewerMediaImpl* media_impl = getTargetMediaImpl(); if (media_impl) { // get slider value - F64 slider_value = media_play_slider_ctrl->getValue().asReal(); + F64 slider_value = mMediaPlaySliderCtrl->getValue().asReal(); if(slider_value <= 0.0) { media_impl->stop(); @@ -1087,7 +1097,7 @@ void LLPanelPrimMediaControls::onCommitVolumeUp() } media_impl->setVolume(volume); - getChild<LLButton>("media_volume")->setToggleState(false); + mVolumeBtn->setToggleState(false); } } @@ -1107,7 +1117,7 @@ void LLPanelPrimMediaControls::onCommitVolumeDown() } media_impl->setVolume(volume); - getChild<LLButton>("media_volume")->setToggleState(false); + mVolumeBtn->setToggleState(false); } } diff --git a/indra/newview/llpanelprimmediacontrols.h b/indra/newview/llpanelprimmediacontrols.h index 3ec7aa2356..124fa9cce4 100644 --- a/indra/newview/llpanelprimmediacontrols.h +++ b/indra/newview/llpanelprimmediacontrols.h @@ -35,7 +35,11 @@ #include "llpanel.h" #include "llviewermedia.h" +class LLButton; class LLCoordWindow; +class LLIconCtrl; +class LLLayoutStack; +class LLProgressBar; class LLViewerMediaImpl; class LLPanelPrimMediaControls : public LLPanel @@ -119,6 +123,44 @@ private: LLViewerMediaImpl* getTargetMediaImpl(); LLViewerObject* getTargetObject(); LLPluginClassMedia* getTargetMediaPlugin(); + +private: + + LLView *mMediaRegion; + LLUICtrl *mBackCtrl; + LLUICtrl *mFwdCtrl; + LLUICtrl *mReloadCtrl; + LLUICtrl *mPlayCtrl; + LLUICtrl *mPauseCtrl; + LLUICtrl *mStopCtrl; + LLUICtrl *mMediaStopCtrl; + LLUICtrl *mHomeCtrl; + LLUICtrl *mUnzoomCtrl; + LLUICtrl *mOpenCtrl; + LLUICtrl *mZoomCtrl; + LLPanel *mMediaProgressPanel; + LLProgressBar *mMediaProgressBar; + LLUICtrl *mMediaAddressCtrl; + LLUICtrl *mMediaAddress; + LLUICtrl *mMediaPlaySliderPanel; + LLUICtrl *mMediaPlaySliderCtrl; + LLUICtrl *mVolumeCtrl; + LLButton *mVolumeBtn; + LLUICtrl *mVolumeUpCtrl; + LLUICtrl *mVolumeDownCtrl; + LLIconCtrl *mWhitelistIcon; + LLIconCtrl *mSecureLockIcon; + LLLayoutStack *mMediaControlsStack; + LLUICtrl *mLeftBookend; + LLUICtrl *mRightBookend; + LLUIImage* mBackgroundImage; + + LLUICtrl *mMediaPanelScroll; + LLButton *mScrollUpCtrl; + LLButton *mScrollLeftCtrl; + LLButton *mScrollRightCtrl; + LLButton *mScrollDownCtrl; + bool mPauseFadeout; bool mUpdateSlider; bool mClearFaceOnFade; @@ -137,8 +179,7 @@ private: std::string mPreviousURL; F64 mCurrentRate; F64 mMovieDuration; - int mUpdatePercent; - + LLUUID mTargetObjectID; S32 mTargetObjectFace; LLUUID mTargetImplID; diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index ed606d5457..81eb133b07 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -455,7 +455,7 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer) if(!mOverflowToastPanel) return; - mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::closeOverflowToastPanel, this)); + mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onOverflowToastHide, this)); LLTextBox* text_box = mOverflowToastPanel->getChild<LLTextBox>("toast_text"); std::string text = llformat(mOverflowFormatString.c_str(),mHiddenToastsNum); diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 2ed82b7d62..261bdbcfc0 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -359,6 +359,9 @@ void LLSpeakerMgr::updateSpeakerList() LLPointer<LLSpeaker> LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id) { + //In some conditions map causes crash if it is empty(Windows only), adding check (EK) + if (mSpeakers.size() == 0) + return NULL; speaker_map_t::iterator found_it = mSpeakers.find(speaker_id); if (found_it == mSpeakers.end()) { diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 2c59d62b4b..696b0d9af1 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -1691,8 +1691,11 @@ bool idle_startup() //all categories loaded. lets create "My Favorites" category gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE,true); - // lets create "Friends" and "Friends/All" in the Inventory "Calling Cards" and fill it with buddies - LLFriendCardsManager::instance().syncFriendsFolder(); + // Checks whether "Friends" and "Friends/All" folders exist in "Calling Cards" folder, + // fetches their contents if needed and synchronizes it with buddies list. + // If the folders are not found they are created. + LLFriendCardsManager::instance().syncFriendCardsFolders(); + // set up callbacks llinfos << "Registering Callbacks" << llendl; diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 4dccdfd7e6..b649a0c38e 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -109,6 +109,7 @@ const S32 TEXT_HEIGHT = 18; static void onClickBuyCurrency(void*); static void onClickHealth(void*); static void onClickScriptDebug(void*); +static void onClickVolume(void*); std::vector<std::string> LLStatusBar::sDays; std::vector<std::string> LLStatusBar::sMonths; @@ -116,6 +117,12 @@ const U32 LLStatusBar::MAX_DATE_STRING_LENGTH = 2000; LLStatusBar::LLStatusBar(const LLRect& rect) : LLPanel(), + mTextHealth(NULL), + mTextTime(NULL), + mSGBandwidth(NULL), + mSGPacketLoss(NULL), + mBtnBuyCurrency(NULL), + mBtnVolume(NULL), mBalance(0), mHealth(100), mSquareMetersCredit(0), @@ -148,6 +155,11 @@ LLStatusBar::LLStatusBar(const LLRect& rect) mBtnBuyCurrency = getChild<LLButton>( "buycurrency" ); mBtnBuyCurrency->setClickedCallback( onClickBuyCurrency, this ); + mBtnVolume = getChild<LLButton>( "volume_btn" ); + mBtnVolume->setClickedCallback( onClickVolume, this ); + + gSavedSettings.getControl("MuteAudio")->getSignal()->connect(boost::bind(&LLStatusBar::onVolumeChanged, this, _2)); + childSetAction("scriptout", onClickScriptDebug, this); childSetAction("health", onClickHealth, this); @@ -333,6 +345,10 @@ void LLStatusBar::refresh() mSGBandwidth->setVisible(net_stats_visible); mSGPacketLoss->setVisible(net_stats_visible); childSetEnabled("stat_btn", net_stats_visible); + + // update the master volume button state + BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); + mBtnVolume->setToggleState(mute_audio); } void LLStatusBar::setVisibleForMouselook(bool visible) @@ -488,6 +504,13 @@ static void onClickScriptDebug(void*) LLFloaterScriptDebug::show(LLUUID::null); } +static void onClickVolume(void* data) +{ + // toggle the master mute setting + BOOL mute_audio = gSavedSettings.getBOOL("MuteAudio"); + gSavedSettings.setBOOL("MuteAudio", !mute_audio); +} + // sets the static variables necessary for the date void LLStatusBar::setupDate() { @@ -562,6 +585,10 @@ BOOL can_afford_transaction(S32 cost) return((cost <= 0)||((gStatusBar) && (gStatusBar->getBalance() >=cost))); } +void LLStatusBar::onVolumeChanged(const LLSD& newvalue) +{ + refresh(); +} // Implements secondlife:///app/balance/request to request a L$ balance // update via UDP message system. JC diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index d5629e6f1e..3ce3549961 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -91,9 +91,10 @@ private: // simple method to setup the part that holds the date void setupDate(); - static void onCommitSearch(LLUICtrl*, void* data); - static void onClickSearch(void* data); + void onVolumeChanged(const LLSD& newvalue); + static void onClickStatGraph(void* data); + private: LLTextBox *mTextHealth; @@ -103,6 +104,7 @@ private: LLStatGraph *mSGPacketLoss; LLButton *mBtnBuyCurrency; + LLButton *mBtnVolume; S32 mBalance; S32 mHealth; diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 9370e318cf..1ea5f515b7 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -69,7 +69,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mNotification = p.notification; // if message comes from the system - there shouldn't be a reply btn - if(p.from == "Second Life") + if(p.from == SYSTEM_FROM) { mAvatar->setVisible(FALSE); sys_msg_icon->setVisible(TRUE); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 69d4da373e..251d7d4a13 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -54,6 +54,8 @@ #include <boost/bind.hpp> // for SkinFolder listener #include <boost/signals2.hpp> +/*static*/ const char* LLViewerMedia::AUTO_PLAY_MEDIA_SETTING = "AutoPlayMedia"; + // Move this to its own file. LLViewerMediaEventEmitter::~LLViewerMediaEventEmitter() @@ -159,12 +161,21 @@ public: virtual void error( U32 status, const std::string& reason ) { - llwarns << "responder failed with status " << status << ", reason " << reason << llendl; - if(mMediaImpl) + if(status == 401) + { + // This is the "you need to authenticate" status. + // Treat this like an html page. + completeAny(status, "text/html"); + } + else { - mMediaImpl->mMediaSourceFailed = true; + llwarns << "responder failed with status " << status << ", reason " << reason << llendl; + + if(mMediaImpl) + { + mMediaImpl->mMediaSourceFailed = true; + } } - // completeAny(status, "none/none"); } void completeAny(U32 status, const std::string& mime_type) @@ -313,7 +324,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s // If (the media was already loaded OR the media was set to autoplay) AND this update didn't come from this agent, // do a navigate. - if((was_loaded || (media_entry->getAutoPlay() && gSavedSettings.getBOOL("AutoPlayMedia"))) && !update_from_self) + if((was_loaded || (media_entry->getAutoPlay() && gSavedSettings.getBOOL(AUTO_PLAY_MEDIA_SETTING))) && !update_from_self) { needs_navigate = (media_entry->getCurrentURL() != previous_url); } @@ -330,7 +341,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s media_impl->setHomeURL(media_entry->getHomeURL()); - if(media_entry->getAutoPlay() && gSavedSettings.getBOOL("AutoPlayMedia")) + if(media_entry->getAutoPlay() && gSavedSettings.getBOOL(AUTO_PLAY_MEDIA_SETTING)) { needs_navigate = true; } @@ -1704,7 +1715,7 @@ LLViewerMediaTexture* LLViewerMediaImpl::updatePlaceholderImage() // MEDIAOPT: seems insane that we actually have to make an imageraw then // immediately discard it LLPointer<LLImageRaw> raw = new LLImageRaw(texture_width, texture_height, texture_depth); - raw->clear(0x0f, 0x0f, 0x0f, 0xff); + raw->clear(0x00, 0x00, 0x00, 0xff); int discard_level = 0; // ask media source for correct GL image format constants diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 719deb28bf..639aed4b8a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -74,6 +74,9 @@ class LLViewerMedia LOG_CLASS(LLViewerMedia); public: + // String to get/set media autoplay in gSavedSettings + static const char *AUTO_PLAY_MEDIA_SETTING; + typedef std::vector<LLViewerMediaImpl*> impl_list; // Special case early init for just web browser component diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 1890e0bf1d..200ecbc6d6 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1366,7 +1366,9 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) payload["from_id"] = info->mFromID; args["OBJECTFROMNAME"] = info->mFromName; - args["NAME"] = info->mFromName; + args["NAME"] = LLSLURL::buildCommand("agent", info->mFromID, "about"); + std::string verb = "highlight?name=" + msg; + args["ITEM_SLURL"] = LLSLURL::buildCommand("inventory", info->mObjectID, verb.c_str()); LLNotification::Params p("ObjectGiveItem"); p.substitutions(args).payload(payload).functor.function(boost::bind(&LLOfferInfo::inventory_offer_callback, info, _1, _2)); diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 336d7f684e..7559fd8e72 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -324,10 +324,36 @@ std::string LLViewerParcelMedia::getMimeType() { return sMediaImpl.notNull() ? sMediaImpl->getMimeType() : "none/none"; } + +//static +std::string LLViewerParcelMedia::getURL() +{ + std::string url; + if(sMediaImpl.notNull()) + url = sMediaImpl->getMediaURL(); + + if (url.empty()) + url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaCurrentURL(); + + if (url.empty()) + url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaURL(); + + return url; +} + +//static +std::string LLViewerParcelMedia::getName() +{ + if(sMediaImpl.notNull()) + return sMediaImpl->getName(); + return ""; +} + viewer_media_t LLViewerParcelMedia::getParcelMedia() { return sMediaImpl; } + ////////////////////////////////////////////////////////////////////////////////////////// // static void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg, void ** ) diff --git a/indra/newview/llviewerparcelmedia.h b/indra/newview/llviewerparcelmedia.h index 3f7f898356..19e1ef78d4 100644 --- a/indra/newview/llviewerparcelmedia.h +++ b/indra/newview/llviewerparcelmedia.h @@ -71,6 +71,8 @@ class LLViewerParcelMedia : public LLViewerMediaObserver static LLPluginClassMediaOwner::EMediaStatus getStatus(); static std::string getMimeType(); + static std::string getURL(); + static std::string getName(); static viewer_media_t getParcelMedia(); static void processParcelMediaCommandMessage( LLMessageSystem *msg, void ** ); diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 703a13976c..dbcf563010 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -1467,14 +1467,14 @@ struct UIImageDeclaration : public LLInitParam::Block<UIImageDeclaration> Mandatory<std::string> name; Optional<std::string> file_name; Optional<bool> preload; - Optional<LLRect> scale_rect; + Optional<LLRect> scale; Optional<bool> use_mips; UIImageDeclaration() : name("name"), file_name("file_name"), preload("preload", false), - scale_rect("scale"), + scale("scale"), use_mips("use_mips", false) {} }; @@ -1564,7 +1564,7 @@ bool LLUIImageList::initFromFile() { continue; } - preloadUIImage(image_it->name, file_name, image_it->use_mips, image_it->scale_rect); + preloadUIImage(image_it->name, file_name, image_it->use_mips, image_it->scale); } if (cur_pass == PASS_DECODE_NOW && !gSavedSettings.getBOOL("NoPreload")) diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp index d93913b944..ae32ec7d11 100644 --- a/indra/newview/llvoicechannel.cpp +++ b/indra/newview/llvoicechannel.cpp @@ -870,29 +870,60 @@ void LLVoiceChannelP2P::setSessionHandle(const std::string& handle, const std::s void LLVoiceChannelP2P::setState(EState state) { - // HACK: Open/close the call window if needed. + // *HACK: Open/close the call window if needed. toggleCallWindowIfNeeded(state); - // *HACK: open outgoing call floater if needed, might be better done elsewhere. - mCallDialogPayload["session_id"] = mSessionID; - mCallDialogPayload["session_name"] = mSessionName; - mCallDialogPayload["other_user_id"] = mOtherUserID; - if (!mReceivedCall && state == STATE_RINGING) - { - llinfos << "RINGINGGGGGGGG " << mSessionName << llendl; - if (!mSessionName.empty()) + if (mReceivedCall) // incoming call + { + // you only "answer" voice invites in p2p mode + // so provide a special purpose message here + if (mReceivedCall && state == STATE_RINGING) { - LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE); + gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); + doSetState(state); + return; } } - - // you only "answer" voice invites in p2p mode - // so provide a special purpose message here - if (mReceivedCall && state == STATE_RINGING) + else // outgoing call { - gIMMgr->addSystemMessage(mSessionID, "answering", mNotifyArgs); - doSetState(state); - return; + mCallDialogPayload["session_id"] = mSessionID; + mCallDialogPayload["session_name"] = mSessionName; + mCallDialogPayload["other_user_id"] = mOtherUserID; + if (state == STATE_RINGING) + { + // *HACK: open outgoing call floater if needed, might be better done elsewhere. + // *TODO: should move this squirrelly ui-fudging crap into LLOutgoingCallDialog itself + if (!mSessionName.empty()) + { + LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->getChild<LLTextBox>("calling")->setVisible(true); + ocd->getChild<LLTextBox>("leaving")->setVisible(true); + ocd->getChild<LLTextBox>("connecting")->setVisible(false); + } + } + } + /*else if (state == STATE_CONNECTED) + { + LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->getChild<LLTextBox>("calling")->setVisible(false); + ocd->getChild<LLTextBox>("leaving")->setVisible(false); + ocd->getChild<LLTextBox>("connecting")->setVisible(true); + } + }*/ + else if (state == STATE_HUNG_UP || + state == STATE_CONNECTED) + { + LLOutgoingCallDialog *ocd = dynamic_cast<LLOutgoingCallDialog*>(LLFloaterReg::showInstance("outgoing_call", mCallDialogPayload, TRUE)); + if (ocd) + { + ocd->closeFloater(); + } + } } + LLVoiceChannel::setState(state); } diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index eea2dfb1a1..1c2f6a235e 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -1,3 +1,33 @@ +<!-- +This file contains metadata about how to load, display, and scale textures for rendering in the UI. +Images do *NOT* have to appear in this file in order to use them as textures in the UI...simply refer +to them by filename (relative to textures directory). +NOTE: if you want to reuse an image file with different metadata, simply create a new texture entry +with the same filename but different name + +<texture + name="MyTexture" (mandatory) + - this is the name you reference the texture by in XUI. For example, <button image_unselected="MyTexture"/> + file_name="images/my_texture.png" (optional) + - this is the path to the actual file asset, relative to the current skins "textures" directory. + If not supplied, the filename will be taken from the texture name itself, "MyTexture" in this case. + NOTE: you need to provide an extension on the filename (".png", ".tga", ".jpg") for us to decode the image properly + preload="true" (optional, false by default) + - If true, we will attempt to load the image before displaying any UI. + If false, we will load in the background after initializing the UI. + use_mips="true" (currently unused) + scale.left="1" + scale.bottom="1" + scale.top="15" + scale.right="31" + - Specifies the segmentation for 9-slice image scaling. Specifically, the pixel offsets from the LOWER LEFT corner + that define the region of the image that is stretched to make the whole image fit in the required space. + In this example, if the source image is 32x16 pixels, we have defined a center region that starts one pixel up + and to the right from the bottom left corner and extends to 31 pixels right and 15 pixels up from the bottom left + corner. The end result is that the image will keep a 1 pixel border all around while stretching to fit the required + region. +--> + <textures version="101"> <!-- Please add new files alphabetically to prevent merge conflicts. JC --> <texture name="Accordion_ArrowClosed_Off" file_name="containers/Accordion_ArrowClosed_Off.png" preload="false" /> @@ -23,13 +53,13 @@ <texture name="Arrow_Up" file_name="widgets/Arrow_Up.png" preload="true" /> <texture name="Arrow_Down" file_name="widgets/Arrow_Down.png" preload="true" /> - <texture name="AudioMute_Off.png" file_name="icons/AudioMute_Off.png" preload="false" /> - <texture name="AudioMute_Over.png" file_name="icons/AudioMute_Over.png" preload="false" /> - <texture name="AudioMute_Press.png" file_name="icons/AudioMute_Press.png" preload="false" /> + <texture name="AudioMute_Off" file_name="icons/AudioMute_Off.png" preload="false" /> + <texture name="AudioMute_Over" file_name="icons/AudioMute_Over.png" preload="false" /> + <texture name="AudioMute_Press" file_name="icons/AudioMute_Press.png" preload="false" /> - <texture name="Audio_Off.png" file_name="icons/Audio_Off.png" preload="false" /> - <texture name="Audio_Over.png" file_name="icons/Audio_Over.png" preload="false" /> - <texture name="Audio_Press.png" file_name="icons/Audio_Press.png" preload="false" /> + <texture name="Audio_Off" file_name="icons/Audio_Off.png" preload="false" /> + <texture name="Audio_Over" file_name="icons/Audio_Over.png" preload="false" /> + <texture name="Audio_Press" file_name="icons/Audio_Press.png" preload="false" /> <texture name="BackArrow_Disabled" file_name="icons/BackArrow_Disabled.png" preload="false" /> <texture name="BackArrow_Off" file_name="icons/BackArrow_Off.png" preload="false" /> @@ -109,9 +139,9 @@ <texture name="DropTarget" file_name="widgets/DropTarget.png" preload="false" /> - <texture name="ExternalBrowser_Off.png" file_name="icons/ExternalBrowser_Off.png" preload="false" /> - <texture name="ExternalBrowser_Over.png" file_name="icons/ExternalBrowser_Over.png" preload="false" /> - <texture name="ExternalBrowser_Press.png" file_name="icons/ExternalBrowser_Press.png" preload="false" /> + <texture name="ExternalBrowser_Off" file_name="icons/ExternalBrowser_Off.png" preload="false" /> + <texture name="ExternalBrowser_Over" file_name="icons/ExternalBrowser_Over.png" preload="false" /> + <texture name="ExternalBrowser_Press" file_name="icons/ExternalBrowser_Press.png" preload="false" /> <texture name="Favorite_Star_Active" file_name="navbar/Favorite_Star_Active.png" preload="false" /> <texture name="Favorite_Star_Off" file_name="navbar/Favorite_Star_Off.png" preload="false" /> @@ -338,12 +368,12 @@ <texture name="parcel_lght_Voice" file_name="icons/parcel_lght_Voice.png" preload="false" /> <texture name="parcel_lght_VoiceNo" file_name="icons/parcel_lght_VoiceNo.png" preload="false" /> - <texture name="Pause_Off.png" file_name="icons/Pause_Off.png" preload="false" /> - <texture name="Pause_Over.png" file_name="icons/Pause_Over.png" preload="false" /> - <texture name="Pause_Press.png" file_name="icons/Pause_Press.png" preload="false" /> - <texture name="Play_Off.png" file_name="icons/Play_Off.png" preload="false" /> - <texture name="Play_Over.png" file_name="icons/Play_Over.png" preload="false" /> - <texture name="Play_Press.png" file_name="icons/Play_Press.png" preload="false" /> + <texture name="Pause_Off" file_name="icons/Pause_Off.png" preload="false" /> + <texture name="Pause_Over" file_name="icons/Pause_Over.png" preload="false" /> + <texture name="Pause_Press" file_name="icons/Pause_Press.png" preload="false" /> + <texture name="Play_Off" file_name="icons/Play_Off.png" preload="false" /> + <texture name="Play_Over" file_name="icons/Play_Over.png" preload="false" /> + <texture name="Play_Press" file_name="icons/Play_Press.png" preload="false" /> <texture name="Progress_1" file_name="icons/Progress_1.png" preload="false" /> <texture name="Progress_2" file_name="icons/Progress_2.png" preload="false" /> @@ -425,12 +455,12 @@ <texture name="SegmentedBtn_Right_Selected_Press" file_name="widgets/SegmentedBtn_Right_Selected_Press.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> <texture name="SegmentedBtn_Right_Selected_Disabled" file_name="widgets/SegmentedBtn_Right_Selected_Disabled.png" preload="true" scale.left="4" scale.top="19" scale.right="22" scale.bottom="4" /> - <texture name="SkipBackward_Off.png" file_name="icons/SkipBackward_Off.png" preload="false" /> - <texture name="SkipBackward_Over.png" file_name="icons/SkipBackward_Over.png" preload="false" /> - <texture name="SkipBackward_Press.png" file_name="icons/SkipBackward_Press.png" preload="false" /> - <texture name="SkipForward_Off.png" file_name="icons/SkipForward_Off.png" preload="false" /> - <texture name="SkipForward_Over.png" file_name="icons/SkipForward_Over.png" preload="false" /> - <texture name="SkipForward_Press.png" file_name="icons/SkipForward_Press.png" preload="false" /> + <texture name="SkipBackward_Off" file_name="icons/SkipBackward_Off.png" preload="false" /> + <texture name="SkipBackward_Over" file_name="icons/SkipBackward_Over.png" preload="false" /> + <texture name="SkipBackward_Press" file_name="icons/SkipBackward_Press.png" preload="false" /> + <texture name="SkipForward_Off" file_name="icons/SkipForward_Off.png" preload="false" /> + <texture name="SkipForward_Over" file_name="icons/SkipForward_Over.png" preload="false" /> + <texture name="SkipForward_Press" file_name="icons/SkipForward_Press.png" preload="false" /> <texture name="SliderTrack_Horiz" file_name="widgets/SliderTrack_Horiz.png" scale.left="4" scale.top="4" scale.right="100" scale.bottom="2" /> <texture name="SliderTrack_Vert" file_name="widgets/SliderTrack_Vert.png" scale.left="2" scale.top="100" scale.right="4" scale.bottom="4" /> @@ -449,9 +479,9 @@ <texture name="Stepper_Up_Off" file_name="widgets/Stepper_Up_Off.png" preload="true" /> <texture name="Stepper_Up_Press" file_name="widgets/Stepper_Up_Press.png" preload="true" /> - <texture name="StopReload_Off.png" file_name="icons/StopReload_Off.png" preload="false" /> - <texture name="StopReload_Over.png" file_name="icons/StopReload_Over.png" preload="false" /> - <texture name="StopReload_Press.png" file_name="icons/StopReload_Press.png" preload="false" /> + <texture name="StopReload_Off" file_name="icons/StopReload_Off.png" preload="false" /> + <texture name="StopReload_Over" file_name="icons/StopReload_Over.png" preload="false" /> + <texture name="StopReload_Press" file_name="icons/StopReload_Press.png" preload="false" /> <texture name="TabIcon_Appearance_Large" file_name="taskpanel/TabIcon_Appearance_Large.png" preload="false" /> <texture name="TabIcon_Appearance_Off" file_name="taskpanel/TabIcon_Appearance_Off.png" preload="false" /> @@ -531,7 +561,7 @@ <texture name="Toolbar_Right_Off" file_name="containers/Toolbar_Right_Off.png" preload="false" /> <texture name="Toolbar_Right_Press" file_name="containers/Toolbar_Right_Press.png" preload="false" /> <texture name="Toolbar_Right_Selected" file_name="containers/Toolbar_Right_Selected.png" preload="false" /> - + <texture name="Tooltip" file_name="widgets/Tooltip.png" preload="true" scale.left="2" scale.top="16" scale.right="100" scale.bottom="3" /> <texture name="TrashItem_Disabled" file_name="icons/TrashItem_Disabled.png" preload="false" /> @@ -563,9 +593,9 @@ <texture name="YouAreHere_Badge" file_name="icons/YouAreHere_Badge.png" preload="false" /> - <texture name="Zoom_Off.png" file_name="icons/Zoom_Off.png" preload="false" /> - <texture name="Zoom_Over.png" file_name="icons/Zoom_Over.png" preload="false" /> - <texture name="Zoom_Press.png" file_name="icons/Zoom_Press.png" preload="false" /> + <texture name="Zoom_Off" file_name="icons/Zoom_Off.png" preload="false" /> + <texture name="Zoom_Over" file_name="icons/Zoom_Over.png" preload="false" /> + <texture name="Zoom_Press" file_name="icons/Zoom_Press.png" preload="false" /> <!--WARNING OLD ART *do not use*--> diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml index 2af451400e..f553184c19 100644 --- a/indra/newview/skins/default/xui/en/floater_camera.xml +++ b/indra/newview/skins/default/xui/en/floater_camera.xml @@ -107,6 +107,7 @@ image_unselected="Cam_Rotate_Out" layout="topleft" left="45" + mouse_opaque="false" name="cam_rotate_stick" quadrant="left" scale_image="false" diff --git a/indra/newview/skins/default/xui/en/floater_gesture.xml b/indra/newview/skins/default/xui/en/floater_gesture.xml index b23482655c..a3ac878202 100644 --- a/indra/newview/skins/default/xui/en/floater_gesture.xml +++ b/indra/newview/skins/default/xui/en/floater_gesture.xml @@ -84,21 +84,21 @@ top_delta="0" width="18" /> <button - follows="bottom|left" + follows="bottom|right" font="SansSerifBigBold" height="18" image_selected="TrashItem_Press" image_unselected="TrashItem_Off" image_disabled="TrashItem_Disabled" layout="topleft" - left_pad="230" name="del_btn" + right="-5" tool_tip="Delete this gesture" top_delta="0" width="18" /> </panel> <button - follows="bottom|right" + follows="left|bottom" height="23" label="Edit" layout="topleft" @@ -107,7 +107,7 @@ top_pad="5" width="83" /> <button - follows="bottom|right" + follows="left|bottom" height="23" label="Play" layout="topleft" @@ -116,7 +116,7 @@ top_delta="0" width="83" /> <button - follows="bottom|right" + follows="left|bottom" height="23" label="Stop" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index 9c2898945b..526fda90d1 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -12,7 +12,7 @@ width="410"> <floater.string name="localchat"> - Local Voice Chat + Nearby Voice Chat </floater.string> <floater.string name="anonymous"> diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index 44956f7e52..82417de8a7 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -12,7 +12,7 @@ width="410"> <floater.string name="localchat"> - Local Voice Chat + Nearby Voice Chat </floater.string> <floater.string name="anonymous"> @@ -40,6 +40,18 @@ height="20" layout="topleft" left="77" + name="connecting" + top="27" + visible="false" + width="315" + word_wrap="true"> +Connecting to [CALLEE_NAME] + </text> + <text + font="SansSerifLarge" + height="20" + layout="topleft" + left="77" name="calling" top="27" width="315" diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml index 6dd44255bf..304492bedb 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml @@ -13,15 +13,11 @@ function="CheckControl" parameter="GroupListShowIcons" /> </menu_item_check> - <menu_item_check + <menu_item_call label="Leave Selected Group" layout="topleft" name="Leave Selected Group"> - <menu_item_check.on_click - function="People.Groups.ViewSort.Action" - parameter="show_icons" /> - <menu_item_check.on_check - function="CheckControl" - parameter="GroupListShowIcons" /> - </menu_item_check> + <menu_item_call.on_click + function="People.Group.Minus.Action"/> + </menu_item_call> </menu> diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ff0cd7ffeb..6e5d8dc2b8 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4957,8 +4957,9 @@ No valid parcel could be found. <notification icon="notify.tga" name="ObjectGiveItem" - type="notify"> -An object named [OBJECTFROMNAME] owned by [FIRST] [LAST] has given you a [OBJECTTYPE] named [OBJECTNAME]. + type="offer"> +An object named [OBJECTFROMNAME] owned by [NAME] has offered you [OBJECTTYPE]: +[ITEM_SLURL] <form name="form"> <button index="0" @@ -5000,7 +5001,8 @@ An object named [OBJECTFROMNAME] owned by (an unknown Resident) has given you a icon="notify.tga" name="UserGiveItem" type="offer"> -[NAME] has given you a [OBJECTTYPE] named '[OBJECTNAME]'. +[NAME] has offered you [OBJECTTYPE]: +[ITEM_SLURL] <form name="form"> <button index="0" @@ -5585,7 +5587,7 @@ We're sorry. This area has reached maximum capacity for voice conversation icon="notifytip.tga" name="VoiceChannelDisconnected" type="notifytip"> -You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to spatial voice chat. +You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5595,7 +5597,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect icon="notifytip.tga" name="VoiceChannelDisconnectedP2P" type="notifytip"> -[VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to spatial voice chat. +[VOICE_CHANNEL_NAME] has ended the call. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5605,7 +5607,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect icon="notifytip.tga" name="P2PCallDeclined" type="notifytip"> -[VOICE_CHANNEL_NAME] has declined your call. You will now be reconnected to spatial voice chat. +[VOICE_CHANNEL_NAME] has declined your call. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5615,7 +5617,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect icon="notifytip.tga" name="P2PCallNoAnswer" type="notifytip"> -[VOICE_CHANNEL_NAME] is not available to take your call. You will now be reconnected to spatial voice chat. +[VOICE_CHANNEL_NAME] is not available to take your call. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5625,7 +5627,7 @@ You have been disconnected from [VOICE_CHANNEL_NAME]. You will now be reconnect icon="notifytip.tga" name="VoiceChannelJoinFailed" type="notifytip"> -Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now be reconnected to spatial voice chat. +Failed to connect to [VOICE_CHANNEL_NAME], please try again later. You will now be reconnected to Nearby Voice Chat. <unique> <context key="VOICE_CHANNEL_NAME"/> </unique> @@ -5739,6 +5741,15 @@ Are you sure you want to delete your teleport history? yestext="OK"/> </notification> + <notification + icon="alert.tga" + name="BottomTrayButtonCanNotBeShown" + type="alert"> +Selected button can not be shown right now. +The button will be shown when there is enough space for it. + </notification> + + <global name="UnsupportedCPU"> - Your CPU speed does not meet the minimum requirements. </global> diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml index 5562ec8406..3ed91cb48f 100644 --- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml +++ b/indra/newview/skins/default/xui/en/panel_activeim_row.xml @@ -7,7 +7,9 @@ left="0" height="35" width="318" - background_visible="false"> + background_opaque="false" + background_visible="true" + bg_alpha_color="0.0 0.0 0.0 0.0" > <chiclet_im_p2p name="p2p_chiclet" layout="topleft" diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 3c16a439d9..a902f50582 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -333,6 +333,6 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_width="4" right="-1" top="0" - width="26"/> + width="4"/> </layout_stack> </panel> diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml index ef3120174e..fa7fc34239 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notify.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml @@ -1,52 +1,78 @@ <?xml version="1.0" encoding="utf-8" standalone="yes" ?> -<panel background_visible="true" bevel_style="in" bg_alpha_color="0 0 0 0" - height="155" label="instant_message" layout="topleft" left="0" - name="panel_group_notify" top="0" width="350"> +<panel + background_visible="true" + bevel_style="in" + bg_alpha_color="0 0 0 0" + height="135" + label="instant_message" + layout="topleft" + left="0" + name="panel_group_notify" + top="0" + width="305"> <string - name="message_max_lines_count"> - 4 - </string> - <panel follows="top" background_visible="true" bevel_style="in" bg_alpha_color="black" - height="30" label="header" layout="topleft" left="0" name="header" - top="0" width="350"> - <icon follows="left|top|right|bottom" height="20" width="20" layout="topleft" - top="5" left="5" mouse_opaque="true" name="group_icon"/> - <text type="string" length="1" follows="left|top|right|bottom" - font="SansSerifBigBold" height="20" layout="topleft" left_pad="10" name="title" - text_color="GroupNotifyTextColor" top="5" width="275" use_ellipses="true"> - Sender Name / Group Name - </text> - </panel> - <text + name="message_max_lines_count" + value="4" /> + <panel + background_visible="true" + bevel_style="in" + bg_alpha_color="black" follows="top" + height="30" + label="header" + layout="topleft" + left="0" + name="header" + top="0" + width="305"> + <icon + follows="left|top|right|bottom" + height="20" + layout="topleft" + left="5" + mouse_opaque="true" + name="group_icon" + top="5" + width="20" /> + <text + follows="left|top|right|bottom" + font="SansSerifBigBold" + height="20" + layout="topleft" + left_pad="10" + name="title" + text_color="GroupNotifyTextColor" + top="5" + use_ellipses="true" + value="Sender Name / Group Name" + width="230" /> + </panel> + <text + follows="top" + font="SansSerifBig" height="20" layout="topleft" left="25" name="subject" text_color="GroupNotifyTextColor" - font="SansSerifBig" top="40" use_ellipses="true" value="subject" - width="300" - word_wrap="true"> - subject - </text> + width="270" + wrap="true" /> <text follows="top" + font="SansSerif" height="20" layout="topleft" left="25" name="datetime" text_color="GroupNotifyTextColor" - font="SansSerif" top="80" use_ellipses="true" value="datetime" - width="300" - word_wrap="true"> - datetime - </text> + width="270" + wrap="true" /> <text follows="left|top|bottom|right" height="0" @@ -57,21 +83,35 @@ top="100" use_ellipses="true" value="message" - width="300" - word_wrap="true" - visible="true" > - </text> + width="270" + wrap="true" /> <icon - follows="left|bottom|right" height="15" width="15" - layout="topleft" bottom="122" left="25" mouse_opaque="true" name="attachment_icon" visible="true" - /> - <text font="SansSerif" font.style="UNDERLINE" font_shadow="none" - type="string" length="1" follows="left|bottom|right" layout="topleft" - left="45" bottom="122" height="15" width="280" name="attachment" - text_color="GroupNotifyTextColor" visible="true"> - Attachment - </text> - - <button label="OK" layout="topleft" bottom="145" left="140" height="20" - width="70" name="btn_ok" follows="bottom" /> -</panel>
\ No newline at end of file + bottom="122" + follows="left|bottom|right" + height="15" + layout="topleft" + left="25" + mouse_opaque="true" + name="attachment_icon" + width="15" /> + <text + bottom="122" + follows="left|bottom|right" + font="SansSerif" + height="15" + layout="topleft" + left="45" + name="attachment" + text_color="GroupNotifyTextColor" + value="Attachment" + width="280" /> + <button + bottom="130" + follows="bottom" + height="20" + label="OK" + layout="topleft" + left="25" + name="btn_ok" + width="70" /> +</panel> diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index a77094e942..ecf35523cd 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -23,7 +23,7 @@ layout="topleft" left_delta="7" left="0" - max_length="254" + max_length="512" name="chat_box" tool_tip="Press Enter to say, Ctrl+Enter to shout" top="0" diff --git a/indra/newview/skins/default/xui/en/panel_notification.xml b/indra/newview/skins/default/xui/en/panel_notification.xml index 34a185fb44..462188ee24 100644 --- a/indra/newview/skins/default/xui/en/panel_notification.xml +++ b/indra/newview/skins/default/xui/en/panel_notification.xml @@ -10,7 +10,7 @@ left="0" name="notification_panel" top="0" - height="10" + height="140" width="305"> <!-- THIS PANEL CONTROLS TOAST HEIGHT? --> <panel @@ -20,18 +20,18 @@ bg_alpha_color="0.3 0.3 0.3 0" bg_opaque_color="0.3 0.3 0.3 0" follows="left|right|top" - height="10" + height="100" label="info_panel" layout="topleft" left="0" name="info_panel" top="0" width="305"> - <!-- <text + <text border_visible="false" follows="left|right|top|bottom" font="SansSerif" - height="90" + height="85" layout="topleft" left="10" name="text_box" @@ -39,21 +39,21 @@ text_color="white" top="10" visible="false" - width="300" + width="285" wrap="true"/> <text border_visible="false" follows="left|right|top|bottom" font="SansSerifBold" - height="90" + height="85" layout="topleft" - left="45" + left="10" name="caution_text_box" text_color="1 0.82 0.46 1" - top="5" + top="10" visible="false" - width="300" - wrap="true"/> --> + width="285" + wrap="true"/> <text_editor h_pad="0" v_pad="0" @@ -63,6 +63,7 @@ enabled="false" follows="left|right|top|bottom" font="SansSerif" + height="85" layout="topleft" left="10" mouse_opaque="false" @@ -74,17 +75,20 @@ top="10" visible="false" width="285" - wrap="true"/> + wrap="true" + parse_highlights="true" + allow_html="true"/> </panel> <panel background_visible="false" follows="left|right|bottom" + height="40" label="control_panel" layout="topleft" left="0" left_delta="-38" name="control_panel" - top="20"> + top_pad="0"> </panel> <!-- <icon diff --git a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml index 3bdd7114ee..70c5d7b823 100644 --- a/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml +++ b/indra/newview/skins/default/xui/en/panel_prim_media_controls.xml @@ -2,19 +2,18 @@ <panel follows="left|right|top|bottom" name="MediaControls" - bg_alpha_color="1 1 1 0" + background_visible="false" height="160" layout="topleft" mouse_opaque="false" width="800"> + <string name="control_background_image_name">Inspector_Background</string> <panel name="media_region" bottom="125" follows="left|right|top|bottom" layout="topleft" - left="20" mouse_opaque="false" - right="-20" top="20" /> <layout_stack follows="left|right|bottom" @@ -33,6 +32,7 @@ name="media_progress_indicator" height="22" layout="topleft" + visible="false" left="0" top="0" auto_resize="false" @@ -64,6 +64,7 @@ top="128"> <!-- outer layout_panels center the inner one --> <layout_panel + name="left_bookend" width="0" layout="topleft" user_resize="false" /> @@ -83,6 +84,7 @@ layout="topleft" tool_tip="Step back" width="22" + left="0" top_delta="4"> <button.commit_callback function="MediaCtrl.Back" /> @@ -109,22 +111,22 @@ function="MediaCtrl.Forward" /> </button> </layout_panel> -<!-- - <panel + <!-- + <panel height="22" layout="topleft" auto_resize="false" min_width="3" width="3"> - <icon - height="22" - image_name="media_panel_divider.png" - layout="topleft" - top="0" - min_width="3" - width="3" /> - </panel> ---> + <icon + height="22" + image_name="media_panel_divider.png" + layout="topleft" + top="0" + min_width="3" + width="3" /> + </panel> + --> <layout_panel name="home" auto_resize="false" @@ -165,22 +167,22 @@ function="MediaCtrl.Stop" /> </button> </layout_panel> -<!-- - <panel + <!-- + <panel height="22" layout="topleft" auto_resize="false" min_width="3" width="3"> - <icon - height="22" - image_name="media_panel_divider.png" - layout="topleft" - top="0" - min_width="3" - width="3" /> - </panel> ---> + <icon + height="22" + image_name="media_panel_divider.png" + layout="topleft" + top="0" + min_width="3" + width="3" /> + </panel> + --> <layout_panel name="reload" auto_resize="false" @@ -294,31 +296,43 @@ function="MediaCtrl.CommitURL" /> function="MediaCtrl.CommitURL"/> </line_editor> <layout_stack + name="media_address_url_icons" animate="false" follows="right" - width="32" - min_width="32" - height="16" - top="3" - orientation="horizontal" - left_pad="-38"> - <icon - name="media_whitelist_flag" - follows="top|right" - height="16" - image_name="smicon_warn.tga" + height="20" + width="38" + right="-2" + top="-1" + orientation="horizontal"> + <layout_panel layout="topleft" - tool_tip="White List enabled" - min_width="16" - width="16" /> - <icon - name="media_secure_lock_flag" - height="16" - image_name="inv_item_eyes.tga" + width="16" + auto_resize="false" + user_resize="false"> + <icon + name="media_whitelist_flag" + follows="top|right" + height="16" + image_name="smicon_warn.tga" + layout="topleft" + tool_tip="White List enabled" + min_width="16" + width="16" /> + </layout_panel> + <layout_panel layout="topleft" - tool_tip="Secured Browsing" - min_width="16" - width="16" /> + width="16" + auto_resize="false" + user_resize="false"> + <icon + name="media_secure_lock_flag" + height="16" + image_name="icon_lock.tga" + layout="topleft" + tool_tip="Secured Browsing" + min_width="16" + width="16" /> + </layout_panel> </layout_stack> </layout_panel> <layout_panel @@ -412,9 +426,9 @@ function="MediaCtrl.CommitURL" /> </button> </layout_panel> <!-- Scroll pad --> -<!-- -disabled - <layout_panel + <!-- + disabled + <layout_panel name="media_panel_scroll" auto_resize="false" user_resize="false" @@ -423,64 +437,64 @@ disabled layout="topleft" min_width="32" width="32"> - <icon - height="32" - image_name="media_panel_scrollbg.png" - layout="topleft" - top="0" - min_width="32" - width="32" /> - <button - name="scrollup" - height="8" - image_selected="media_btn_scrollup.png" - image_unselected="media_btn_scrollup.png" - layout="topleft" - tool_tip="Scroll up" - scale_image="false" - left="12" - top_delta="4" - min_width="8" - width="8" /> - <button - name="scrollleft" - height="8" - image_selected="media_btn_scrollleft.png" - image_unselected="media_btn_scrollleft.png" - layout="topleft" - left="3" - tool_tip="Scroll left" - scale_image="false" - top="12" - min_width="8" - width="8" /> - <button - name="scrollright" - height="8" - image_selected="media_btn_scrollright.png" - image_unselected="media_btn_scrollright.png" - layout="topleft" - left_pad="9" - tool_tip="Scroll right" - scale_image="false" - top_delta="0" - min_width="8" - width="8" /> - <button - name="scrolldown" - height="8" - image_selected="media_btn_scrolldown.png" - image_unselected="media_btn_scrolldown.png" - layout="topleft" - left="12" - tool_tip="Scroll down" - scale_image="false" - top="20" - min_width="8" - width="8" /> - </layout_panel> -disabled ---> + <icon + height="32" + image_name="media_panel_scrollbg.png" + layout="topleft" + top="0" + min_width="32" + width="32" /> + <button + name="scrollup" + height="8" + image_selected="media_btn_scrollup.png" + image_unselected="media_btn_scrollup.png" + layout="topleft" + tool_tip="Scroll up" + scale_image="false" + left="12" + top_delta="4" + min_width="8" + width="8" /> + <button + name="scrollleft" + height="8" + image_selected="media_btn_scrollleft.png" + image_unselected="media_btn_scrollleft.png" + layout="topleft" + left="3" + tool_tip="Scroll left" + scale_image="false" + top="12" + min_width="8" + width="8" /> + <button + name="scrollright" + height="8" + image_selected="media_btn_scrollright.png" + image_unselected="media_btn_scrollright.png" + layout="topleft" + left_pad="9" + tool_tip="Scroll right" + scale_image="false" + top_delta="0" + min_width="8" + width="8" /> + <button + name="scrolldown" + height="8" + image_selected="media_btn_scrolldown.png" + image_unselected="media_btn_scrolldown.png" + layout="topleft" + left="12" + tool_tip="Scroll down" + scale_image="false" + top="20" + min_width="8" + width="8" /> + </layout_panel> + disabled + --> <layout_panel name="zoom_frame" auto_resize="false" @@ -520,22 +534,22 @@ disabled function="MediaCtrl.Close" /> </button> </layout_panel> -<!-- - <panel + <!-- + <panel height="22" layout="topleft" auto_resize="false" min_width="3" width="3"> - <icon - height="22" - image_name="media_panel_divider.png" - layout="topleft" - top="0" - min_width="3" - width="3" /> - </panel> ---> + <icon + height="22" + image_name="media_panel_divider.png" + layout="topleft" + top="0" + min_width="3" + width="3" /> + </panel> + --> <layout_panel name="new_window" auto_resize="false" @@ -556,23 +570,25 @@ disabled function="MediaCtrl.Open" /> </button> </layout_panel> -<!-- - <panel + <!-- + <panel height="22" layout="topleft" auto_resize="false" min_width="3" width="3"> - <icon - height="22" - image_name="media_panel_divider.png" - layout="topleft" - top="0" - min_width="3" - width="3" /> - </panel> ---> + <icon + height="22" + image_name="media_panel_divider.png" + layout="topleft" + top="0" + min_width="3" + width="3" /> + </panel> + --> + <!-- bookend panel --> <layout_panel + name="right_bookend" width="0" layout="topleft" user_resize="false" /> 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 1171a8f0b5..8fc78c6701 100644 --- a/indra/newview/skins/default/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml @@ -46,14 +46,24 @@ font="SansSerifSmall" image_selected="BuyArrow_Over" image_unselected="BuyArrow_Off" - image_pressed="BuyArrow_Press" + image_pressed="BuyArrow_Press" height="16" - left="-220" + left="-245" name="buycurrency" pad_right="22px" tool_tip="My Balance: Click to buy more L$" top="1" width="117" /> + <button + follows="right|bottom" + height="16" + image_selected="parcel_drk_VoiceNo" + image_unselected="parcel_drk_Voice" + is_toggle="true" + left_pad="15" + top="1" + name="volume_btn" + width="16" /> <text type="string" length="1" @@ -61,9 +71,9 @@ follows="right|bottom" halign="right" height="16" - top="3" + top="5" layout="topleft" - left_pad="15" + left_pad="7" name="TimeText" text_color="TimeTextColor" tool_tip="Current time (Pacific)" diff --git a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml index 7722583ce2..ccb57b6552 100644 --- a/indra/newview/skins/default/xui/en/panel_sys_well_item.xml +++ b/indra/newview/skins/default/xui/en/panel_sys_well_item.xml @@ -9,7 +9,10 @@ width="300" height="35" layout="topleft" - follows="left|right"> + follows="left|right" + background_opaque="false" + background_visible="true" + bg_alpha_color="0.0 0.0 0.0 0.0" > <text top="2" left="10" |