summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-21 15:54:02 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-06-21 15:54:02 -0400
commit4eab82d5e2d71f9b0d53f5a92bc65ecc3320fee7 (patch)
tree0298f612d60eef5a3bea57e625b2582f50d37c44 /indra/newview/llviewermenu.cpp
parentc838c6b64563545c15006ac20fd88afe66e5bbfc (diff)
parent17f98b36d3e3bebdcb331f91fc0f542f618be71d (diff)
merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp59
1 files changed, 36 insertions, 23 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 2c7ae539ce..635cc361f3 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3278,16 +3278,6 @@ void handle_buy_object(LLSaleInfo sale_info)
return;
}
- S32 price = sale_info.getSalePrice();
-
- if (price > 0 && price > gStatusBar->getBalance())
- {
- LLStringUtil::format_map_t args;
- args["AMOUNT"] = llformat("%d", price);
- LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price );
- return;
- }
-
LLFloaterBuy::show(sale_info);
}
@@ -3788,17 +3778,6 @@ class LLViewMouselook : public view_listener_t
}
};
-class LLViewFullscreen : public view_listener_t
-{
- bool handleEvent(const LLSD& userdata)
- {
- // we no longer permit full screen mode EXT-6775
- // gViewerWindow->toggleFullscreen(TRUE);
- llwarns << "full screen mode no longer supported" << llendl;
- return true;
- }
-};
-
class LLViewDefaultUISize : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@@ -4554,6 +4533,16 @@ void handle_buy()
BOOL valid = LLSelectMgr::getInstance()->selectGetSaleInfo(sale_info);
if (!valid) return;
+ S32 price = sale_info.getSalePrice();
+
+ if (price > 0 && price > gStatusBar->getBalance())
+ {
+ LLStringUtil::format_map_t args;
+ args["AMOUNT"] = llformat("%d", price);
+ LLBuyCurrencyHTML::openCurrencyFloater( LLTrans::getString("this_object_costs", args), price );
+ return;
+ }
+
if (sale_info.getSaleType() == LLSaleInfo::FS_CONTENTS)
{
handle_buy_contents(sale_info);
@@ -7209,7 +7198,7 @@ void handle_web_browser_test(const LLSD& param)
{
url = "about:blank";
}
- LLWeb::loadURL(url);
+ LLWeb::loadURLInternal(url);
}
void handle_buy_currency_test(void*)
@@ -7704,6 +7693,31 @@ void show_navbar_context_menu(LLView* ctrl, S32 x, S32 y)
LLMenuGL::showPopup(ctrl, show_navbar_context_menu, x, y);
}
+void show_topinfobar_context_menu(LLView* ctrl, S32 x, S32 y)
+{
+ static LLMenuGL* show_topbarinfo_context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_topinfobar.xml",
+ gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+
+ LLMenuItemGL* landmark_item = show_topbarinfo_context_menu->getChild<LLMenuItemGL>("Landmark");
+ if (!LLLandmarkActions::landmarkAlreadyExists())
+ {
+ landmark_item->setLabel(LLTrans::getString("AddLandmarkNavBarMenu"));
+ }
+ else
+ {
+ landmark_item->setLabel(LLTrans::getString("EditLandmarkNavBarMenu"));
+ }
+
+ if(gMenuHolder->hasVisibleMenu())
+ {
+ gMenuHolder->hideMenus();
+ }
+
+ show_topbarinfo_context_menu->buildDrawLabels();
+ show_topbarinfo_context_menu->updateParent(LLMenuGL::sMenuContainer);
+ LLMenuGL::showPopup(ctrl, show_topbarinfo_context_menu, x, y);
+}
+
void initialize_edit_menu()
{
view_listener_t::addMenu(new LLEditUndo(), "Edit.Undo");
@@ -7783,7 +7797,6 @@ void initialize_menus()
view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut");
view_listener_t::addMenu(new LLZoomer(1/1.2f), "View.ZoomIn");
view_listener_t::addMenu(new LLZoomer(DEFAULT_FIELD_OF_VIEW, false), "View.ZoomDefault");
- view_listener_t::addMenu(new LLViewFullscreen(), "View.Fullscreen");
view_listener_t::addMenu(new LLViewDefaultUISize(), "View.DefaultUISize");
view_listener_t::addMenu(new LLViewEnableMouselook(), "View.EnableMouselook");