From d6101558a171dbd2390792ac1e78d09fc2c27711 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 6 Jul 2009 21:58:04 +0000 Subject: Merge xui-army-5 to viewer-2, includes layout, art, and color changes, also UI color refactoring and new FreeType font library on Linux. svn merge -r126038:126164 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/xui-army-5 --- indra/newview/llviewermenu.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 826aca5e64..ae7099d382 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -523,7 +523,7 @@ void init_menus() /// LLColor4 color; - LLColor4 context_menu_color = gSavedSkinSettings.getColor("MenuPopupBgColor"); + LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor"); gPieSelf->setBackgroundColor( context_menu_color ); gPieAvatar->setBackgroundColor( context_menu_color ); @@ -532,17 +532,17 @@ void init_menus() gPieLand->setBackgroundColor( context_menu_color ); - color = gSavedSkinSettings.getColor( "MenuPopupBgColor" ); + color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" ); gPopupMenuView->setBackgroundColor( color ); // If we are not in production, use a different color to make it apparent. if (LLViewerLogin::getInstance()->isInProductionGrid()) { - color = gSavedSkinSettings.getColor( "MenuBarBgColor" ); + color = LLUIColorTable::instance().getColor( "MenuBarBgColor" ); } else { - color = gSavedSkinSettings.getColor( "MenuNonProductionBgColor" ); + color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile("menu_viewer.xml", gMenuHolder); gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT)); @@ -7983,6 +7983,7 @@ void initialize_menus() // Advanced > XUI + commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance())); view_listener_t::addMenu(new LLAdvancedShowFontTest(), "Advanced.ShowFontTest"); view_listener_t::addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML"); view_listener_t::addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML"); -- cgit v1.2.3 From 52aeaa32841e7d0b37abab0a2a2540c2be2f16b7 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 7 Jul 2009 00:53:05 +0000 Subject: Merge skinning-14 to viewer-2, including refactoring many floaters to register them with LLFloaterReg, support for introspection of ParamBlock based UI widgets to dump XML schema, splitting llfolderview.cpp into three separate files to unravel dependencies and skeleton for for LLListView widget. Resolved conflicts in these files: lldraghandle.h, lluictrl.h, llchiclet.cpp, llfolderview.h/cpp, lliinventorybridge.cpp, llpanelpicks.cpp, llviewermenu.cpp, floater_mute.xml, floater_preferences.xml, notifications.xml, panel_preferences_audio.xml, panel_preferences_graphics1.xml, panel_region_general.xml svn merge -r124961:126284 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-14 --- indra/newview/llviewermenu.cpp | 216 +++++++---------------------------------- 1 file changed, 34 insertions(+), 182 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index ae7099d382..70a6e24c8f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -87,14 +87,12 @@ #include "llfloateractivespeakers.h" #include "llfloateranimpreview.h" #include "llfloateravatartextures.h" -#include "llfloaterbeacons.h" #include "llfloaterbuildoptions.h" #include "llfloaterbump.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" #include "llfloaterbuycurrency.h" #include "llfloaterbuyland.h" -#include "llfloatercamera.h" #include "llfloaterchat.h" #include "llfloatercustomize.h" #include "llfloaterdaycycle.h" @@ -146,7 +144,7 @@ #include "llimagetga.h" #include "llinventorybridge.h" #include "llinventorymodel.h" -#include "llinventoryview.h" +#include "llfloaterinventory.h" #include "llkeyboard.h" #include "llpanellogin.h" #include "llmenucommands.h" @@ -500,23 +498,23 @@ void init_menus() /// /// Pie menus /// - gPieSelf = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_self.xml", gMenuHolder); + gPieSelf = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_self.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); // 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); + gPieAvatar = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_avatar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - gPieObject = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_object.xml", gMenuHolder); + gPieObject = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_object.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); 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); + gPieAttachment = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_attachment.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - gPieLand = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_land.xml", gMenuHolder); + gPieLand = LLUICtrlFactory::getInstance()->createFromFile("menu_pie_land.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); /// /// set up the colors @@ -544,7 +542,7 @@ void init_menus() { color = LLUIColorTable::instance().getColor( "MenuNonProductionBgColor" ); } - gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile("menu_viewer.xml", gMenuHolder); + gMenuBarView = LLUICtrlFactory::getInstance()->createFromFile("menu_viewer.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gMenuBarView->setRect(LLRect(0, top, 0, top - MENU_BAR_HEIGHT)); gMenuBarView->setBackgroundColor( color ); @@ -575,7 +573,7 @@ void init_menus() // Let land based option enable when parcel changes gMenuParcelObserver = new LLMenuParcelObserver(); - gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile("menu_login.xml", gMenuHolder); + gLoginMenuBarView = LLUICtrlFactory::getInstance()->createFromFile("menu_login.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); gLoginMenuBarView->arrangeAndClear(); LLRect menuBarRect = gLoginMenuBarView->getRect(); gLoginMenuBarView->setRect(LLRect(menuBarRect.mLeft, menuBarRect.mTop, gViewerWindow->getRootView()->getRect().getWidth() - menuBarRect.mLeft, menuBarRect.mBottom)); @@ -612,11 +610,6 @@ class LLAdvancedToggleConsole : public view_listener_t toggle_visibility( (void*)gDebugView->mMemoryView ); } #endif - else if ("notifications" == console_type) - { - //LLFloaterNotificationConsole::showInstance(); - LLFloaterReg::showInstance("notifications_console"); - } return true; } }; @@ -1117,30 +1110,6 @@ class LLAdvancedCheckFrameTest : public view_listener_t }; - // -///////////////////////////// -//// HIDE SELECTED OBJECTS // -///////////////////////////// -// -// -//class LLAdvancedToggleHideSelectedObjects : public view_listener_t -//{ -// bool handleEvent(const LLSD& userdata) -// { -// LLSelectMgr::sHideSelectedObjects = !(LLSelectMgr::sHideSelectedObjects); -// return true; -// } -//}; - // -//class LLAdvancedCheckHideSelectedObjects : public view_listener_t -//{ -// bool handleEvent(const LLSD& userdata) -// { -// bool new_value = gHideSelectedObjects; -// return new_value; -// } -//}; - /////////////////////////// // SELECTED TEXTURE INFO // /////////////////////////// @@ -1506,16 +1475,6 @@ class LLAdvancedCheckDebugWindowProc : public view_listener_t // ------------------------------XUI MENU --------------------------- - -class LLAdvancedShowFontTest : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloaterFontTest::show(NULL); - return true; - } -}; - ////////////////////// // LOAD UI FROM XML // ////////////////////// @@ -1547,6 +1506,15 @@ class LLAdvancedSaveUIToXML : public view_listener_t }; +class LLAdvancedSendTestIms : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLIMModel::instance().testMessages(); + return true; +} +}; + /////////////// // XUI NAMES // @@ -1987,18 +1955,6 @@ class LLAdvancedDumpAvatarLocalTextures : public view_listener_t } }; -//////////////////////////////// -// Memory Leaking Simulation // -//////////////////////////////// -class LLAdvancedMemoryLeakingSimulation : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloaterMemLeak::show(NULL); - return true; - } -}; - #endif ///////////////// @@ -2147,7 +2103,6 @@ class LLAdvancedShowDebugSettings : public view_listener_t { bool handleEvent(const LLSD& userdata) { - // LLFloaterSettingsDebug::showInstance(userdata); LLFloaterReg::showInstance("settings_debug",userdata); return true; } @@ -2414,14 +2369,6 @@ class LLAdminHandleRegionDumpTempAssetData: public view_listener_t } }; //Admin (Top Level) -class LLAdminShowGodTools: public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloaterGodTools::showInstance(LLSD()); - return true; - } -}; class LLAdminOnSaveState: public view_listener_t { @@ -2581,7 +2528,7 @@ class LLObjectEnableTouch : public view_listener_t // label.assign("Touch"); // } //} - +/* bool handle_object_open() { LLViewerObject* obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -2598,7 +2545,7 @@ class LLObjectOpen : public view_listener_t return handle_object_open(); } }; - +*/ class LLObjectEnableOpen : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -2715,16 +2662,6 @@ class LLObjectEdit : public view_listener_t } }; -class LLObjectInspect : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloaterInspect::show(); - return true; - } -}; - - //--------------------------------------------------------------------------- // Land pie menu //--------------------------------------------------------------------------- @@ -4382,7 +4319,7 @@ void handle_take() } // check library - if(gInventory.isObjectDescendentOf(category_id, gInventoryLibraryRoot)) + if(gInventory.isObjectDescendentOf(category_id, gInventory.getLibraryRootFolderID())) { category_id.setNull(); } @@ -5612,35 +5549,10 @@ class LLShowFloater : public view_listener_t { LLToolBar::toggle(NULL); } - else if (floater_name == "mute list") - { - LLFloaterReg::toggleInstance("mute"); - } - else if (floater_name == "camera controls") - { - LLFloaterCamera::toggleInstance(); - } - else if (floater_name == "movement controls") - { - LLFloaterMove::toggleInstance(); - } else if (floater_name == "my land") { LLFloaterLandHoldings::show(NULL); } - else if (floater_name == "about land") - { - if (LLViewerParcelMgr::getInstance()->selectionEmpty()) - { - LLViewerParcelMgr::getInstance()->selectParcelAt(gAgent.getPositionGlobal()); - } - - LLFloaterLand::showInstance(); - } - else if (floater_name == "about region") - { - LLFloaterRegionInfo::showInstance(); - } else if (floater_name == "buy land") { if (LLViewerParcelMgr::getInstance()->selectionEmpty()) @@ -5650,10 +5562,6 @@ class LLShowFloater : public view_listener_t LLViewerParcelMgr::getInstance()->startBuyLand(); } - else if (floater_name == "grid options") - { - LLFloaterReg::showInstance("build_options"); - } else if (floater_name == "script errors") { LLFloaterScriptDebug::show(LLUUID::null); @@ -5662,48 +5570,16 @@ class LLShowFloater : public view_listener_t { gViewerHtmlHelp.show(); } - else if (floater_name == "help tutorial") - { - LLFloaterHUD::showHUD(); - } else if (floater_name == "complaint reporter") { // Prevent menu from appearing in screen shot. gMenuHolder->hideMenus(); LLFloaterReporter::showFromMenu(COMPLAINT_REPORT); } - else if (floater_name == "mean events") - { - if (!gNoRender) - { - //LLFloaterBump::showInstance(); - LLFloaterReg::showInstance("bumps"); - } - } - else if (floater_name == "lag meter") - { - LLFloaterReg::showInstance("lagmeter"); - } else if (floater_name == "buy currency") { LLFloaterBuyCurrency::buyCurrency(); } - else if (floater_name == "about") - { - LLFloaterReg::showInstance("sl_about"); - } - else if (floater_name == "active speakers") - { - LLFloaterActiveSpeakers::toggleInstance(LLSD()); - } - else if (floater_name == "beacons") - { - LLFloaterBeacons::toggleInstance(LLSD()); - } - else if (floater_name == "perm prefs") - { - LLFloaterPerms::toggleInstance(LLSD()); - } else { LLFloaterReg::toggleInstance(floater_name); @@ -5722,30 +5598,6 @@ class LLFloaterVisible : public view_listener_t { new_value = LLToolBar::visible(NULL); } - else if (floater_name == "mute list") - { - new_value = LLFloaterReg::instanceVisible("mute"); - } - else if (floater_name == "camera controls") - { - new_value = LLFloaterCamera::instanceVisible(); - } - else if (floater_name == "movement controls") - { - new_value = LLFloaterMove::instanceVisible(); - } - else if (floater_name == "stat bar") - { - new_value = gSavedSettings.getBOOL("ShowDebugStats"); - } - else if (floater_name == "active speakers") - { - new_value = LLFloaterActiveSpeakers::instanceVisible(LLSD()); - } - else if (floater_name == "beacons") - { - new_value = LLFloaterBeacons::instanceVisible(LLSD()); - } else { new_value = LLFloaterReg::instanceVisible(floater_name); @@ -6440,8 +6292,8 @@ class LLToolsSelectedScriptAction : public view_listener_t msg = "RunningNot"; } LLUUID id; id.generate(); - LLFloater* floater = LLFloaterReg::getInstance(name, LLSD(id)); - LLFloaterScriptQueue* queue = dynamic_cast(floater); + + LLFloaterScriptQueue* queue =LLFloaterReg::getTypedInstance(name, LLSD(id)); if (queue) { queue->setMono(mono); @@ -6450,7 +6302,7 @@ class LLToolsSelectedScriptAction : public view_listener_t else { llwarns << "Failed to generate LLFloaterScriptQueue with action: " << action << llendl; - delete floater; + delete queue; } return true; } @@ -7016,7 +6868,7 @@ void handle_grab_texture(void* data) gInventory.updateItem(item); gInventory.notifyObservers(); - LLInventoryView* view = LLInventoryView::getActiveInventory(); + LLFloaterInventory* view = LLFloaterInventory::getActiveInventory(); // Show the preview panel for textures to let // user know that the image is now in inventory. @@ -7026,7 +6878,7 @@ void handle_grab_texture(void* data) view->getPanel()->setSelection(item_id, TAKE_FOCUS_NO); view->getPanel()->openSelected(); - //LLInventoryView::dumpSelectionInformation((void*)view); + //LLFloaterInventory::dumpSelectionInformation((void*)view); // restore keyboard focus gFocusMgr.setKeyboardFocus(focus_ctrl); } @@ -7261,10 +7113,14 @@ void handle_buy_currency_test(void*) llinfos << "buy currency url " << url << llendl; - LLFloaterHtmlCurrency* floater = LLFloaterHtmlCurrency::showInstance(url); - // Needed so we can use secondlife:///app/floater/self/close SLURLs - floater->setTrusted(true); - floater->center(); + LLFloaterHtmlCurrency* floater =LLFloaterReg::getTypedInstance("html_currency", LLSD(url)); + if(floater) + { + LLFloaterReg::showInstance("html_currency", LLSD(url)); + // Needed so we can use secondlife:///app/floater/self/close SLURLs + floater->setTrusted(true); + floater->center(); + } } void handle_rebake_textures(void*) @@ -7984,11 +7840,11 @@ void initialize_menus() // Advanced > XUI commit.add("Advanced.ReloadColorSettings", boost::bind(&LLUIColorTable::loadFromSettings, LLUIColorTable::getInstance())); - view_listener_t::addMenu(new LLAdvancedShowFontTest(), "Advanced.ShowFontTest"); view_listener_t::addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML"); view_listener_t::addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML"); view_listener_t::addMenu(new LLAdvancedToggleXUINames(), "Advanced.ToggleXUINames"); view_listener_t::addMenu(new LLAdvancedCheckXUINames(), "Advanced.CheckXUINames"); + view_listener_t::addMenu(new LLAdvancedSendTestIms(), "Advanced.SendTestIMs"); // Advanced > Character > Grab Baked Texture view_listener_t::addMenu(new LLAdvancedGrabBakedTexture(), "Advanced.GrabBakedTexture"); @@ -8024,7 +7880,6 @@ void initialize_menus() #ifndef LL_RELEASE_FOR_DOWNLOAD view_listener_t::addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); view_listener_t::addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); - view_listener_t::addMenu(new LLAdvancedMemoryLeakingSimulation(), "Advanced.MemoryLeakingSimulation"); #endif // Advanced > Network view_listener_t::addMenu(new LLAdvancedEnableMessageLog(), "Advanced.EnableMessageLog"); @@ -8072,7 +7927,6 @@ void initialize_menus() // Admin >Region view_listener_t::addMenu(new LLAdminHandleRegionDumpTempAssetData(), "Admin.HandleRegionDumpTempAssetData"); // Admin top level - view_listener_t::addMenu(new LLAdminShowGodTools(), "Admin.ShowGodTools"); view_listener_t::addMenu(new LLAdminOnSaveState(), "Admin.OnSaveState"); // Self pie menu @@ -8100,7 +7954,6 @@ void initialize_menus() view_listener_t::addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject"); // Object pie menu - view_listener_t::addMenu(new LLObjectOpen(), "Object.Open"); view_listener_t::addMenu(new LLObjectBuild(), "Object.Build"); view_listener_t::addMenu(new LLObjectTouch(), "Object.Touch"); view_listener_t::addMenu(new LLObjectSitOrStand(), "Object.SitOrStand"); @@ -8111,7 +7964,6 @@ void initialize_menus() view_listener_t::addMenu(new LLObjectMute(), "Object.Mute"); view_listener_t::addMenu(new LLObjectBuy(), "Object.Buy"); view_listener_t::addMenu(new LLObjectEdit(), "Object.Edit"); - view_listener_t::addMenu(new LLObjectInspect(), "Object.Inspect"); view_listener_t::addMenu(new LLObjectEnableOpen(), "Object.EnableOpen"); view_listener_t::addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); -- cgit v1.2.3 From f26f7e3e29019abf3a10f6925e30baca19eb4e2d Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Wed, 8 Jul 2009 05:19:19 +0000 Subject: merge -r 889-936 https://svn.aws.productengine.com/secondlife/pe/stable/ -> viewer-2-0 Also: * Moved media remote shortcut to Communicate menu * Changed mini map menu to toggle instead of show --- indra/newview/llviewermenu.cpp | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 70a6e24c8f..da3c94225b 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -159,6 +159,7 @@ #include "llresmgr.h" #include "llrootview.h" #include "llselectmgr.h" +#include "llsidetray.h" #include "llsky.h" #include "llstatusbar.h" #include "llstatview.h" @@ -3451,6 +3452,26 @@ class LLSelfEnableStandUp : public view_listener_t } }; +class LLSelfFriends : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Open "Friends" tab of the "People" panel in side tray. + LLSideTray::getInstance()->showPanel("panel_people", "friends_panel"); + return true; + } +}; + +class LLSelfGroups : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + // Open "Groups" tab of the "People" panel in side tray. + LLSideTray::getInstance()->showPanel("panel_people", "groups_panel"); + return true; + } +}; + BOOL check_admin_override(void*) { return gAgent.getAdminOverride(); @@ -3584,14 +3605,9 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat, } */ -BOOL is_agent_friend(const LLUUID& agent_id) -{ - return (LLAvatarTracker::instance().getBuddyInfo(agent_id) != NULL); -} - BOOL is_agent_mappable(const LLUUID& agent_id) { - return (is_agent_friend(agent_id) && + return (LLFriendActions::isFriend(agent_id) && LLAvatarTracker::instance().getBuddyInfo(agent_id)->isOnline() && LLAvatarTracker::instance().getBuddyInfo(agent_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) ); @@ -3604,7 +3620,7 @@ class LLAvatarEnableAddFriend : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); - bool new_value = avatar && !is_agent_friend(avatar->getID()); + bool new_value = avatar && !LLFriendActions::isFriend(avatar->getID()); return new_value; } }; @@ -5360,7 +5376,7 @@ class LLAvatarAddFriend : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); - if(avatar && !is_agent_friend(avatar->getID())) + if(avatar && !LLFriendActions::isFriend(avatar->getID())) { request_friendship(avatar->getID()); } @@ -7936,6 +7952,10 @@ void initialize_menus() view_listener_t::addMenu(new LLSelfEnableStandUp(), "Self.EnableStandUp"); view_listener_t::addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); + // we don't use boost::bind directly to delay side tray construction + view_listener_t::addMenu(new LLSelfFriends(), "Self.Friends"); + view_listener_t::addMenu(new LLSelfGroups(), "Self.Groups"); + // Avatar pie menu view_listener_t::addMenu(new LLObjectMute(), "Avatar.Mute"); view_listener_t::addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend"); -- cgit v1.2.3 From 77f56a3f3db72b2938eadb0868fc7be975dabafa Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 10 Jul 2009 22:02:26 +0000 Subject: merge QAR-1579: texture-cleanup-1. --- indra/newview/llviewermenu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index da3c94225b..0bb1bd7857 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -183,7 +183,7 @@ #include "llviewercamera.h" #include "llviewergenericmessage.h" #include "llviewergesture.h" -#include "llviewerimagelist.h" // gImageList +#include "llviewertexturelist.h" // gTextureList #include "llviewerinventory.h" #include "llviewermenufile.h" // init_menu_file() #include "llviewermessage.h" @@ -1155,7 +1155,7 @@ class LLAdvancedToggleDisableTextures : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLViewerImage::sDontLoadVolumeTextures = !LLViewerImage::sDontLoadVolumeTextures; + LLViewerTexture::sDontLoadVolumeTextures = !LLViewerTexture::sDontLoadVolumeTextures; return true; } }; @@ -1164,7 +1164,7 @@ class LLAdvancedCheckDisableTextures : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = LLViewerImage::sDontLoadVolumeTextures; // <-- make this using LLCacheControl + bool new_value = LLViewerTexture::sDontLoadVolumeTextures; // <-- make this using LLCacheControl return new_value; } }; @@ -6345,7 +6345,7 @@ void handle_selected_texture_info(void*) { if (!node->isTESelected(i)) continue; - LLViewerImage* img = node->getObject()->getTEImage(i); + LLViewerTexture* img = node->getObject()->getTEImage(i); LLUUID image_id = img->getID(); faces_per_texture[image_id].push_back(i); } @@ -6355,7 +6355,7 @@ void handle_selected_texture_info(void*) { LLUUID image_id = it->first; U8 te = it->second[0]; - LLViewerImage* img = node->getObject()->getTEImage(te); + LLViewerTexture* img = node->getObject()->getTEImage(te); S32 height = img->getHeight(); S32 width = img->getWidth(); S32 components = img->getComponents(); -- cgit v1.2.3 From 56e045547951cdad356da38ba3da4251d58d3fb8 Mon Sep 17 00:00:00 2001 From: Neal Orman Date: Tue, 14 Jul 2009 15:14:46 +0000 Subject: QAR-1602 Checkpoint for Avatar Pipeline Multiple textures branch Merging changes for first checkpoint of multiple textures branch as part of the avatar pipeline project (AVP). Functionality should be same as before, but sets up the structure that later changes build upon. Changes passed QA, merge conflicts were minimal and easily resolved. Contact Nyx with any problems with this code. -Nyx --- indra/newview/llviewermenu.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 0bb1bd7857..63854abfea 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -7393,47 +7393,47 @@ class LLEditEnableTakeOff : public view_listener_t bool new_value = false; if (clothing == "shirt") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_SHIRT); + new_value = LLAgentWearables::selfHasWearable(WT_SHIRT); } if (clothing == "pants") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_PANTS); + new_value = LLAgentWearables::selfHasWearable(WT_PANTS); } if (clothing == "shoes") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_SHOES); + new_value = LLAgentWearables::selfHasWearable(WT_SHOES); } if (clothing == "socks") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_SOCKS); + new_value = LLAgentWearables::selfHasWearable(WT_SOCKS); } if (clothing == "jacket") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_JACKET); + new_value = LLAgentWearables::selfHasWearable(WT_JACKET); } if (clothing == "gloves") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_GLOVES); + new_value = LLAgentWearables::selfHasWearable(WT_GLOVES); } if (clothing == "undershirt") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_UNDERSHIRT); + new_value = LLAgentWearables::selfHasWearable(WT_UNDERSHIRT); } if (clothing == "underpants") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_UNDERPANTS); + new_value = LLAgentWearables::selfHasWearable(WT_UNDERPANTS); } if (clothing == "skirt") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_SKIRT); + new_value = LLAgentWearables::selfHasWearable(WT_SKIRT); } if (clothing == "alpha") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_ALPHA); + new_value = LLAgentWearables::selfHasWearable(WT_ALPHA); } if (clothing == "tattoo") { - new_value = LLAgentWearables::selfHasWearable((void *)WT_TATTOO); + new_value = LLAgentWearables::selfHasWearable(WT_TATTOO); } return new_value; } -- cgit v1.2.3 From 73a97010e6c8c7874fdc1778ab46e492f77d9394 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Tue, 21 Jul 2009 00:57:23 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1059 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1070 -> svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3 --- indra/newview/llviewermenu.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 63854abfea..e06e180ed5 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -131,7 +131,7 @@ #include "llfloaterworldmap.h" #include "llfloatermemleak.h" #include "llfasttimerview.h" -#include "llfriendactions.h" +#include "llavataractions.h" #include "llmemoryview.h" #include "llgivemoney.h" #include "llgroupmgr.h" @@ -3607,7 +3607,7 @@ bool LLHaveCallingcard::operator()(LLInventoryCategory* cat, BOOL is_agent_mappable(const LLUUID& agent_id) { - return (LLFriendActions::isFriend(agent_id) && + return (LLAvatarActions::isFriend(agent_id) && LLAvatarTracker::instance().getBuddyInfo(agent_id)->isOnline() && LLAvatarTracker::instance().getBuddyInfo(agent_id)->isRightGrantedFrom(LLRelationship::GRANT_MAP_LOCATION) ); @@ -3620,7 +3620,7 @@ class LLAvatarEnableAddFriend : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); - bool new_value = avatar && !LLFriendActions::isFriend(avatar->getID()); + bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()); return new_value; } }; @@ -3644,7 +3644,7 @@ void request_friendship(const LLUUID& dest_id) } if (!fullname.empty()) { - LLFriendActions::requestFriendshipDialog(dest_id, fullname); + LLAvatarActions::requestFriendshipDialog(dest_id, fullname); } else { @@ -5376,7 +5376,7 @@ class LLAvatarAddFriend : public view_listener_t bool handleEvent(const LLSD& userdata) { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); - if(avatar && !LLFriendActions::isFriend(avatar->getID())) + if(avatar && !LLAvatarActions::isFriend(avatar->getID())) { request_friendship(avatar->getID()); } @@ -5720,7 +5720,7 @@ class LLShowAgentProfile : public view_listener_t LLVOAvatar* avatar = find_avatar_from_object(agent_id); if (avatar) { - LLFriendActions::showProfile(avatar->getID()); + LLAvatarActions::showProfile(avatar->getID()); } return true; } -- cgit v1.2.3 From e97f7728a90dd66014f6b3f0cd5e8d4c71f48691 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 30 Jul 2009 23:22:41 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1170 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1187 -> viewer-2.0.0-3 --- indra/newview/llviewermenu.cpp | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e06e180ed5..7071b65228 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -132,6 +132,7 @@ #include "llfloatermemleak.h" #include "llfasttimerview.h" #include "llavataractions.h" +#include "lllandmarkactions.h" #include "llmemoryview.h" #include "llgivemoney.h" #include "llgroupmgr.h" @@ -5270,24 +5271,6 @@ class LLWorldSetBusy : public view_listener_t } }; -bool can_create_landmark() -{ - BOOL can = FALSE; - - LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); - if (agent_parcel) -{ - - if (agent_parcel->getAllowLandmark() - || LLViewerParcelMgr::isParcelOwnedByAgent(agent_parcel, GP_LAND_ALLOW_LANDMARK)) - { - can = TRUE; - } - } - - return can; -} - class LLWorldCreateLandmark : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -6675,9 +6658,7 @@ class LLWorldEnableCreateLandmark : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = can_create_landmark(); - - return new_value; + return !LLLandmarkActions::landmarkAlreadyExists(); } }; -- cgit v1.2.3 From db5cda26676f376f18816013c0c5e3fbad5b20d0 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Mon, 3 Aug 2009 22:25:48 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1211 https://svn.aws.productengine.com/secondlife/pe/stable-1@1228 -> viewer-2.0.0-3 QA: New movement and camera controls. Test all movement and camera behavior against spec and expected behaviors, including sitting & standing. Many other changes to the bottom bar. Changes to local chat behavior. --- indra/newview/llviewermenu.cpp | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 7071b65228..d4cbe580a9 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -81,6 +81,7 @@ #include "lldrawpooltree.h" #include "llface.h" #include "llfirstuse.h" +#include "llfirsttimetipmanager.h" #include "llfloater.h" #include "llfloaterabout.h" #include "llfloaterbuycurrency.h" @@ -3439,7 +3440,7 @@ class LLSelfStandUp : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); + gAgent.standUp(); return true; } }; @@ -3448,7 +3449,7 @@ class LLSelfEnableStandUp : public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->mIsSitting; + bool new_value = gAgent.getAvatarObject() && gAgent.getAvatarObject()->isSitting(); return new_value; } }; @@ -3676,7 +3677,7 @@ bool handle_sit_or_stand() if (sitting_on_selection()) { - gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); + gAgent.standUp(); return true; } @@ -3722,7 +3723,7 @@ class LLLandSit : public view_listener_t { bool handleEvent(const LLSD& userdata) { - gAgent.setControlFlags(AGENT_CONTROL_STAND_UP); + gAgent.standUp(); LLViewerParcelMgr::getInstance()->deselectLand(); LLVector3d posGlobal = LLToolPie::getInstance()->getPick().mPosGlobal; @@ -4630,7 +4631,7 @@ BOOL sitting_on_selection() return FALSE; } - return (avatar->mIsSitting && avatar->getRoot() == root_object); + return (avatar->isSitting() && avatar->getRoot() == root_object); } class LLToolsSaveToInventory : public view_listener_t @@ -5225,6 +5226,9 @@ class LLWorldAlwaysRun : public view_listener_t // tell the simulator. gAgent.sendWalkRun(gAgent.getAlwaysRun()); + // Update Movement Controls according to AlwaysRun mode + LLFloaterMove::setAlwaysRunMode(gAgent.getAlwaysRun()); + return true; } }; @@ -5275,7 +5279,10 @@ class LLWorldCreateLandmark : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloaterReg::showInstance("add_landmark"); + LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); + + // Floater "Add Landmark" functionality moved to Side Tray + //LLFloaterReg::showInstance("add_landmark"); return true; } }; @@ -7623,7 +7630,23 @@ class LLWorldDayCycle : public view_listener_t } }; +/// Show First Time Tips calbacks +class LLHelpCheckShowFirstTimeTip : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + return LLFirstTimeTipsManager::tipsEnabled(); + } +}; +class LLHelpShowFirstTimeTip : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + LLFirstTimeTipsManager::enabledTip(!userdata.asBoolean()); + return true; + } +}; void initialize_menus() { @@ -7728,6 +7751,9 @@ void initialize_menus() view_listener_t::addMenu(new LLWorldPostProcess(), "World.PostProcess"); view_listener_t::addMenu(new LLWorldDayCycle(), "World.DayCycle"); + view_listener_t::addMenu(new LLHelpCheckShowFirstTimeTip(), "Help.CheckShowFirstTimeTip"); + view_listener_t::addMenu(new LLHelpShowFirstTimeTip(), "Help.ShowQuickTips"); + // Tools menu view_listener_t::addMenu(new LLToolsSelectTool(), "Tools.SelectTool"); view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects"); -- cgit v1.2.3 From eb853f55c07ae4a3c3f2aa05fbabcf2e4b4dc115 Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Tue, 4 Aug 2009 01:12:59 +0000 Subject: svn merge -r 128442:129343 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-18 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3 --- indra/newview/llviewermenu.cpp | 57 ++++++++---------------------------------- 1 file changed, 11 insertions(+), 46 deletions(-) (limited to 'indra/newview/llviewermenu.cpp') diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index d4cbe580a9..c7df1d9d70 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -3049,7 +3049,7 @@ class LLAvatarDebug : public view_listener_t strings.push_back(avatar->getID().asString()); LLUUID invoice; send_generic_message("dumptempassetdata", strings, invoice); - LLFloaterAvatarTextures::show( avatar->getID() ); + LLFloaterReg::showInstance( "avatar_tetures", LLSD(avatar->getID()) ); } return true; } @@ -5337,8 +5337,7 @@ void invite_to_group(const LLUUID& dest_id) LLViewerObject* dest = gObjectList.findObject(dest_id); if(dest && dest->isAvatar()) { - LLFloaterGroupPicker* widget; - widget = LLFloaterGroupPicker::showInstance(LLSD(gAgent.getID())); + LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance("group_picker", LLSD(gAgent.getID())); if (widget) { widget->center(); @@ -5540,11 +5539,7 @@ class LLShowFloater : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string floater_name = userdata.asString(); - if (floater_name == "gestures") - { - LLFloaterGesture::toggleVisibility(); - } - else if (floater_name == "appearance") + if (floater_name == "appearance") { if (gAgentWearables.areWearablesLoaded()) { @@ -5555,10 +5550,6 @@ class LLShowFloater : public view_listener_t { LLToolBar::toggle(NULL); } - else if (floater_name == "my land") - { - LLFloaterLandHoldings::show(NULL); - } else if (floater_name == "buy land") { if (LLViewerParcelMgr::getInstance()->selectionEmpty()) @@ -6815,7 +6806,7 @@ void handle_debug_avatar_textures(void*) LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (objectp) { - LLFloaterAvatarTextures::show(objectp->getID()); + LLFloaterReg::showInstance( "avatar_tetures", LLSD(objectp->getID()) ); } } @@ -7070,8 +7061,8 @@ void handle_load_from_xml(void*) if (picker.getOpenFile(LLFilePicker::FFLOAD_XML)) { std::string filename = picker.getFirstFile(); - LLFloater* floater = new LLFloater(); - LLUICtrlFactory::getInstance()->buildFloater(floater, filename); + LLFloater* floater = new LLFloater(LLSD()); + LLUICtrlFactory::getInstance()->buildFloater(floater, filename, NULL); } } @@ -7117,14 +7108,7 @@ void handle_buy_currency_test(void*) llinfos << "buy currency url " << url << llendl; - LLFloaterHtmlCurrency* floater =LLFloaterReg::getTypedInstance("html_currency", LLSD(url)); - if(floater) - { - LLFloaterReg::showInstance("html_currency", LLSD(url)); - // Needed so we can use secondlife:///app/floater/self/close SLURLs - floater->setTrusted(true); - floater->center(); - } + LLFloaterReg::showInstance("buy_currency_html", LLSD(url)); } void handle_rebake_textures(void*) @@ -7524,16 +7508,7 @@ class LLWorldEnvSettings : public view_listener_t if (tod == "editor") { // if not there or is hidden, show it - if( !LLFloaterEnvSettings::isOpen() || - !LLFloaterEnvSettings::instance()->getVisible()) { - LLFloaterEnvSettings::show(); - - // otherwise, close it button acts like a toggle - } - else - { - LLFloaterEnvSettings::instance()->closeFloater(); - } + LLFloaterReg::toggleInstance("env_settings"); return true; } @@ -7595,17 +7570,7 @@ class LLWorldWaterSettings : public view_listener_t { bool handleEvent(const LLSD& userdata) { - // if not there or is hidden, show it - if( !LLFloaterWater::isOpen() || - !LLFloaterWater::instance()->getVisible()) { - LLFloaterWater::show(); - - // otherwise, close it button acts like a toggle - } - else - { - LLFloaterWater::instance()->closeFloater(); - } + LLFloaterReg::toggleInstance("env_water"); return true; } }; @@ -7615,7 +7580,7 @@ class LLWorldPostProcess : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloaterPostProcess::show(); + LLFloaterReg::showInstance("env_post_process"); return true; } }; @@ -7625,7 +7590,7 @@ class LLWorldDayCycle : public view_listener_t { bool handleEvent(const LLSD& userdata) { - LLFloaterDayCycle::show(); + LLFloaterReg::showInstance("env_day_cycle"); return true; } }; -- cgit v1.2.3