diff options
author | McCabe Maxsted | 2009-09-27 21:44:44 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-09-27 21:44:44 -0700 |
commit | a8477f3570e249ee8b4a089340001ff9b26f69c0 (patch) | |
tree | 4c81383dc2b4bb650141147a08151c3f0be9547e | |
parent | Show disabled buttons for own profile rather than hiding them (diff) | |
parent | Rearranged the Import stuff in the File menu. (diff) | |
download | meta-impy-a8477f3570e249ee8b4a089340001ff9b26f69c0.zip meta-impy-a8477f3570e249ee8b4a089340001ff9b26f69c0.tar.gz meta-impy-a8477f3570e249ee8b4a089340001ff9b26f69c0.tar.bz2 meta-impy-a8477f3570e249ee8b4a089340001ff9b26f69c0.tar.xz |
Merge jacek/next into 1.2.0-next
-rw-r--r-- | ChangeLog.txt | 51 | ||||
-rw-r--r-- | linden/indra/llcommon/llversionviewer.h | 4 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 3 | ||||
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 54 | ||||
-rw-r--r-- | linden/indra/newview/primbackup.cpp | 107 | ||||
-rw-r--r-- | linden/indra/newview/primbackup.h | 2 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml | 2 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | 18 |
8 files changed, 126 insertions, 115 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 9b09fac..9e31c0f 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,3 +1,34 @@ | |||
1 | 2009-09-27 Jacek Antonelli <jacek.antonelli@gmail.com> | ||
2 | |||
3 | * Rearranged the Import stuff in the File menu. | ||
4 | |||
5 | modified: linden/indra/newview/skins/default/xui/en-us/menu_viewer.xml | ||
6 | |||
7 | |||
8 | * Changed "Backup" to "Export" in object pie menu. | ||
9 | |||
10 | modified: linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml | ||
11 | |||
12 | |||
13 | * Fixed and cleaned up the export permissions check. | ||
14 | |||
15 | modified: linden/indra/newview/llviewermenu.cpp | ||
16 | modified: linden/indra/newview/primbackup.cpp | ||
17 | modified: linden/indra/newview/primbackup.h | ||
18 | |||
19 | |||
20 | * Updated Imprudence version to "1.2.0 beta". | ||
21 | |||
22 | linden/indra/llcommon/llversionviewer.h | ||
23 | |||
24 | |||
25 | * Re-enabled "allow first life" userauth stuff. | ||
26 | It was commented out when grid manager was added, but it | ||
27 | makes certain Profile window pieces disappear. | ||
28 | |||
29 | modified: linden/indra/newview/llstartup.cpp | ||
30 | |||
31 | |||
1 | 2009-09-27 McCabe Maxsted <hakushakukun@gmail.com> | 32 | 2009-09-27 McCabe Maxsted <hakushakukun@gmail.com> |
2 | 33 | ||
3 | * Show disabled buttons for own profile rather than hiding them. | 34 | * Show disabled buttons for own profile rather than hiding them. |
@@ -63,7 +94,7 @@ | |||
63 | 94 | ||
64 | 95 | ||
65 | * Changes to make the grid manager compile on Windows. | 96 | * Changes to make the grid manager compile on Windows. |
66 | 97 | ||
67 | modified: linden/indra/newview/hippoGridManager.cpp | 98 | modified: linden/indra/newview/hippoGridManager.cpp |
68 | modified: linden/indra/newview/hippoLimits.cpp | 99 | modified: linden/indra/newview/hippoLimits.cpp |
69 | modified: linden/indra/newview/hippoRestRequest.cpp | 100 | modified: linden/indra/newview/hippoRestRequest.cpp |
@@ -85,11 +116,11 @@ | |||
85 | 116 | ||
86 | 2009-09-26 McCabe Maxsted <hakushakukun@gmail.com> | 117 | 2009-09-26 McCabe Maxsted <hakushakukun@gmail.com> |
87 | 118 | ||
88 | * Made the windlight floater toggle. | 119 | * Made the windlight floater toggle. |
89 | 120 | ||
90 | modified: linden/indra/newview/llfloaterwindlight.cpp | 121 | modified: linden/indra/newview/llfloaterwindlight.cpp |
91 | 122 | ||
92 | 123 | ||
93 | * Added select Torley Windlight presets to Imprudence. | 124 | * Added select Torley Windlight presets to Imprudence. |
94 | Presets good for photography, mainly. | 125 | Presets good for photography, mainly. |
95 | 126 | ||
@@ -142,14 +173,14 @@ | |||
142 | new file: linden/indra/newview/app_settings/windlight/skies/%5BTOR%5D%20Teak%20weak.xml | 173 | new file: linden/indra/newview/app_settings/windlight/skies/%5BTOR%5D%20Teak%20weak.xml |
143 | new file: linden/indra/newview/app_settings/windlight/skies/%5BTOR%5D%20Wuxia%20nights.xml | 174 | new file: linden/indra/newview/app_settings/windlight/skies/%5BTOR%5D%20Wuxia%20nights.xml |
144 | 175 | ||
145 | 176 | ||
146 | * Removed overridden /oy compiler option. | 177 | * Removed overridden /oy compiler option. |
147 | 178 | ||
148 | modified: linden/indra/cmake/00-Common.cmake | 179 | modified: linden/indra/cmake/00-Common.cmake |
149 | 180 | ||
150 | 181 | ||
151 | * Changed radar label from 'meters' to 'm'. | 182 | * Changed radar label from 'meters' to 'm'. |
152 | 183 | ||
153 | modified: linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml | 184 | modified: linden/indra/newview/skins/default/xui/en-us/floater_mini_map.xml |
154 | 185 | ||
155 | 186 | ||
diff --git a/linden/indra/llcommon/llversionviewer.h b/linden/indra/llcommon/llversionviewer.h index 34fb615..b8f7ae8 100644 --- a/linden/indra/llcommon/llversionviewer.h +++ b/linden/indra/llcommon/llversionviewer.h | |||
@@ -43,8 +43,8 @@ const char * const LL_VIEWER_NAME = "Second Life"; | |||
43 | const char * const IMP_VIEWER_NAME = "Imprudence"; | 43 | const char * const IMP_VIEWER_NAME = "Imprudence"; |
44 | 44 | ||
45 | const S32 IMP_VERSION_MAJOR = 1; | 45 | const S32 IMP_VERSION_MAJOR = 1; |
46 | const S32 IMP_VERSION_MINOR = 1; | 46 | const S32 IMP_VERSION_MINOR = 2; |
47 | const S32 IMP_VERSION_PATCH = 0; | 47 | const S32 IMP_VERSION_PATCH = 0; |
48 | const char * const IMP_VERSION_TEST = ""; | 48 | const char * const IMP_VERSION_TEST = "beta"; |
49 | 49 | ||
50 | #endif | 50 | #endif |
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 9b46054..6839a4f 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp | |||
@@ -2130,7 +2130,6 @@ bool idle_startup() | |||
2130 | LLAvatarTracker::instance().addBuddyList(list); | 2130 | LLAvatarTracker::instance().addBuddyList(list); |
2131 | } | 2131 | } |
2132 | 2132 | ||
2133 | /* | ||
2134 | options.clear(); | 2133 | options.clear(); |
2135 | if(LLUserAuth::getInstance()->getOptions("ui-config", options)) | 2134 | if(LLUserAuth::getInstance()->getOptions("ui-config", options)) |
2136 | { | 2135 | { |
@@ -2149,7 +2148,7 @@ bool idle_startup() | |||
2149 | } | 2148 | } |
2150 | } | 2149 | } |
2151 | } | 2150 | } |
2152 | */ | 2151 | |
2153 | options.clear(); | 2152 | options.clear(); |
2154 | bool show_hud = false; | 2153 | bool show_hud = false; |
2155 | if(LLUserAuth::getInstance()->getOptions("tutorial_setting", options)) | 2154 | if(LLUserAuth::getInstance()->getOptions("tutorial_setting", options)) |
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 0146f9e..ba24c16 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -2307,56 +2307,32 @@ class LLObjectEnableExport : public view_listener_t | |||
2307 | { | 2307 | { |
2308 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 2308 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
2309 | { | 2309 | { |
2310 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); | 2310 | LLControlVariable* control = |
2311 | bool new_value = (object != NULL); | 2311 | gMenuHolder->findControl(userdata["control"].asString()); |
2312 | if (new_value) | 2312 | |
2313 | { | 2313 | LLViewerObject* object = |
2314 | LLVOAvatar* avatar = find_avatar_from_object(object); | 2314 | LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); |
2315 | new_value = (avatar == NULL); | 2315 | |
2316 | } | 2316 | if((object != NULL) && |
2317 | if(new_value) | 2317 | (find_avatar_from_object(object) == NULL)) |
2318 | { | 2318 | { |
2319 | |||
2320 | struct ff : public LLSelectedNodeFunctor | 2319 | struct ff : public LLSelectedNodeFunctor |
2321 | { | 2320 | { |
2322 | ff(const LLSD& data) : LLSelectedNodeFunctor() | ||
2323 | ,userdata(data) | ||
2324 | { | ||
2325 | |||
2326 | } | ||
2327 | const LLSD& userdata; | ||
2328 | virtual bool apply(LLSelectNode* node) | 2321 | virtual bool apply(LLSelectNode* node) |
2329 | { | 2322 | { |
2330 | if(gAgent.getID()!=node->mPermissions->getCreator()) | 2323 | return primbackup::check_perms( node ); |
2331 | { | ||
2332 | return false; | ||
2333 | } | ||
2334 | return true; | ||
2335 | } | 2324 | } |
2336 | }; | 2325 | } func; |
2337 | 2326 | ||
2338 | #ifdef LL_GRID_PERMISSIONS | 2327 | if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false)) |
2339 | |||
2340 | ff * the_ff=new ff(userdata); | ||
2341 | if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(the_ff,false)) | ||
2342 | { | ||
2343 | gMenuHolder->findControl(userdata["control"].asString())->setValue(true); | ||
2344 | } | ||
2345 | else | ||
2346 | { | 2328 | { |
2347 | gMenuHolder->findControl(userdata["control"].asString())->setValue(false); | 2329 | control->setValue(true); |
2330 | return true; | ||
2348 | } | 2331 | } |
2349 | return true; | ||
2350 | } | 2332 | } |
2351 | 2333 | ||
2352 | gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); | 2334 | control->setValue(false); |
2353 | return true; | ||
2354 | #else | ||
2355 | } | ||
2356 | gMenuHolder->findControl(userdata["control"].asString())->setValue(true); | ||
2357 | return true; | 2335 | return true; |
2358 | #endif | ||
2359 | |||
2360 | } | 2336 | } |
2361 | }; | 2337 | }; |
2362 | 2338 | ||
diff --git a/linden/indra/newview/primbackup.cpp b/linden/indra/newview/primbackup.cpp index 78fd482..8dbf1df 100644 --- a/linden/indra/newview/primbackup.cpp +++ b/linden/indra/newview/primbackup.cpp | |||
@@ -350,54 +350,52 @@ void primbackup::pre_export_object() | |||
350 | gIdleCallbacks.addFunction(exportworker, NULL); | 350 | gIdleCallbacks.addFunction(exportworker, NULL); |
351 | } | 351 | } |
352 | 352 | ||
353 | |||
354 | // static | ||
355 | bool primbackup::check_perms( LLSelectNode* node ) | ||
356 | { | ||
357 | LLPermissions *perms = node->mPermissions; | ||
358 | return (gAgent.getID() == perms->getOwner() && | ||
359 | gAgent.getID() == perms->getCreator() && | ||
360 | (PERM_ITEM_UNRESTRICTED & | ||
361 | perms->getMaskOwner()) == PERM_ITEM_UNRESTRICTED); | ||
362 | } | ||
363 | |||
364 | |||
353 | void primbackup::exportworker(void *userdata) | 365 | void primbackup::exportworker(void *userdata) |
354 | { | 366 | { |
355 | primbackup::getInstance()->updateexportnumbers(); | 367 | primbackup::getInstance()->updateexportnumbers(); |
356 | 368 | ||
357 | switch(primbackup::getInstance()->export_state) | 369 | switch(primbackup::getInstance()->export_state) |
358 | { | 370 | { |
359 | case EXPORT_INIT: | 371 | case EXPORT_INIT: { |
372 | primbackup::getInstance()->show(); | ||
373 | LLSelectMgr::getInstance()->getSelection()->ref(); | ||
374 | |||
375 | struct ff : public LLSelectedNodeFunctor | ||
360 | { | 376 | { |
361 | primbackup::getInstance()->show(); | 377 | virtual bool apply(LLSelectNode* node) |
362 | LLSelectMgr::getInstance()->getSelection()->ref(); | ||
363 | |||
364 | struct ff : public LLSelectedNodeFunctor | ||
365 | { | ||
366 | virtual bool apply(LLSelectNode* node) | ||
367 | { | ||
368 | if(gAgent.getID()!=node->mPermissions->getOwner()) | ||
369 | { | ||
370 | #ifdef LL_GRID_PERMISSIONS | ||
371 | return false; | ||
372 | #else | ||
373 | return true; | ||
374 | #endif | ||
375 | } | ||
376 | else if(581632==node->mPermissions->getMaskOwner() || 2147483647==node->mPermissions->getMaskOwner()) | ||
377 | { | ||
378 | return true; | ||
379 | } | ||
380 | return false; | ||
381 | } | ||
382 | } func; | ||
383 | |||
384 | if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false)) | ||
385 | primbackup::getInstance()->export_state=EXPORT_STRUCTURE; | ||
386 | else | ||
387 | { | 378 | { |
388 | llwarns<<"Incorrect permission to export"<<llendl; | 379 | return primbackup::check_perms( node ); |
389 | primbackup::getInstance()->export_state=EXPORT_DONE; | ||
390 | primbackup::getInstance()->close(); | ||
391 | gIdleCallbacks.deleteFunction(exportworker); | ||
392 | LLSelectMgr::getInstance()->getSelection()->unref(); | ||
393 | |||
394 | } | 380 | } |
395 | break; | 381 | } func; |
396 | } | ||
397 | 382 | ||
383 | if(LLSelectMgr::getInstance()->getSelection()->applyToNodes(&func,false)) | ||
384 | { | ||
385 | primbackup::getInstance()->export_state=EXPORT_STRUCTURE; | ||
386 | } | ||
387 | else | ||
388 | { | ||
389 | llwarns << "Incorrect permission to export" << llendl; | ||
390 | primbackup::getInstance()->export_state=EXPORT_DONE; | ||
391 | primbackup::getInstance()->close(); | ||
392 | gIdleCallbacks.deleteFunction(exportworker); | ||
393 | LLSelectMgr::getInstance()->getSelection()->unref(); | ||
394 | } | ||
398 | break; | 395 | break; |
399 | case EXPORT_STRUCTURE: | 396 | } |
400 | { | 397 | |
398 | case EXPORT_STRUCTURE: { | ||
401 | struct ff : public LLSelectedObjectFunctor | 399 | struct ff : public LLSelectedObjectFunctor |
402 | { | 400 | { |
403 | virtual bool apply(LLViewerObject* object) | 401 | virtual bool apply(LLViewerObject* object) |
@@ -405,7 +403,7 @@ void primbackup::exportworker(void *userdata) | |||
405 | object->boostTexturePriority(TRUE); | 403 | object->boostTexturePriority(TRUE); |
406 | LLViewerObject::child_list_t children = object->getChildren(); | 404 | LLViewerObject::child_list_t children = object->getChildren(); |
407 | children.push_front(object); //push root onto list | 405 | children.push_front(object); //push root onto list |
408 | LLSD prim_llsd=primbackup::getInstance()->prims_to_llsd(children); | 406 | LLSD prim_llsd=primbackup::getInstance()->prims_to_llsd(children); |
409 | LLSD stuff; | 407 | LLSD stuff; |
410 | stuff["root_position"] = object->getPosition().getValue(); | 408 | stuff["root_position"] = object->getPosition().getValue(); |
411 | stuff["root_rotation"] = ll_sd_from_quaternion(object->getRotation()); | 409 | stuff["root_rotation"] = ll_sd_from_quaternion(object->getRotation()); |
@@ -421,7 +419,8 @@ void primbackup::exportworker(void *userdata) | |||
421 | 419 | ||
422 | break; | 420 | break; |
423 | } | 421 | } |
424 | case EXPORT_TEXTURES: | 422 | |
423 | case EXPORT_TEXTURES: { | ||
425 | if(primbackup::getInstance()->m_nexttextureready==false) | 424 | if(primbackup::getInstance()->m_nexttextureready==false) |
426 | return; | 425 | return; |
427 | 426 | ||
@@ -435,23 +434,25 @@ void primbackup::exportworker(void *userdata) | |||
435 | } | 434 | } |
436 | 435 | ||
437 | primbackup::getInstance()->export_next_texture(); | 436 | primbackup::getInstance()->export_next_texture(); |
438 | break; | 437 | break; |
438 | } | ||
439 | 439 | ||
440 | case EXPORT_LLSD: | 440 | case EXPORT_LLSD: { |
441 | { | 441 | // Create a file stream and write to it |
442 | // Create a file stream and write to it | 442 | llofstream export_file(primbackup::getInstance()->file_name); |
443 | llofstream export_file(primbackup::getInstance()->file_name); | 443 | LLSDSerialize::toPrettyXML(primbackup::getInstance()->llsd, export_file); |
444 | LLSDSerialize::toPrettyXML(primbackup::getInstance()->llsd, export_file); | 444 | export_file.close(); |
445 | export_file.close(); | 445 | primbackup::getInstance()->m_nexttextureready=true; |
446 | primbackup::getInstance()->m_nexttextureready=true; | 446 | primbackup::getInstance()->export_state=EXPORT_TEXTURES; |
447 | primbackup::getInstance()->export_state=EXPORT_TEXTURES; | ||
448 | } | ||
449 | break; | 447 | break; |
450 | case EXPORT_DONE: | 448 | } |
451 | llinfos<<"Backup complete"<<llendl | 449 | |
452 | gIdleCallbacks.deleteFunction(exportworker); | 450 | case EXPORT_DONE: { |
453 | primbackup::getInstance()->close(); | 451 | llinfos << "Backup complete" << llendl; |
452 | gIdleCallbacks.deleteFunction(exportworker); | ||
453 | primbackup::getInstance()->close(); | ||
454 | break; | 454 | break; |
455 | } | ||
455 | } | 456 | } |
456 | } | 457 | } |
457 | 458 | ||
diff --git a/linden/indra/newview/primbackup.h b/linden/indra/newview/primbackup.h index fddc35f..cbd757a 100644 --- a/linden/indra/newview/primbackup.h +++ b/linden/indra/newview/primbackup.h | |||
@@ -18,6 +18,8 @@ class primbackup : public LLFloater | |||
18 | //Static accessor | 18 | //Static accessor |
19 | static primbackup* getInstance(); | 19 | static primbackup* getInstance(); |
20 | 20 | ||
21 | static bool check_perms( LLSelectNode* node ); | ||
22 | |||
21 | virtual ~primbackup(); | 23 | virtual ~primbackup(); |
22 | 24 | ||
23 | //Floater stuff | 25 | //Floater stuff |
diff --git a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml index 15cdc9e..2c7ca3c 100644 --- a/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml +++ b/linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml | |||
@@ -44,7 +44,7 @@ | |||
44 | <on_enable function="Object.EnableReturn" /> | 44 | <on_enable function="Object.EnableReturn" /> |
45 | </menu_item_call> | 45 | </menu_item_call> |
46 | <pie_menu label="More >" name="Rate Menu"> | 46 | <pie_menu label="More >" name="Rate Menu"> |
47 | <menu_item_call label="Backup" enabled="false" hidden="false" | 47 | <menu_item_call label="Export" enabled="false" hidden="false" |
48 | mouse_opaqu="true" name="Export"> | 48 | mouse_opaqu="true" name="Export"> |
49 | <on_click function="Object.Export" /> | 49 | <on_click function="Object.Export" /> |
50 | <on_enable function="Object.EnableExport" /> | 50 | <on_enable function="Object.EnableExport" /> |
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 92b7008..9da0ec5 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 | |||
@@ -8,14 +8,6 @@ | |||
8 | 8 | ||
9 | <menu name="File" create_jump_keys="true" label="File" | 9 | <menu name="File" create_jump_keys="true" label="File" |
10 | opaque="true" tear_off="true"> | 10 | opaque="true" tear_off="true"> |
11 | <menu_item_call enabled="false" hidden="false" label="Import" mouse_opaque="true" name="Import"> | ||
12 | <on_click function="Object.Import" /> | ||
13 | <on_enable function="Object.EnableImport" /> | ||
14 | </menu_item_call> | ||
15 | <menu_item_call enabled="false" hidden="false" label="Upload + Import" mouse_opaque="true" name="Import"> | ||
16 | <on_click function="Object.ImportUpload" /> | ||
17 | <on_enable function="Object.EnableImport" /> | ||
18 | </menu_item_call> | ||
19 | <menu_item_call name="Upload Image" | 11 | <menu_item_call name="Upload Image" |
20 | label="Upload Image (L$[COST])..." | 12 | label="Upload Image (L$[COST])..." |
21 | shortcut="control|U"> | 13 | shortcut="control|U"> |
@@ -37,6 +29,16 @@ | |||
37 | <on_click function="File.UploadBulk" userdata="" /> | 29 | <on_click function="File.UploadBulk" userdata="" /> |
38 | </menu_item_call> | 30 | </menu_item_call> |
39 | <menu_item_separator /> | 31 | <menu_item_separator /> |
32 | <menu_item_call name="Import" label="Import" enabled="false"> | ||
33 | <on_click function="Object.Import" /> | ||
34 | <on_enable function="Object.EnableImport" /> | ||
35 | </menu_item_call> | ||
36 | <menu_item_call name="Upload + Import" label="Upload + Import" | ||
37 | enabled="false"> | ||
38 | <on_click function="Object.ImportUpload" /> | ||
39 | <on_enable function="Object.EnableImport" /> | ||
40 | </menu_item_call> | ||
41 | <menu_item_separator /> | ||
40 | <menu_item_call name="Close Window" | 42 | <menu_item_call name="Close Window" |
41 | label="Close Window" | 43 | label="Close Window" |
42 | shortcut="control|W"> | 44 | shortcut="control|W"> |