diff options
author | Jacek Antonelli | 2009-09-05 02:21:07 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-09-05 02:21:07 -0500 |
commit | bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304 (patch) | |
tree | 73899f68a266a82d2046371d00f3ed427361d84e | |
parent | Applied Kitty Barnett's RLVa 1.0.1h (Restrained Life) patch. (diff) | |
download | meta-impy-bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304.zip meta-impy-bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304.tar.gz meta-impy-bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304.tar.bz2 meta-impy-bf1c73cbd2482eae29b94ddd0e7e5a4c6281a304.tar.xz |
Converted RLVa menu items to XUI.
-rw-r--r-- | ChangeLog.txt | 8 | ||||
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 50 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 43 |
3 files changed, 101 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 37b2666..15b30f8 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,3 +1,11 @@ | |||
1 | 2009-09-05 Jacek Antonelli <jacek.antonelli@gmail.com> | ||
2 | |||
3 | * Converted RLVa menu items to XUI. | ||
4 | |||
5 | modified: linden/indra/newview/llviewermenu.cpp | ||
6 | modified: linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | ||
7 | |||
8 | |||
1 | 2009-09-04 Jacek Antonelli <jacek.antonelli@gmail.com> | 9 | 2009-09-04 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 10 | ||
3 | * Applied Kitty Barnett's RLVa 1.0.1h (Restrained Life) patch. | 11 | * Applied Kitty Barnett's RLVa 1.0.1h (Restrained Life) patch. |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 6bd38e6..415064d 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -10071,6 +10071,49 @@ class LLAvatarReportAbuse : public view_listener_t | |||
10071 | 10071 | ||
10072 | 10072 | ||
10073 | 10073 | ||
10074 | /////////////// | ||
10075 | // RLVa Main // | ||
10076 | /////////////// | ||
10077 | |||
10078 | |||
10079 | class RLVaMainToggle : public view_listener_t | ||
10080 | { | ||
10081 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10082 | { | ||
10083 | rlvDbgToggleEnabled(NULL); | ||
10084 | return true; | ||
10085 | } | ||
10086 | }; | ||
10087 | |||
10088 | class RLVaMainCheck : public view_listener_t | ||
10089 | { | ||
10090 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10091 | { | ||
10092 | bool new_value = rlvDbgGetEnabled(NULL); | ||
10093 | std::string control_name = userdata["control"].asString(); | ||
10094 | gMenuHolder->findControl(control_name)->setValue(new_value); | ||
10095 | return true; | ||
10096 | } | ||
10097 | }; | ||
10098 | |||
10099 | |||
10100 | |||
10101 | //////////////////// | ||
10102 | // RLVa BEHAVIORS // | ||
10103 | //////////////////// | ||
10104 | |||
10105 | |||
10106 | class RLVaBehaviorsShow : public view_listener_t | ||
10107 | { | ||
10108 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
10109 | { | ||
10110 | RlvFloaterBehaviour::show(NULL); | ||
10111 | return true; | ||
10112 | } | ||
10113 | }; | ||
10114 | |||
10115 | |||
10116 | |||
10074 | static void addMenu(view_listener_t *menu, const char *name) | 10117 | static void addMenu(view_listener_t *menu, const char *name) |
10075 | { | 10118 | { |
10076 | sMenus.push_back(menu); | 10119 | sMenus.push_back(menu); |
@@ -10440,4 +10483,11 @@ void initialize_menus() | |||
10440 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); | 10483 | addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); |
10441 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); | 10484 | addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); |
10442 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); | 10485 | addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); |
10486 | |||
10487 | |||
10488 | // RLVa | ||
10489 | addMenu(new RLVaMainToggle(), "RLVa.Main.Toggle"); | ||
10490 | addMenu(new RLVaMainCheck(), "RLVa.Main.Enabled"); | ||
10491 | addMenu(new RLVaBehaviorsShow(), "RLVa.Behaviors.Show"); | ||
10492 | |||
10443 | } | 10493 | } |
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 f837029..11e54ef 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 | |||
@@ -1367,6 +1367,42 @@ | |||
1367 | </menu> | 1367 | </menu> |
1368 | 1368 | ||
1369 | 1369 | ||
1370 | <!-- RLVa --> | ||
1371 | |||
1372 | <menu name="RLVa" drop_shadow="true" opaque="true" tear_off="true"> | ||
1373 | |||
1374 | <menu_item_check name="Enable Wear" label="Enable Wear"> | ||
1375 | <on_click function="ToggleControl" userdata="RLVaEnableWear" /> | ||
1376 | <on_check control="RLVaEnableWear" /> | ||
1377 | </menu_item_check> | ||
1378 | |||
1379 | <menu_item_check name="Hide locked layers" label="Hide locked layers"> | ||
1380 | <on_click function="ToggleControl" userdata="RLVaHideLockedLayers" /> | ||
1381 | <on_check control="RLVaHideLockedLayers" /> | ||
1382 | </menu_item_check> | ||
1383 | |||
1384 | <menu_item_check name="Hide locked attachments" | ||
1385 | label="Hide locked attachments"> | ||
1386 | <on_click function="ToggleControl" | ||
1387 | userdata="RLVaHideLockedAttachments" /> | ||
1388 | <on_check control="RLVaHideLockedAttachments" /> | ||
1389 | </menu_item_check> | ||
1390 | |||
1391 | <!-- | ||
1392 | <menu_item_check name="Hide locked inventory" | ||
1393 | label="Hide locked inventory"> | ||
1394 | <on_click function="ToggleControl" | ||
1395 | userdata="RLVaHideLockedInventory" /> | ||
1396 | <on_check control="RLVaHideLockedInventory" /> | ||
1397 | </menu_item_check> | ||
1398 | --> | ||
1399 | |||
1400 | <menu_item_call name="Restrictions..." label="Restrictions..."> | ||
1401 | <on_click function="RLVa.Behaviors.Show" userdata="" /> | ||
1402 | </menu_item_call> | ||
1403 | |||
1404 | </menu> | ||
1405 | |||
1370 | 1406 | ||
1371 | <!-- UI --> | 1407 | <!-- UI --> |
1372 | 1408 | ||
@@ -1886,6 +1922,13 @@ | |||
1886 | userdata="ShowConsoleWindow" /> | 1922 | userdata="ShowConsoleWindow" /> |
1887 | <on_check control="ShowConsoleWindow" /> | 1923 | <on_check control="ShowConsoleWindow" /> |
1888 | </menu_item_check> | 1924 | </menu_item_check> |
1925 | |||
1926 | <menu_item_check name="Restrained Life Active" | ||
1927 | label="Restrained Life Active"> | ||
1928 | <on_click function="RLVa.Main.Toggle" /> | ||
1929 | <on_check function="RLVa.Main.Enabled" /> | ||
1930 | </menu_item_check> | ||
1931 | |||
1889 | <menu_item_check name="Output Debug Minidump" | 1932 | <menu_item_check name="Output Debug Minidump" |
1890 | label="Output Debug Minidump"> | 1933 | label="Output Debug Minidump"> |
1891 | <on_click function="ToggleControl" | 1934 | <on_click function="ToggleControl" |