From b356bbb6a5930e8900250c6654688ae2e6d25ecf Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Thu, 7 Feb 2013 10:48:49 +0200 Subject: CHUI-713 "Conversations" floater size doesn't persist between sessions --- indra/newview/llfloaterimcontainer.cpp | 9 +++++++-- indra/newview/llfloaterimsessiontab.cpp | 5 ++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 5a284cc7b7..27e579a68c 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -273,14 +273,19 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp, openFloater(floaterp->getKey()); return; } + + LLUUID session_id = floaterp->getKey(); // Make sure the message panel is open when adding a floater or it stays mysteriously hidden - collapseMessagesPane(false); + if (session_id != LLUUID()) + { + collapseMessagesPane(false); + } // Add the floater LLMultiFloater::addFloater(floaterp, select_added_floater, insertion_point); - LLUUID session_id = floaterp->getKey(); + LLIconCtrl* icon = 0; diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 6dbcdb4474..526eeef869 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -769,7 +769,10 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key) { LLFloaterIMContainer* host_floater = dynamic_cast(getHost()); // Show the messages pane when opening a floater hosted in the Conversations - host_floater->collapseMessagesPane(false); + if (!isNearbyChat()) + { + host_floater->collapseMessagesPane(false); + } } } -- cgit v1.2.3 From 64fe330620459be18ee4dd54866386a8f6a76ab8 Mon Sep 17 00:00:00 2001 From: mberezhnoy Date: Sat, 9 Feb 2013 00:10:09 +0200 Subject: CHUI-713 "Conversations" floater size doesn't persist between sessions additional fix --- indra/newview/llfloaterimcontainer.cpp | 12 ++++++++++-- indra/newview/llfloaterimcontainer.h | 1 + indra/newview/llfloaterimsessiontab.cpp | 5 +---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 27e579a68c..312f70fe30 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -62,7 +62,8 @@ LLFloaterIMContainer::LLFloaterIMContainer(const LLSD& seed, const Params& param mExpandCollapseBtn(NULL), mConversationsRoot(NULL), mConversationsEventStream("ConversationsEvents"), - mInitialized(false) + mInitialized(false), + mIsFirstLaunch(false) { mEnableCallbackRegistrar.add("IMFloaterContainer.Check", boost::bind(&LLFloaterIMContainer::isActionChecked, this, _2)); mCommitCallbackRegistrar.add("IMFloaterContainer.Action", boost::bind(&LLFloaterIMContainer::onCustomAction, this, _2)); @@ -243,6 +244,7 @@ BOOL LLFloaterIMContainer::postBuild() mGeneralTitle = getTitle(); mInitialized = true; + mIsFirstLaunch = true; // Add callbacks: // We'll take care of view updates on idle @@ -277,7 +279,7 @@ void LLFloaterIMContainer::addFloater(LLFloater* floaterp, LLUUID session_id = floaterp->getKey(); // Make sure the message panel is open when adding a floater or it stays mysteriously hidden - if (session_id != LLUUID()) + if (!mIsFirstLaunch) { collapseMessagesPane(false); } @@ -635,6 +637,12 @@ void LLFloaterIMContainer::collapseMessagesPane(bool collapse) return; } + if (mIsFirstLaunch) + { + mIsFirstLaunch = false; + return; + } + // Save current width of panels before collapsing/expanding right pane. S32 conv_pane_width = mConversationsPane->getRect().getWidth(); S32 msg_pane_width = mMessagesPane->getRect().getWidth(); diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 06af6c7b51..a28dba3b98 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -167,6 +167,7 @@ private: LLLayoutStack* mConversationsStack; bool mInitialized; + bool mIsFirstLaunch; LLUUID mSelectedSession; std::string mGeneralTitle; diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp index 526eeef869..6dbcdb4474 100644 --- a/indra/newview/llfloaterimsessiontab.cpp +++ b/indra/newview/llfloaterimsessiontab.cpp @@ -769,10 +769,7 @@ void LLFloaterIMSessionTab::onOpen(const LLSD& key) { LLFloaterIMContainer* host_floater = dynamic_cast(getHost()); // Show the messages pane when opening a floater hosted in the Conversations - if (!isNearbyChat()) - { - host_floater->collapseMessagesPane(false); - } + host_floater->collapseMessagesPane(false); } } -- cgit v1.2.3 From 2e2026a4f8359aba26e330fc8ec9ce4a3d40e666 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 8 Feb 2013 20:51:02 -0800 Subject: CHUI-746 : Fixed! Undid the MAINT-2276 hack now that submenus do work thanks to CHUI-682 --- indra/newview/llpaneloutfitedit.cpp | 13 +++---------- indra/newview/skins/default/xui/en/menu_cof_gear.xml | 2 +- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/indra/newview/llpaneloutfitedit.cpp b/indra/newview/llpaneloutfitedit.cpp index 30f137bdba..c09d4393c8 100644 --- a/indra/newview/llpaneloutfitedit.cpp +++ b/indra/newview/llpaneloutfitedit.cpp @@ -186,11 +186,8 @@ private: // Populate the menu with items like "New Skin", "New Pants", etc. static void populateCreateWearableSubmenus(LLMenuGL* menu) { - // MAINT-2276...these menus are created as dummies because they are not available - // when this function is called. This prevents their parent from popping up later. - // - //LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE); - //LLView* menu_bp = gMenuHolder->getChildView("COF.Geear.New_Body_Parts", FALSE); + LLView* menu_clothes = gMenuHolder->getChildView("COF.Gear.New_Clothes", FALSE); + LLView* menu_bp = gMenuHolder->getChildView("COF.Gear.New_Body_Parts", FALSE); for (U8 i = LLWearableType::WT_SHAPE; i != (U8) LLWearableType::WT_COUNT; ++i) { @@ -203,11 +200,7 @@ private: p.on_click.function_name = "Wearable.Create"; p.on_click.parameter = LLSD(type_name); - //LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp; - // This is a work-around for MAINT-2276 wherein the parent toggleable menu does not appear - // It puts everything under one menu, but that menu appears, which is better than not. - // - LLView* parent = menu; + LLView* parent = LLWearableType::getAssetType(type) == LLAssetType::AT_CLOTHING ? menu_clothes : menu_bp; LLUICtrlFactory::create(p, parent); } } diff --git a/indra/newview/skins/default/xui/en/menu_cof_gear.xml b/indra/newview/skins/default/xui/en/menu_cof_gear.xml index a6e9a40e31..45cf780557 100644 --- a/indra/newview/skins/default/xui/en/menu_cof_gear.xml +++ b/indra/newview/skins/default/xui/en/menu_cof_gear.xml @@ -9,5 +9,5 @@ + name="COF.Gear.New_Body_Parts" /> -- cgit v1.2.3 From 5ecac2e900054526c5e9e2fe5610f470ad06df32 Mon Sep 17 00:00:00 2001 From: Merov Linden Date: Fri, 8 Feb 2013 22:38:54 -0800 Subject: CHUI-735 : Fixed! Refactor the code to move isSelectionRemovable() to the LLInventoryPanel level. Use it when using the delete key. --- indra/newview/llinventorypanel.cpp | 32 +++++++++++++++++++++++++++++++- indra/newview/llinventorypanel.h | 1 + indra/newview/llpanelmaininventory.cpp | 22 +--------------------- 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 578b83fd28..1357b613bb 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1370,7 +1370,7 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) case KEY_BACKSPACE: // Delete selected items if delete or backspace key hit on the inventory panel // Note: on Mac laptop keyboards, backspace and delete are one and the same - if (mask == MASK_NONE) + if (isSelectionRemovable() && (mask == MASK_NONE)) { LLInventoryAction::doToSelected(mInventory, mFolderRoot, "delete"); handled = TRUE; @@ -1380,6 +1380,36 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask ) return handled; } +bool LLInventoryPanel::isSelectionRemovable() +{ + bool can_delete = false; + if (mFolderRoot) + { + std::set selection_set = mFolderRoot->getSelectionList(); + if (!selection_set.empty()) + { + can_delete = true; + for (std::set::iterator iter = selection_set.begin(); + iter != selection_set.end(); + ++iter) + { + LLFolderViewItem *item = *iter; + const LLFolderViewModelItemInventory *listener = static_cast(item->getViewModelItem()); + if (!listener) + { + can_delete = false; + } + else + { + can_delete &= listener->isItemRemovable(); + can_delete &= !listener->isItemInTrash(); + } + } + } + } + return can_delete; +} + /************************************************************************/ /* Recent Inventory Panel related class */ /************************************************************************/ diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 6eb85fbad2..00a90325ad 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -162,6 +162,7 @@ public: void setSelection(const LLUUID& obj_id, BOOL take_keyboard_focus); void setSelectCallback(const boost::function& items, BOOL user_action)>& cb); void clearSelection(); + bool isSelectionRemovable(); LLInventoryFilter& getFilter(); const LLInventoryFilter& getFilter() const; void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 82b79db60a..d6535c88e9 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1112,27 +1112,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) const std::string command_name = userdata.asString(); if (command_name == "delete") { - BOOL can_delete = FALSE; - LLFolderView* root = getActivePanel()->getRootFolder(); - if (root) - { - can_delete = TRUE; - std::set selection_set = root->getSelectionList(); - if (selection_set.empty()) return FALSE; - for (std::set::iterator iter = selection_set.begin(); - iter != selection_set.end(); - ++iter) - { - LLFolderViewItem *item = *iter; - const LLFolderViewModelItemInventory *listener = static_cast(item->getViewModelItem()); - llassert(listener); - if (!listener) return FALSE; - can_delete &= listener->isItemRemovable(); - can_delete &= !listener->isItemInTrash(); - } - return can_delete; - } - return FALSE; + return getActivePanel()->isSelectionRemovable(); } if (command_name == "save_texture") { -- cgit v1.2.3 From 46294bdcaca5ea259dee95256179653779697e21 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Fri, 8 Feb 2013 19:54:34 +0200 Subject: CHUI-731 FIXED Viewer crashed while deleting text from IM message --- indra/llui/lltextbase.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 8839afb60d..4c9c2781f2 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -605,7 +605,8 @@ void LLTextBase::drawText() // Find the start of the first word U32 word_start = seg_start, word_end = -1; - while ( (word_start < wstrText.length()) && (!LLStringOps::isAlpha(wstrText[word_start])) ) + U32 text_length = wstrText.length(); + while ( (word_start < text_length) && (!LLStringOps::isAlpha(wstrText[word_start])) ) { word_start++; } @@ -627,11 +628,15 @@ void LLTextBase::drawText() break; } - // Don't process words shorter than 3 characters - std::string word = wstring_to_utf8str(wstrText.substr(word_start, word_end - word_start)); - if ( (word.length() >= 3) && (!LLSpellChecker::instance().checkSpelling(word)) ) + if (word_start < text_length && word_end <= text_length && word_end > word_start) { - mMisspellRanges.push_back(std::pair(word_start, word_end)); + std::string word = wstring_to_utf8str(wstrText.substr(word_start, word_end - word_start)); + + // Don't process words shorter than 3 characters + if ( (word.length() >= 3) && (!LLSpellChecker::instance().checkSpelling(word)) ) + { + mMisspellRanges.push_back(std::pair(word_start, word_end)); + } } // Find the start of the next word -- cgit v1.2.3 From 9a75eeb67e9d768ad925c5d1f0e7ab180be8ee71 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Mon, 11 Feb 2013 14:39:05 +0200 Subject: Fix for build issue under windows --- indra/newview/llinventorypanel.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 1357b613bb..fabcd50c7d 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1401,8 +1401,7 @@ bool LLInventoryPanel::isSelectionRemovable() } else { - can_delete &= listener->isItemRemovable(); - can_delete &= !listener->isItemInTrash(); + can_delete &= listener->isItemRemovable() && !listener->isItemInTrash(); } } } -- cgit v1.2.3 From 4b4367269058c8ba10d284b48ffae9e24fd086ce Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 11 Feb 2013 15:22:24 +0200 Subject: CHUI-751 FIXED Triple click is now handled. --- indra/llui/lltextbase.cpp | 9 +++++++++ indra/llui/lltextbase.h | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 4c9c2781f2..7cee9f5b46 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -46,6 +46,7 @@ const F32 CURSOR_FLASH_DELAY = 1.0f; // in seconds const S32 CURSOR_THICKNESS = 2; +const F32 TRIPLE_CLICK_INTERVAL = 0.3f; // delay between double and triple click. LLTextBase::line_info::line_info(S32 index_start, S32 index_end, LLRect rect, S32 line_num) : mDocIndexStart(index_start), @@ -1004,6 +1005,13 @@ void LLTextBase::insertSegment(LLTextSegmentPtr segment_to_insert) BOOL LLTextBase::handleMouseDown(S32 x, S32 y, MASK mask) { + // handle triple click + if (!mTripleClickTimer.hasExpired()) + { + selectAll(); + return TRUE; + } + LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y); if (cur_segment && cur_segment->handleMouseDown(x, y, mask)) { @@ -1078,6 +1086,7 @@ BOOL LLTextBase::handleRightMouseUp(S32 x, S32 y, MASK mask) BOOL LLTextBase::handleDoubleClick(S32 x, S32 y, MASK mask) { + mTripleClickTimer.setTimerExpirySec(TRIPLE_CLICK_INTERVAL); LLTextSegmentPtr cur_segment = getSegmentAtLocalPos(x, y); if (cur_segment && cur_segment->handleDoubleClick(x, y, mask)) { diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 629b304b25..ad566a36d3 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -598,7 +598,8 @@ protected: // selection S32 mSelectionStart; S32 mSelectionEnd; - + LLTimer mTripleClickTimer; + BOOL mIsSelecting; // Are we in the middle of a drag-select? // spell checking -- cgit v1.2.3 From 5066e850df6e44e65bf7760ac990fdd5ed1c7b8e Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Mon, 11 Feb 2013 15:26:17 +0200 Subject: CHUI-728 FIXED Don't display Nearby chat participants if Conversation pane is collapsed. --- indra/newview/llfloaterimcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 05db0e93e6..cef45a5b56 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1769,7 +1769,7 @@ void LLFloaterIMContainer::openNearbyChat() { // If there's only one conversation in the container and that conversation is the nearby chat //(which it should be...), open it so to make the list of participants visible. This happens to be the most common case when opening the Chat floater. - if(mConversationsItems.size() == 1) + if((mConversationsItems.size() == 1)&&(!mConversationsPane->isCollapsed())) { LLConversationViewSession* nearby_chat = dynamic_cast(get_ptr_in_map(mConversationsWidgets,LLUUID())); if (nearby_chat) -- cgit v1.2.3