From f9ef8fc4b3545f2ea64e5be31e923de722cfeec5 Mon Sep 17 00:00:00 2001 From: Kent Quirk Date: Tue, 24 Nov 2009 20:19:33 -0500 Subject: EXT-2764 EXT-2766 add and remove help ids to reflect reality --- indra/newview/skins/default/xui/en/floater_about_land.xml | 1 - indra/newview/skins/default/xui/en/floater_preferences.xml | 1 - indra/newview/skins/default/xui/en/floater_water.xml | 1 - indra/newview/skins/default/xui/en/panel_region_covenant.xml | 1 + indra/newview/skins/default/xui/en/panel_region_debug.xml | 1 + indra/newview/skins/default/xui/en/panel_region_estate.xml | 1 + indra/newview/skins/default/xui/en/panel_region_general.xml | 1 + indra/newview/skins/default/xui/en/panel_region_terrain.xml | 1 + indra/newview/skins/default/xui/en/panel_region_texture.xml | 1 + 9 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index 4f1024f56d..3d39f9e3b1 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -4,7 +4,6 @@ height="420" layout="topleft" name="floaterland" - help_topic="floaterland" save_rect="true" title="ABOUT LAND" width="460"> diff --git a/indra/newview/skins/default/xui/en/floater_preferences.xml b/indra/newview/skins/default/xui/en/floater_preferences.xml index d182cdc6bb..088b1050d9 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences.xml @@ -7,7 +7,6 @@ height="460" layout="topleft" name="Preferences" - help_topic="preferences" single_instance="true" title="PREFERENCES" width="620"> diff --git a/indra/newview/skins/default/xui/en/floater_water.xml b/indra/newview/skins/default/xui/en/floater_water.xml index b13a11c05d..103f96a651 100644 --- a/indra/newview/skins/default/xui/en/floater_water.xml +++ b/indra/newview/skins/default/xui/en/floater_water.xml @@ -4,7 +4,6 @@ height="240" layout="topleft" name="Water Floater" - help_topic="water_floater" save_rect="true" title="ADVANCED WATER EDITOR" width="700"> diff --git a/indra/newview/skins/default/xui/en/panel_region_covenant.xml b/indra/newview/skins/default/xui/en/panel_region_covenant.xml index 75d7d85505..ff55090f16 100644 --- a/indra/newview/skins/default/xui/en/panel_region_covenant.xml +++ b/indra/newview/skins/default/xui/en/panel_region_covenant.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_covenant_tab" label="Covenant" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml index e07585d285..a6b4ddd01e 100644 --- a/indra/newview/skins/default/xui/en/panel_region_debug.xml +++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_debug_tab" label="Debug" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index e25ff0d548..43036ca70e 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -3,6 +3,7 @@ border="false" follows="top|left" height="320" + help_topic="panel_region_estate_tab" label="Estate" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_general.xml b/indra/newview/skins/default/xui/en/panel_region_general.xml index 42c6319699..88277a2f10 100644 --- a/indra/newview/skins/default/xui/en/panel_region_general.xml +++ b/indra/newview/skins/default/xui/en/panel_region_general.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_general_tab" label="Region" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_terrain.xml b/indra/newview/skins/default/xui/en/panel_region_terrain.xml index ffd51bf510..5093c52129 100644 --- a/indra/newview/skins/default/xui/en/panel_region_terrain.xml +++ b/indra/newview/skins/default/xui/en/panel_region_terrain.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_terrain_tab" label="Terrain" layout="topleft" left="0" diff --git a/indra/newview/skins/default/xui/en/panel_region_texture.xml b/indra/newview/skins/default/xui/en/panel_region_texture.xml index 5089064c07..a4d24cb0fc 100644 --- a/indra/newview/skins/default/xui/en/panel_region_texture.xml +++ b/indra/newview/skins/default/xui/en/panel_region_texture.xml @@ -3,6 +3,7 @@ border="true" follows="top|left" height="320" + help_topic="panel_region_texture_tab" label="Ground Textures" layout="topleft" left="0" -- cgit v1.2.3 From d6e22a75791e6e82b1b4f4dad045e5b53129fe8d Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 8 Dec 2009 10:03:34 +0200 Subject: Fixed major bug EXT-3191 (Crash after dragging inventory item to avatar or IM floater) Reason: Null pointer to cargo data was passed from LLToolDragAndDrop::dragOrDrop in this case. Fix: added check against NULL of the LLToolDragAndDrop::locateInventory() result in the LLToolDragAndDrop::dragOrDrop(). The same checking presents in another place of the LLToolDragAndDrop::dragOrDrop(). Handling is interrupted in this case. Thanks Andrew ProductEngine for provided call stack --HG-- branch : product-engine --- indra/newview/lltooldraganddrop.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index 2d0a14dc70..aa35f22930 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -772,6 +772,9 @@ void LLToolDragAndDrop::dragOrDrop( S32 x, S32 y, MASK mask, BOOL drop, { LLInventoryObject* cargo = locateInventory(item, cat); + // fix for EXT-3191 + if (NULL == cargo) return; + EAcceptance item_acceptance = ACCEPT_NO; handled = handled && root_view->handleDragAndDrop(x, y, mask, FALSE, mCargoTypes[mCurItemIndex], -- cgit v1.2.3 From d4cfcfc7ce1a9ab2488942077df2a6bfc9bf11bf Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Tue, 8 Dec 2009 11:14:00 +0200 Subject: Work on EXT-3147 (Implement new states for message indicators) -- added possibility to show "99+" when unread messages count exceeds 99 --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 10 ++++++++-- indra/newview/llchiclet.h | 9 +++++++++ indra/newview/skins/default/xui/en/panel_bottomtray.xml | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 4b3b7a99d8..6d37eaed3d 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -81,17 +81,18 @@ boost::signals2::signal(button_params); @@ -108,7 +109,12 @@ void LLSysWellChiclet::setCounter(S32 counter) std::string s_count; if(counter != 0) { - s_count = llformat("%d", counter); + static std::string more_messages_exist("+"); + std::string more_messages(counter > mMaxDisplayedCount ? more_messages_exist : ""); + s_count = llformat("%d%s" + , llmin(counter, mMaxDisplayedCount) + , more_messages.c_str() + ); } mButton->setLabel(s_count); diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h index 609ce16713..598773757e 100644 --- a/indra/newview/llchiclet.h +++ b/indra/newview/llchiclet.h @@ -757,6 +757,14 @@ public: Optional unread_notifications; + /** + * Contains maximum displayed count of unread messages. Default value is 9. + * + * If count is less than "max_unread_count" will be displayed as is. + * Otherwise 9+ will be shown (for default value). + */ + Optional max_displayed_count; + Params(); }; @@ -781,6 +789,7 @@ protected: protected: LLButton* mButton; S32 mCounter; + S32 mMaxDisplayedCount; }; /** diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 7f847237ce..c8c5bc688e 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -343,6 +343,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. image_pressed_selected="PushButton_Selected_Press" image_selected="PushButton_Selected_Press" left="0" + max_displayed_count="99" name="Unread IM messages" pad_left="0" pad_right="0" @@ -369,6 +370,7 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. height="23" layout="topleft" left="0" + max_displayed_count="99" name="notification_well" top="4" width="34"> -- cgit v1.2.3 From 20d5fafc1cd1598f38e4ecefc11f4ee891afec21 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Tue, 8 Dec 2009 12:01:32 +0200 Subject: Fixed low bug EXT - 3038 (Verb buttons in avatar profile panel don't have tool-tips) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_notes.xml | 5 +++++ indra/newview/skins/default/xui/en/panel_profile.xml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/indra/newview/skins/default/xui/en/panel_notes.xml b/indra/newview/skins/default/xui/en/panel_notes.xml index c02dabed2c..9e7c9477d4 100644 --- a/indra/newview/skins/default/xui/en/panel_notes.xml +++ b/indra/newview/skins/default/xui/en/panel_notes.xml @@ -120,6 +120,7 @@ left="0" mouse_opaque="false" name="add_friend" + tool_tip="Offer friendship to the resident" top="5" width="55" /> + width="501" + top="285"> Default @@ -397,7 +398,7 @@ left="165" max_chars="128" name="voice_input_device" - top_pad="0" + top_pad="-2" width="200" /> My volume: @@ -422,7 +423,7 @@ max_val="2" name="mic_volume_slider" tool_tip="Change the volume using this slider" - top_pad="0" + top_pad="-2" width="220" /> - -- cgit v1.2.3 From 9abe779c8a06696ecc6b00313a443fabc22cf234 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 9 Dec 2009 14:55:45 -0800 Subject: last blind fixup for llmediaplugintest. --- indra/test_apps/llplugintest/llmediaplugintest.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/indra/test_apps/llplugintest/llmediaplugintest.cpp b/indra/test_apps/llplugintest/llmediaplugintest.cpp index 674520bb87..30d338292e 100644 --- a/indra/test_apps/llplugintest/llmediaplugintest.cpp +++ b/indra/test_apps/llplugintest/llmediaplugintest.cpp @@ -1766,7 +1766,21 @@ void LLMediaPluginTest::replaceMediaPanel( mediaPanel* panel, std::string url ) #elif LL_WINDOWS std::string launcher_name( "SLPlugin.exe" ); #endif - media_source->init( launcher_name, plugin_name ); + + // for this test app, use the cwd as the user data path (ugh). +#if LL_WINDOWS + std::string user_data_path = ".\\"; +#else + char cwd[ FILENAME_MAX ]; + if (NULL == getcwd( cwd, FILENAME_MAX - 1 )) + { + std::cerr << "Couldn't get cwd - probably too long - failing to init." << llendl; + return; + } + std::string user_data_path = std::string( cwd ) + "/"; +#endif + + media_source->init( launcher_name, plugin_name, false, user_data_path ); media_source->setDisableTimeout(mDisableTimeout); // make a new panel and save parameters -- cgit v1.2.3 From 522463108b61a740f64908242d347da5a3cccf62 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 9 Dec 2009 19:12:05 -0500 Subject: For EXT-2858: Determine gear menu / right-click menu choices for AppearanceSP --HG-- branch : avatar-pipeline --- indra/newview/llinventorybridge.cpp | 11 ++++++++++- indra/newview/skins/default/xui/en/menu_inventory.xml | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index ea47013781..d9a5f1837f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -67,6 +67,8 @@ using namespace LLOldEvents; +bool isInOutfitsSidePanel(LLPanel *panel); + // Helpers // bug in busy count inc/dec right now, logic is complex... do we really need it? void inc_busy_count() @@ -566,8 +568,15 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, } items.push_back(std::string("Paste Separator")); + + if (obj && obj->getIsLinkType()) + { + items.push_back(std::string("Remove")); + } + items.push_back(std::string("Delete")); - if (!isItemRemovable()) + const bool is_sidepanel = isInOutfitsSidePanel(mInventoryPanel.get()); + if ((obj && obj->getIsLinkType() && is_sidepanel) || !isItemRemovable()) { disabled_items.push_back(std::string("Delete")); } diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml index a36bfb8ec1..7e8d259cd0 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory.xml @@ -450,6 +450,14 @@ + + + Date: Wed, 9 Dec 2009 16:37:08 -0800 Subject: Partial EXT-3268 Object Profile option showing up in avatar 3D Context menu Renamed gPie* and menu_pie_* to just gMenu* and menu_* because they are no longer pie menus. Created separate other-attachment menus. Reviewed with Richard. --- indra/newview/llselectmgr.cpp | 42 ++-- indra/newview/lltoolpie.cpp | 22 +- indra/newview/llviewermenu.cpp | 76 ++++--- indra/newview/llviewermenu.h | 22 +- .../skins/default/xui/en/menu_attachment_other.xml | 116 +++++++++++ .../skins/default/xui/en/menu_attachment_self.xml | 124 +++++++++++ .../skins/default/xui/en/menu_avatar_other.xml | 105 ++++++++++ .../skins/default/xui/en/menu_avatar_self.xml | 227 +++++++++++++++++++++ indra/newview/skins/default/xui/en/menu_land.xml | 65 ++++++ indra/newview/skins/default/xui/en/menu_object.xml | 158 ++++++++++++++ 10 files changed, 883 insertions(+), 74 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/menu_attachment_other.xml create mode 100644 indra/newview/skins/default/xui/en/menu_attachment_self.xml create mode 100644 indra/newview/skins/default/xui/en/menu_avatar_other.xml create mode 100644 indra/newview/skins/default/xui/en/menu_avatar_self.xml create mode 100644 indra/newview/skins/default/xui/en/menu_land.xml create mode 100644 indra/newview/skins/default/xui/en/menu_object.xml diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4d6c19157a..6e99d5a5f0 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -3494,7 +3494,7 @@ void LLSelectMgr::deselectAllIfTooFar() // HACK: Don't deselect when we're navigating to rate an object's // owner or creator. JC - if (gPieObject->getVisible() || gPieRate->getVisible() ) + if (gMenuObject->getVisible()) { return; } @@ -5493,11 +5493,15 @@ void dialog_refresh_all() gFloaterTools->dirty(); - gPieObject->needsArrange(); + gMenuObject->needsArrange(); - if( gPieAttachment->getVisible() ) + if( gMenuAttachmentSelf->getVisible() ) { - gPieAttachment->arrange(); + gMenuAttachmentSelf->arrange(); + } + if( gMenuAttachmentOther->getVisible() ) + { + gMenuAttachmentOther->arrange(); } LLFloaterProperties::dirtyAll(); @@ -5754,21 +5758,21 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDoDelete() const { - bool can_delete = false; - // This function is "logically const" - it does not change state in - // a way visible outside the selection manager. - LLSelectMgr* self = const_cast(this); - LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); - // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) - if (obj!= NULL) - { - // all the faces needs to be selected - if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) - { - can_delete = true; - } - } - + bool can_delete = false; + // This function is "logically const" - it does not change state in + // a way visible outside the selection manager. + LLSelectMgr* self = const_cast(this); + LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); + // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) + if (obj!= NULL) + { + // all the faces needs to be selected + if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) + { + can_delete = true; + } + } + return can_delete; } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 5ed8dc5fb9..8a69c362b2 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -1445,28 +1445,29 @@ BOOL LLToolPie::pickRightMouseDownCallback() { LLParcelSelectionHandle selection = LLViewerParcelMgr::getInstance()->selectParcelAt( mPick.mPosGlobal ); gMenuHolder->setParcelSelection(selection); - gPieLand->show(x, y); + gMenuLand->show(x, y); showVisualContextMenuEffect(); } else if (mPick.mObjectID == gAgent.getID() ) { - if(!gPieSelf) + if(!gMenuAvatarSelf) { //either at very early startup stage or at late quitting stage, //this event is ignored. return TRUE ; } - gPieSelf->show(x, y); + gMenuAvatarSelf->show(x, y); } else if (object) { gMenuHolder->setObjectSelection(LLSelectMgr::getInstance()->getSelection()); + bool is_other_attachment = (object->isAttachment() && !object->isHUDAttachment() && !object->permYouOwner()); if (object->isAvatar() - || (object->isAttachment() && !object->isHUDAttachment() && !object->permYouOwner())) + || is_other_attachment) { // Find the attachment's avatar while( object && object->isAttachment()) @@ -1486,11 +1487,18 @@ BOOL LLToolPie::pickRightMouseDownCallback() gMenuHolder->childSetText("Avatar Mute", std::string("Mute")); // *TODO:Translate } - gPieAvatar->show(x, y); + if (is_other_attachment) + { + gMenuAttachmentOther->show(x, y); + } + else + { + gMenuAvatarOther->show(x, y); + } } else if (object->isAttachment()) { - gPieAttachment->show(x, y); + gMenuAttachmentSelf->show(x, y); } else { @@ -1510,7 +1518,7 @@ BOOL LLToolPie::pickRightMouseDownCallback() gMenuHolder->childSetText("Object Mute", std::string("Mute")); // *TODO:Translate } - gPieObject->show(x, y); + gMenuObject->show(x, y); showVisualContextMenuEffect(); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 78322dda75..e1143adcb6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -133,11 +133,12 @@ LLMenuGL *gPopupMenuView = NULL; LLMenuBarGL *gLoginMenuBarView = NULL; // Pie menus -LLContextMenu *gPieSelf = NULL; -LLContextMenu *gPieAvatar = NULL; -LLContextMenu *gPieObject = NULL; -LLContextMenu *gPieAttachment = NULL; -LLContextMenu *gPieLand = NULL; +LLContextMenu *gMenuAvatarSelf = NULL; +LLContextMenu *gMenuAvatarOther = NULL; +LLContextMenu *gMenuObject = NULL; +LLContextMenu *gMenuAttachmentSelf = NULL; +LLContextMenu *gMenuAttachmentOther = NULL; +LLContextMenu *gMenuLand = NULL; const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory"); const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"); @@ -145,7 +146,6 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents" LLMenuGL* gAttachSubMenu = NULL; LLMenuGL* gDetachSubMenu = NULL; LLMenuGL* gTakeOffClothes = NULL; -LLContextMenu* gPieRate = NULL; LLContextMenu* gAttachScreenPieMenu = NULL; LLContextMenu* gAttachPieMenu = NULL; LLContextMenu* gAttachBodyPartPieMenus[8]; @@ -375,25 +375,31 @@ void init_menus() gMenuHolder->addChild( gPopupMenuView ); /// - /// Pie menus + /// Context menus /// - gPieSelf = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_self.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + const widget_registry_t& registry = + LLViewerMenuHolderGL::child_registry_t::instance(); + gMenuAvatarSelf = LLUICtrlFactory::createFromFile( + "menu_avatar_self.xml", gMenuHolder, registry); + gMenuAvatarOther = LLUICtrlFactory::createFromFile( + "menu_avatar_other.xml", gMenuHolder, registry); - // TomY TODO: what shall we do about these? gDetachScreenPieMenu = gMenuHolder->getChild("Object Detach HUD", true); gDetachPieMenu = gMenuHolder->getChild("Object Detach", true); - gPieAvatar = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_avatar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - - gPieObject = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_object.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuObject = LLUICtrlFactory::createFromFile( + "menu_object.xml", gMenuHolder, registry); gAttachScreenPieMenu = gMenuHolder->getChild("Object Attach HUD"); gAttachPieMenu = gMenuHolder->getChild("Object Attach"); - gPieRate = gMenuHolder->getChild("Rate Menu"); - gPieAttachment = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_attachment.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuAttachmentSelf = LLUICtrlFactory::createFromFile( + "menu_attachment_self.xml", gMenuHolder, registry); + gMenuAttachmentOther = LLUICtrlFactory::createFromFile( + "menu_attachment_other.xml", gMenuHolder, registry); - gPieLand = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_land.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); + gMenuLand = LLUICtrlFactory::createFromFile( + "menu_land.xml", gMenuHolder, registry); /// /// set up the colors @@ -402,12 +408,13 @@ void init_menus() LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor"); - gPieSelf->setBackgroundColor( context_menu_color ); - gPieAvatar->setBackgroundColor( context_menu_color ); - gPieObject->setBackgroundColor( context_menu_color ); - gPieAttachment->setBackgroundColor( context_menu_color ); + gMenuAvatarSelf->setBackgroundColor( context_menu_color ); + gMenuAvatarOther->setBackgroundColor( context_menu_color ); + gMenuObject->setBackgroundColor( context_menu_color ); + gMenuAttachmentSelf->setBackgroundColor( context_menu_color ); + gMenuAttachmentOther->setBackgroundColor( context_menu_color ); - gPieLand->setBackgroundColor( context_menu_color ); + gMenuLand->setBackgroundColor( context_menu_color ); color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" ); gPopupMenuView->setBackgroundColor( color ); @@ -2262,20 +2269,23 @@ void cleanup_menus() delete gMenuParcelObserver; gMenuParcelObserver = NULL; - delete gPieSelf; - gPieSelf = NULL; + delete gMenuAvatarSelf; + gMenuAvatarSelf = NULL; + + delete gMenuAvatarOther; + gMenuAvatarOther = NULL; - delete gPieAvatar; - gPieAvatar = NULL; + delete gMenuObject; + gMenuObject = NULL; - delete gPieObject; - gPieObject = NULL; + delete gMenuAttachmentSelf; + gMenuAttachmentSelf = NULL; - delete gPieAttachment; - gPieAttachment = NULL; + delete gMenuAttachmentOther; + gMenuAttachmentSelf = NULL; - delete gPieLand; - gPieLand = NULL; + delete gMenuLand; + gMenuLand = NULL; delete gMenuBarView; gMenuBarView = NULL; @@ -4903,7 +4913,7 @@ class LLEditDelete : public view_listener_t // When deleting an object we may not actually be done // Keep selection so we know what to delete when confirmation is needed about the delete - gPieObject->hide(); + gMenuObject->hide(); return true; } }; @@ -4936,7 +4946,7 @@ void handle_object_delete() // When deleting an object we may not actually be done // Keep selection so we know what to delete when confirmation is needed about the delete - gPieObject->hide(); + gMenuObject->hide(); return; } @@ -6007,7 +6017,7 @@ public: protected: virtual void done() { - gPieAttachment->buildDrawLabels(); + gMenuAttachmentSelf->buildDrawLabels(); gInventory.removeObserver(this); delete this; } diff --git a/indra/newview/llviewermenu.h b/indra/newview/llviewermenu.h index 01a6b34170..71be4cb592 100644 --- a/indra/newview/llviewermenu.h +++ b/indra/newview/llviewermenu.h @@ -160,21 +160,13 @@ extern LLMenuGL* gPopupMenuView; extern LLViewerMenuHolderGL* gMenuHolder; extern LLMenuBarGL* gLoginMenuBarView; -// Pie menus -extern LLContextMenu *gPieSelf; -extern LLContextMenu *gPieAvatar; -extern LLContextMenu *gPieObject; -extern LLContextMenu *gPieAttachment; - -extern LLContextMenu *gPieLand; -extern LLContextMenu *gPieRate; - -// Pie menus -extern LLContextMenu *gPieSelfSimple; -extern LLContextMenu *gPieAvatarSimple; -extern LLContextMenu *gPieObjectSimple; -extern LLContextMenu *gPieAttachmentSimple; -extern LLContextMenu *gPieLandSimple; +// Context menus in 3D scene +extern LLContextMenu *gMenuAvatarSelf; +extern LLContextMenu *gMenuAvatarOther; +extern LLContextMenu *gMenuObject; +extern LLContextMenu *gMenuAttachmentSelf; +extern LLContextMenu *gMenuAttachmentOther; +extern LLContextMenu *gMenuLand; // Needed to build menus when attachment site list available extern LLMenuGL* gAttachSubMenu; diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml new file mode 100644 index 0000000000..14229db08d --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_attachment_self.xml b/indra/newview/skins/default/xui/en/menu_attachment_self.xml new file mode 100644 index 0000000000..c85dbbb1bc --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_attachment_self.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml new file mode 100644 index 0000000000..cf01a21f7c --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_avatar_self.xml b/indra/newview/skins/default/xui/en/menu_avatar_self.xml new file mode 100644 index 0000000000..c6ce612a76 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_avatar_self.xml @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_land.xml b/indra/newview/skins/default/xui/en/menu_land.xml new file mode 100644 index 0000000000..fac1dcf6ec --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_land.xml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/menu_object.xml b/indra/newview/skins/default/xui/en/menu_object.xml new file mode 100644 index 0000000000..62500c5116 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_object.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From ac4a6c93f08a987303dc049b5d8a1ea2342c6397 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Wed, 9 Dec 2009 19:37:58 -0500 Subject: EXT-3303 : Crash on select object inventory root folder and hover Build menu Unsafe cast (which has existed since viewer1.23) was causing crash. --- indra/newview/llpanelobjectinventory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 9d38dab26e..43366ef814 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -157,7 +157,7 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { - return (LLInventoryItem*)(object->getInventoryObject(mUUID)); + return dynamic_cast(object->getInventoryObject(mUUID)); } return NULL; } @@ -712,6 +712,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const { return getName(); } virtual BOOL isItemRenameable() const; + // virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemRemovable(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); -- cgit v1.2.3 From 9f68163179cda136a696f8e2d4d6b39fbf588bdb Mon Sep 17 00:00:00 2001 From: "Mark Palange (Mani)" Date: Wed, 9 Dec 2009 16:38:37 -0800 Subject: EXT-2896 Fixed poor handling of login error. Added more cleanup to the reset_login call. Added new settings to control UseCircuitCode message timeouts to allow testing of this failure. Reviewed by Richard --- indra/newview/app_settings/settings.xml | 23 ++++++++++++++++++++++- indra/newview/llstartup.cpp | 9 +++++---- indra/newview/llworld.cpp | 1 + 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index c43032a3cf..80a3977d02 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -4974,7 +4974,6 @@ Value 1 - StartUpToastLifeTime NearbyToastFadingTime Comment @@ -9911,6 +9910,28 @@ Value 0 + UseCircuitCodeMaxRetries + + Comment + Max timeout count for the initial UseCircuitCode message + Persist + 0 + Type + S32 + Value + 3 + + UseCircuitCodeTimeout + + Comment + Timeout duration in seconds for the initial UseCircuitCode message + Persist + 0 + Type + F32 + Value + 5.0 + UseDebugLogin Comment diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index be0c92a76d..697a530d33 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -367,8 +367,6 @@ bool idle_startup() LLMemType mt1(LLMemType::MTYPE_STARTUP); const F32 PRECACHING_DELAY = gSavedSettings.getF32("PrecachingDelay"); - const F32 TIMEOUT_SECONDS = 5.f; - const S32 MAX_TIMEOUT_COUNT = 3; static LLTimer timeout; static S32 timeout_count = 0; @@ -1436,9 +1434,9 @@ bool idle_startup() msg->addUUIDFast(_PREHASH_ID, gAgent.getID()); msg->sendReliable( gFirstSim, - MAX_TIMEOUT_COUNT, + gSavedSettings.getS32("UseCircuitCodeMaxRetries"), FALSE, - TIMEOUT_SECONDS, + gSavedSettings.getF32("UseCircuitCodeTimeout"), use_circuit_callback, NULL); @@ -2734,6 +2732,9 @@ void LLStartUp::setStartupState( EStartupState state ) void reset_login() { + gAgent.cleanup(); + LLWorld::getInstance()->destroyClass(); + LLStartUp::setStartupState( STATE_LOGIN_SHOW ); if ( gViewerWindow ) diff --git a/indra/newview/llworld.cpp b/indra/newview/llworld.cpp index 5c6fc2cf21..118d7f8d08 100644 --- a/indra/newview/llworld.cpp +++ b/indra/newview/llworld.cpp @@ -118,6 +118,7 @@ LLWorld::LLWorld() : void LLWorld::destroyClass() { + mHoleWaterObjects.clear(); gObjectList.destroy(); for(region_list_t::iterator region_it = mRegionList.begin(); region_it != mRegionList.end(); ) { -- cgit v1.2.3 From 42120752bdc043caf690b1809f97d0ce77413a7e Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 9 Dec 2009 16:58:49 -0800 Subject: Cleanup unneeded topleft attributes, document similar menu files --- .../skins/default/xui/en/menu_attachment_other.xml | 17 +++-------------- .../newview/skins/default/xui/en/menu_avatar_other.xml | 13 ++----------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/indra/newview/skins/default/xui/en/menu_attachment_other.xml b/indra/newview/skins/default/xui/en/menu_attachment_other.xml index 14229db08d..5b94645b60 100644 --- a/indra/newview/skins/default/xui/en/menu_attachment_other.xml +++ b/indra/newview/skins/default/xui/en/menu_attachment_other.xml @@ -1,10 +1,10 @@ + @@ -22,31 +21,26 @@ - + @@ -55,7 +49,6 @@ @@ -86,7 +79,6 @@ - + diff --git a/indra/newview/skins/default/xui/en/menu_avatar_other.xml b/indra/newview/skins/default/xui/en/menu_avatar_other.xml index cf01a21f7c..0ad41546d2 100644 --- a/indra/newview/skins/default/xui/en/menu_avatar_other.xml +++ b/indra/newview/skins/default/xui/en/menu_avatar_other.xml @@ -1,10 +1,10 @@ + @@ -22,31 +21,26 @@ - + @@ -55,7 +49,6 @@ @@ -86,7 +79,6 @@ -- cgit v1.2.3 From 23610472d5e09b66cd05039a9c6cb96664fdbaeb Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 9 Dec 2009 17:17:07 -0800 Subject: lazy evaluation of lluistring to improve LLUIString::format performance reviewed by Mani --- indra/llui/lluistring.cpp | 51 ++++++++++++++++++++++++++++++----------------- indra/llui/lluistring.h | 32 +++++++++++++++++++---------- 2 files changed, 55 insertions(+), 28 deletions(-) diff --git a/indra/llui/lluistring.cpp b/indra/llui/lluistring.cpp index 3a1e656364..f7a53e87de 100644 --- a/indra/llui/lluistring.cpp +++ b/indra/llui/lluistring.cpp @@ -39,22 +39,23 @@ LLFastTimer::DeclareTimer FTM_UI_STRING("UI String"); LLUIString::LLUIString(const std::string& instring, const LLStringUtil::format_map_t& args) - : mOrig(instring), - mArgs(args) +: mOrig(instring), + mArgs(args) { - format(); + dirty(); } void LLUIString::assign(const std::string& s) { mOrig = s; - format(); + dirty(); } void LLUIString::setArgList(const LLStringUtil::format_map_t& args) + { mArgs = args; - format(); + dirty(); } void LLUIString::setArgs(const LLSD& sd) @@ -68,40 +69,40 @@ void LLUIString::setArgs(const LLSD& sd) { setArg(sd_it->first, sd_it->second.asString()); } - format(); + dirty(); } void LLUIString::setArg(const std::string& key, const std::string& replacement) { mArgs[key] = replacement; - format(); + dirty(); } void LLUIString::truncate(S32 maxchars) { - if (mWResult.size() > (size_t)maxchars) + if (getUpdatedWResult().size() > (size_t)maxchars) { - LLWStringUtil::truncate(mWResult, maxchars); - mResult = wstring_to_utf8str(mWResult); + LLWStringUtil::truncate(getUpdatedWResult(), maxchars); + mResult = wstring_to_utf8str(getUpdatedWResult()); } } void LLUIString::erase(S32 charidx, S32 len) { - mWResult.erase(charidx, len); - mResult = wstring_to_utf8str(mWResult); + getUpdatedWResult().erase(charidx, len); + mResult = wstring_to_utf8str(getUpdatedWResult()); } void LLUIString::insert(S32 charidx, const LLWString& wchars) { - mWResult.insert(charidx, wchars); - mResult = wstring_to_utf8str(mWResult); + getUpdatedWResult().insert(charidx, wchars); + mResult = wstring_to_utf8str(getUpdatedWResult()); } void LLUIString::replace(S32 charidx, llwchar wc) { - mWResult[charidx] = wc; - mResult = wstring_to_utf8str(mWResult); + getUpdatedWResult()[charidx] = wc; + mResult = wstring_to_utf8str(getUpdatedWResult()); } void LLUIString::clear() @@ -112,8 +113,16 @@ void LLUIString::clear() mWResult.clear(); } -void LLUIString::format() +void LLUIString::dirty() { + mNeedsResult = true; + mNeedsWResult = true; +} + +void LLUIString::updateResult() const +{ + mNeedsResult = false; + LLFastTimer timer(FTM_UI_STRING); // optimize for empty strings (don't attempt string replacement) @@ -129,5 +138,11 @@ void LLUIString::format() LLStringUtil::format_map_t combined_args = LLTrans::getDefaultArgs(); combined_args.insert(mArgs.begin(), mArgs.end()); LLStringUtil::format(mResult, combined_args); - mWResult = utf8str_to_wstring(mResult); +} + +void LLUIString::updateWResult() const +{ + mNeedsWResult = false; + + mWResult = utf8str_to_wstring(getUpdatedResult()); } diff --git a/indra/llui/lluistring.h b/indra/llui/lluistring.h index 763de4d6a3..7ec0fd603a 100644 --- a/indra/llui/lluistring.h +++ b/indra/llui/lluistring.h @@ -76,19 +76,19 @@ public: void setArgs(const class LLSD& sd); void setArg(const std::string& key, const std::string& replacement); - const std::string& getString() const { return mResult; } - operator std::string() const { return mResult; } + const std::string& getString() const { return getUpdatedResult(); } + operator std::string() const { return getUpdatedResult(); } - const LLWString& getWString() const { return mWResult; } - operator LLWString() const { return mWResult; } + const LLWString& getWString() const { return getUpdatedWResult(); } + operator LLWString() const { return getUpdatedWResult(); } - bool empty() const { return mWResult.empty(); } - S32 length() const { return mWResult.size(); } + bool empty() const { return getUpdatedResult().empty(); } + S32 length() const { return getUpdatedWResult().size(); } void clear(); void clearArgs() { mArgs.clear(); } - // These utuilty functions are included for text editing. + // These utility functions are included for text editing. // They do not affect mOrig and do not perform argument substitution void truncate(S32 maxchars); void erase(S32 charidx, S32 len); @@ -96,12 +96,24 @@ public: void replace(S32 charidx, llwchar wc); private: - void format(); + // something changed, requiring reformatting of strings + void dirty(); + + std::string& getUpdatedResult() const { if (mNeedsResult) { updateResult(); } return mResult; } + LLWString& getUpdatedWResult() const{ if (mNeedsWResult) { updateWResult(); } return mWResult; } + + // do actual work of updating strings (non-inlined) + void updateResult() const; + void updateWResult() const; std::string mOrig; - std::string mResult; - LLWString mWResult; // for displaying + mutable std::string mResult; + mutable LLWString mWResult; // for displaying LLStringUtil::format_map_t mArgs; + + // controls lazy evaluation + mutable bool mNeedsResult; + mutable bool mNeedsWResult; }; #endif // LL_LLUISTRING_H -- cgit v1.2.3 From 272bb744af3dd942369f4c378db316e182a1ab87 Mon Sep 17 00:00:00 2001 From: "Eric M. Tulla (BigPapi)" Date: Wed, 9 Dec 2009 20:24:37 -0500 Subject: Fix for save texture functionality no longer respecting permissions --- indra/newview/llpanelmaininventory.cpp | 28 ++++++++++++++++++++-- indra/newview/llpreviewtexture.cpp | 1 + .../default/xui/en/floater_preview_texture.xml | 4 ++-- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 8f71c6f1ee..9d73fbf21a 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llpanelmaininventory.h" +#include "llagent.h" #include "lldndbutton.h" #include "llfilepicker.h" #include "llfloaterinventory.h" @@ -1017,8 +1018,31 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); if (current_item) { - LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); - return (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); + bool can_save = false; + LLInventoryItem *item = gInventory.getItem(current_item->getListener()->getUUID()); + if(item) + { + const LLPermissions& perm = item->getPermissions(); + U32 mask = PERM_NONE; + if(perm.getOwner() == gAgent.getID()) + { + mask = perm.getMaskBase(); + } + else if(gAgent.isInGroup(perm.getGroup())) + { + mask = perm.getMaskGroup(); + } + else + { + mask = perm.getMaskEveryone(); + } + if((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) + { + can_save = true; + } + LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); + return can_save && (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); + } } return false; } diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 8fa147f201..86475fe2dc 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -146,6 +146,7 @@ BOOL LLPreviewTexture::postBuild() } childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this); + childSetVisible("save_tex_btn", canSaveAs()); if (!mCopyToInv) { diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 054f3be70a..602a18ea56 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -61,7 +61,7 @@ name="Discard" top_delta="0" width="100" /> - - - Controls: - - - - Standard - - - Mini - - - - + + Controls: + + + + Standard + + + Mini + + + Date: Mon, 14 Dec 2009 16:45:14 -0500 Subject: EXT-1940 combo-box with dropdown list of scales overlaps Cancel btn un the Texture dlg --- .../default/xui/en/floater_preview_texture.xml | 103 ++++++++++----------- 1 file changed, 48 insertions(+), 55 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 602a18ea56..abc30c335c 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -3,15 +3,15 @@ legacy_header_height="18" auto_tile="true" can_resize="true" - follows="left|bottom" - height="331" + follows="left|top" + height="313" layout="topleft" min_height="120" - min_width="300" + min_width="320" name="preview_texture" help_topic="preview_texture" - width="300"> - + Texture: [NAME] @@ -43,72 +43,38 @@ max_length="127" name="desc" width="190" /> -