From 86b279770167bfae0894d1851c211f7309617faf Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 2 Oct 2010 05:25:11 -0700 Subject: Applied patch by Ansariel Hiller for #568: reload balance option in the advanced menu. Patch originally from Phoenix. I've modified it to support our currency changes, too --- linden/indra/newview/llviewermenu.cpp | 22 +++++++++++++++++++++- .../skins/default/xui/en-us/menu_viewer.xml | 5 +++++ 2 files changed, 26 insertions(+), 1 deletion(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 7526944..6ec7e46 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -457,6 +457,7 @@ void dump_inventory(void*); void edit_ui(void*); void toggle_visibility(void*); BOOL get_visibility(void*); +void reload_linden_balance(void*); // Avatar Pie menu void request_friendship(const LLUUID& agent_id); @@ -678,6 +679,8 @@ void init_menus() gMenuHolder->childSetLabelArg("ImportUpload", "[UPLOADFEE]", fee); gMenuHolder->childSetLabelArg("Buy and Sell L$...", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); + gMenuHolder->childSetLabelArg("Reload Balance", "[CURRENCY]", + gHippoGridManager->getConnectedGrid()->getCurrencySymbol()); gAFKMenu = gMenuBarView->getChild("Set Away", TRUE); gBusyMenu = gMenuBarView->getChild("Set Busy", TRUE); @@ -1060,6 +1063,7 @@ void init_debug_ui_menu(LLMenuGL* menu) { menu->append(new LLMenuItemCheckGL("Use default system color picker", menu_toggle_control, NULL, menu_check_control, (void*)"UseDefaultColorPicker")); menu->append(new LLMenuItemCheckGL("Show search panel in overlay bar", menu_toggle_control, NULL, menu_check_control, (void*)"ShowSearchBar")); + menu->append(new LLMenuItemCallGL("Reload L$ balance", &reload_linden_balance, NULL, NULL, 'B', MASK_CONTROL | MASK_ALT)); menu->appendSeparator(); menu->append(new LLMenuItemCallGL("Web Browser Test", &handle_web_browser_test)); @@ -5831,6 +5835,11 @@ class LLObjectEnableSitOrStand : public view_listener_t } }; +void reload_linden_balance(void*) +{ + LLStatusBar::sendMoneyBalanceRequest(); +} + void edit_ui(void*) { LLFloater::setEditModeEnabled(!LLFloater::getEditModeEnabled()); @@ -9467,7 +9476,17 @@ class LLAdvancedToggleEditableUI : public view_listener_t // become a menu_item_check. Need to add check_edit_ui(void*) // or functional equivalent to do that. - +///////////////////// +// Reload L$ balance // +///////////////////// +class LLAdvancedReloadBalance : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + reload_linden_balance(NULL); + return true; + } +}; ///////////////////// // DUMP SELECT MGR // @@ -11284,6 +11303,7 @@ void initialize_menus() // Advanced > UI addMenu(new LLAdvancedWebBrowserTest(), "Advanced.WebBrowserTest"); addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI"); + addMenu(new LLAdvancedReloadBalance(), "Advanced.ReloadBalance"); //addMenu(new LLAdvancedCheckEditableUI(), "Advanced.CheckEditableUI"); addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml index 0a27f85..66d78bd 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml @@ -1554,6 +1554,11 @@ + + + + + -- cgit v1.1