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/llnavigationbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llnavigationbar.cpp') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index cf1d9a5d86..b4a6e63de8 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -231,7 +231,7 @@ BOOL LLNavigationBar::postBuild() search_btn->setClickedCallback(boost::bind(&LLNavigationBar::onSearchCommit, this)); // Load the location field context menu - mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_navbar.xml", gMenuHolder); + mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_navbar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); if (!mLocationContextMenu) { llwarns << "Error loading navigation bar context menu" << llendl; -- cgit v1.2.3 From 8016e73cc0a2a27062fae27e609535e002eef362 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Thu, 9 Jul 2009 22:30:15 +0000 Subject: svn merge -r126726:126727 svn+ssh://svn.lindenlab.com/linden/branches/skinning/skinning-15/ DEV-35109 Nav bar does not record teleports taken by any method other than typing into nav bar DEV-35117 Hard to open local chat, needs bottom bar widget for now hiding test IM floaters --- indra/newview/llnavigationbar.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llnavigationbar.cpp') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index b4a6e63de8..df43b069c8 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -415,10 +415,7 @@ void LLNavigationBar::onRegionNameResponse( S32 selected_item = mCmbLocation->getCurrentIndex(); if (selected_item == -1) // user has typed text { - LLLocationHistory* lh = LLLocationHistory::getInstance(); mCmbLocation->add(typed_location); - lh->addItem(typed_location); - lh->save(); } // Teleport to the location. -- cgit v1.2.3 From 408bed3d6b01d654d460b9ee0d929370194d8f9a Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 15 Jul 2009 20:20:30 +0000 Subject: Revert rev 126736 for DEV-35109 which made location history in nav bar show all teleports instead of only those typed. viewer-2 now meets current spec, but spec is under discussion and Product Engine may be asked to reimplement something different. Merging revisions 126736-126735 of svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3 into D:\viewer-2.0.0-3, respecting ancestry --- indra/newview/llnavigationbar.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llnavigationbar.cpp') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index df43b069c8..b4a6e63de8 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -415,7 +415,10 @@ void LLNavigationBar::onRegionNameResponse( S32 selected_item = mCmbLocation->getCurrentIndex(); if (selected_item == -1) // user has typed text { + LLLocationHistory* lh = LLLocationHistory::getInstance(); mCmbLocation->add(typed_location); + lh->addItem(typed_location); + lh->save(); } // Teleport to the location. -- cgit v1.2.3 From ca51e8f33dfa0cd455438f11902fb1d839bf6206 Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 27 Jul 2009 16:50:01 +0000 Subject: Merge xui-army-8 to pick up 2+ weeks of art, colors, and dialog layout changes. svn merge -r128075:128364 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/xui-army-8 --- indra/newview/llnavigationbar.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'indra/newview/llnavigationbar.cpp') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index b4a6e63de8..fbeff2d628 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -176,7 +176,8 @@ LLNavigationBar::LLNavigationBar() mBtnHome(NULL), mBtnHelp(NULL), mCmbLocation(NULL), - mLeSearch(NULL) + mLeSearch(NULL), + mPurgeTPHistoryItems(false) { setIsChrome(TRUE); @@ -247,6 +248,12 @@ BOOL LLNavigationBar::postBuild() void LLNavigationBar::draw() { + if(mPurgeTPHistoryItems) + { + LLTeleportHistory::getInstance()->purgeItems(); + onTeleportHistoryChanged(); + mPurgeTPHistoryItems = false; + } LLPanel::draw(); } @@ -531,3 +538,12 @@ void LLNavigationBar::invokeSearch(std::string search_text) { LLFloaterReg::showInstance("search", LLSD().insert("panel", "all").insert("id", LLSD(search_text))); } + +void LLNavigationBar::clearHistoryCache() +{ + mCmbLocation->removeall(); + LLLocationHistory* lh = LLLocationHistory::getInstance(); + lh->removeItems(); + lh->save(); + mPurgeTPHistoryItems= true; +} -- cgit v1.2.3 From 8f7ec64899c54dcee6caa0307510cc4003ba7bdd Mon Sep 17 00:00:00 2001 From: James Cook Date: Mon, 27 Jul 2009 17:56:26 +0000 Subject: Merged skinning-17 into viewer-2 for bug fixes. Commented out new IM window for now, not complete. Merging revisions 127913-128319 of svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-17 into D:\viewer-2.0.0-3, respecting ancestry --- indra/newview/llnavigationbar.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'indra/newview/llnavigationbar.cpp') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index fbeff2d628..c0bddd101e 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -45,6 +45,7 @@ #include "lllocationhistory.h" #include "lllocationinputctrl.h" #include "llteleporthistory.h" +#include "llsearcheditor.h" #include "llslurl.h" #include "llurlsimstring.h" #include "llviewerinventory.h" @@ -204,12 +205,10 @@ BOOL LLNavigationBar::postBuild() mBtnHelp = getChild("help_btn"); mCmbLocation= getChild("location_combo"); - mLeSearch = getChild("search_input"); - - LLButton* search_btn = getChild("search_btn"); + mLeSearch = getChild("search_input"); if (!mBtnBack || !mBtnForward || !mBtnHome || !mBtnHelp || - !mCmbLocation || !mLeSearch || !search_btn) + !mCmbLocation || !mLeSearch) { llwarns << "Malformed navigation bar" << llendl; return FALSE; @@ -229,7 +228,6 @@ BOOL LLNavigationBar::postBuild() mCmbLocation->setSelectionCallback(boost::bind(&LLNavigationBar::onLocationSelection, this)); mLeSearch->setCommitCallback(boost::bind(&LLNavigationBar::onSearchCommit, this)); - search_btn->setClickedCallback(boost::bind(&LLNavigationBar::onSearchCommit, this)); // Load the location field context menu mLocationContextMenu = LLUICtrlFactory::getInstance()->createFromFile("menu_navbar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); @@ -306,7 +304,7 @@ void LLNavigationBar::onHelpButtonClicked() void LLNavigationBar::onSearchCommit() { - invokeSearch(mLeSearch->getText()); + invokeSearch(mLeSearch->getValue().asString()); } void LLNavigationBar::onTeleportHistoryMenuItemClicked(const LLSD& userdata) -- 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/llnavigationbar.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'indra/newview/llnavigationbar.cpp') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index c0bddd101e..58ec2d24a8 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -42,6 +42,7 @@ #include "llagent.h" #include "llfloaterhtmlhelp.h" +#include "lllandmarkactions.h" #include "lllocationhistory.h" #include "lllocationinputctrl.h" #include "llteleporthistory.h" @@ -175,7 +176,6 @@ LLNavigationBar::LLNavigationBar() mBtnBack(NULL), mBtnForward(NULL), mBtnHome(NULL), - mBtnHelp(NULL), mCmbLocation(NULL), mLeSearch(NULL), mPurgeTPHistoryItems(false) @@ -202,12 +202,11 @@ BOOL LLNavigationBar::postBuild() mBtnBack = getChild("back_btn"); mBtnForward = getChild("forward_btn"); mBtnHome = getChild("home_btn"); - mBtnHelp = getChild("help_btn"); mCmbLocation= getChild("location_combo"); mLeSearch = getChild("search_input"); - if (!mBtnBack || !mBtnForward || !mBtnHome || !mBtnHelp || + if (!mBtnBack || !mBtnForward || !mBtnHome || !mCmbLocation || !mLeSearch) { llwarns << "Malformed navigation bar" << llendl; @@ -223,7 +222,6 @@ BOOL LLNavigationBar::postBuild() mBtnForward->setHeldDownCallback(boost::bind(&LLNavigationBar::onBackOrForwardButtonHeldDown, this, _2)); mBtnHome->setClickedCallback(boost::bind(&LLNavigationBar::onHomeButtonClicked, this)); - mBtnHelp->setClickedCallback(boost::bind(&LLNavigationBar::onHelpButtonClicked, this)); mCmbLocation->setSelectionCallback(boost::bind(&LLNavigationBar::onLocationSelection, this)); @@ -297,11 +295,6 @@ void LLNavigationBar::onHomeButtonClicked() gAgent.teleportHome(); } -void LLNavigationBar::onHelpButtonClicked() -{ - gViewerHtmlHelp.show(); -} - void LLNavigationBar::onSearchCommit() { invokeSearch(mLeSearch->getValue().asString()); @@ -523,6 +516,10 @@ bool LLNavigationBar::onLocationContextMenuItemEnabled(const LLSD& userdata) { return location_entry->canSelectAll(); } + else if(item == std::string("can_landmark")) + { + return !LLLandmarkActions::landmarkAlreadyExists(); + } return false; } -- 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/llnavigationbar.cpp | 46 ++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 17 deletions(-) (limited to 'indra/newview/llnavigationbar.cpp') diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index 58ec2d24a8..06cab9afb0 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -47,12 +47,15 @@ #include "lllocationinputctrl.h" #include "llteleporthistory.h" #include "llsearcheditor.h" +#include "llsidetray.h" #include "llslurl.h" #include "llurlsimstring.h" #include "llviewerinventory.h" #include "llviewermenu.h" #include "llviewerparcelmgr.h" #include "llworldmap.h" +#include "llappviewer.h" +#include "llviewercontrol.h" //-- LLTeleportHistoryMenuItem ----------------------------------------------- @@ -190,6 +193,9 @@ LLNavigationBar::LLNavigationBar() // navigation bar can never get a tab setFocusRoot(FALSE); + + // set a listener function for LoginComplete event + LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLNavigationBar::handleLoginComplete, this)); } LLNavigationBar::~LLNavigationBar() @@ -253,7 +259,7 @@ void LLNavigationBar::draw() LLPanel::draw(); } -BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask) +BOOL LLNavigationBar::handleRightMouseUp(S32 x, S32 y, MASK mask) { // *HACK. We should use mCmbLocation's right click callback instead. @@ -271,7 +277,7 @@ BOOL LLNavigationBar::handleRightMouseDown(S32 x, S32 y, MASK mask) } return TRUE; } - return LLPanel:: handleRightMouseDown(x, y, mask); + return LLPanel:: handleRightMouseUp(x, y, mask); } void LLNavigationBar::onBackButtonClicked() @@ -410,21 +416,26 @@ void LLNavigationBar::onRegionNameResponse( } // Location is valid. Add it to the typed locations history. + // If user has typed text this variable will contain -1. S32 selected_item = mCmbLocation->getCurrentIndex(); - if (selected_item == -1) // user has typed text - { - LLLocationHistory* lh = LLLocationHistory::getInstance(); - mCmbLocation->add(typed_location); - lh->addItem(typed_location); - lh->save(); - } + + /* + LLLocationHistory* lh = LLLocationHistory::getInstance(); + lh->addItem(selected_item == -1 ? typed_location : mCmbLocation->getSelectedItemLabel()); + lh->save(); + */ // Teleport to the location. LLVector3d region_pos = from_region_handle(region_handle); LLVector3d global_pos = region_pos + (LLVector3d) local_coords; + llinfos << "Teleporting to: " << global_pos << llendl; gAgent.teleportViaLocation(global_pos); + + LLLocationHistory* lh = LLLocationHistory::getInstance(); + lh->addItem(selected_item == -1 ? typed_location : mCmbLocation->getSelectedItemLabel()); + lh->save(); } void LLNavigationBar::showTeleportHistoryMenu() @@ -456,18 +467,16 @@ void LLNavigationBar::onLocationContextMenuItemClicked(const LLSD& userdata) std::string item = userdata.asString(); LLLineEditor* location_entry = mCmbLocation->getTextEntry(); - if (item == std::string("copy_url")) + if (item == std::string("show_coordinates")) { - std::string sl_url = gAgent.getSLURL(); - LLView::getWindow()->copyTextToClipboard(utf8str_to_wstring(sl_url)); - - LLSD args; - args["SLURL"] = sl_url; - LLNotifications::instance().add("CopySLURL", args); + gSavedSettings.setBOOL("ShowCoordinatesOption",!gSavedSettings.getBOOL("ShowCoordinatesOption")); } else if (item == std::string("landmark")) { - 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"); } else if (item == std::string("cut")) { @@ -519,6 +528,9 @@ bool LLNavigationBar::onLocationContextMenuItemEnabled(const LLSD& userdata) else if(item == std::string("can_landmark")) { return !LLLandmarkActions::landmarkAlreadyExists(); + }else if(item == std::string("show_coordinates")){ + + return gSavedSettings.getBOOL("ShowCoordinatesOption"); } return false; -- cgit v1.2.3