diff options
-rw-r--r-- | ChangeLog.txt | 9 | ||||
-rw-r--r-- | linden/indra/newview/llagent.cpp | 19 | ||||
-rw-r--r-- | linden/indra/newview/llagent.h | 8 | ||||
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/alerts.xml | 15 |
5 files changed, 50 insertions, 3 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt index 103841a..26b507d 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt | |||
@@ -1,3 +1,12 @@ | |||
1 | 2009-05-31 Jacek Antonelli <jacek.antonelli@gmail.com> | ||
2 | |||
3 | * Added a confirmation dialog for Take Off All Clothes. | ||
4 | |||
5 | modified: linden/indra/newview/llagent.cpp | ||
6 | modified: linden/indra/newview/llagent.h | ||
7 | modified: linden/indra/newview/skins/default/xui/en-us/alerts.xml | ||
8 | |||
9 | |||
1 | 2009-05-25 Jacek Antonelli <jacek.antonelli@gmail.com> | 10 | 2009-05-25 Jacek Antonelli <jacek.antonelli@gmail.com> |
2 | 11 | ||
3 | * linden/indra/newview/llinventorybridge.cpp (buildContextMenu): | 12 | * linden/indra/newview/llinventorybridge.cpp (buildContextMenu): |
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 46dc6f3..8c4e8b3 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -7432,6 +7432,25 @@ void LLAgent::userRemoveWearable( void* userdata ) | |||
7432 | } | 7432 | } |
7433 | } | 7433 | } |
7434 | 7434 | ||
7435 | |||
7436 | // static | ||
7437 | void LLAgent::userRemoveAllClothesConfirm() | ||
7438 | { | ||
7439 | gViewerWindow->alertXml("ConfirmRemoveAllClothes", | ||
7440 | LLAgent::userRemoveAllClothesCallback, NULL); | ||
7441 | } | ||
7442 | |||
7443 | // static | ||
7444 | void LLAgent::userRemoveAllClothesCallback(S32 option, void *userdata) | ||
7445 | { | ||
7446 | if( option == 0 ) | ||
7447 | { | ||
7448 | // They confirmed it. Here we go! | ||
7449 | LLAgent::userRemoveAllClothes(NULL); | ||
7450 | } | ||
7451 | } | ||
7452 | |||
7453 | |||
7435 | void LLAgent::userRemoveAllClothes( void* userdata ) | 7454 | void LLAgent::userRemoveAllClothes( void* userdata ) |
7436 | { | 7455 | { |
7437 | // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. | 7456 | // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. |
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index dd204af..4d24aee 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -668,8 +668,12 @@ public: | |||
668 | static void stopFidget(); | 668 | static void stopFidget(); |
669 | static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); | 669 | static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); |
670 | static void userRemoveWearable( void* userdata ); // userdata is EWearableType | 670 | static void userRemoveWearable( void* userdata ); // userdata is EWearableType |
671 | static void userRemoveAllClothes( void* userdata ); // userdata is NULL | 671 | |
672 | static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL | 672 | static void userRemoveAllClothesConfirm(); |
673 | static void userRemoveAllClothesCallback(S32 option, void *userdata); | ||
674 | static void userRemoveAllClothes( void* userdata ); // userdata is NULL | ||
675 | static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL | ||
676 | |||
673 | static void userRemoveAllAttachments( void* userdata); // userdata is NULL | 677 | static void userRemoveAllAttachments( void* userdata); // userdata is NULL |
674 | static BOOL selfHasWearable( void* userdata ); // userdata is EWearableType | 678 | static BOOL selfHasWearable( void* userdata ); // userdata is EWearableType |
675 | 679 | ||
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 4194ff7..d477b0c 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -7352,7 +7352,7 @@ class LLEditTakeOff : public view_listener_t | |||
7352 | } | 7352 | } |
7353 | else if (clothing == "all") | 7353 | else if (clothing == "all") |
7354 | { | 7354 | { |
7355 | LLAgent::userRemoveAllClothes(NULL); | 7355 | LLAgent::userRemoveAllClothesConfirm(); |
7356 | } | 7356 | } |
7357 | return true; | 7357 | return true; |
7358 | } | 7358 | } |
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml index 6bfefdb..cb37663 100644 --- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml | |||
@@ -5115,5 +5115,20 @@ WARNING: Don't restore if you aren't sure where the object will go! | |||
5115 | 5115 | ||
5116 | </alert> | 5116 | </alert> |
5117 | 5117 | ||
5118 | <alert modal="true" name="ConfirmRemoveAllClothes"> | ||
5119 | <message name="message"> | ||
5120 | Are you sure you want to take off all clothes? | ||
5121 | </message> | ||
5122 | <ignore name="ignore"> | ||
5123 | When taking off all clothes | ||
5124 | </ignore> | ||
5125 | <option name="Take Off"> | ||
5126 | Take Off | ||
5127 | </option> | ||
5128 | <option name="Cancel"> | ||
5129 | Cancel | ||
5130 | </option> | ||
5131 | </alert> | ||
5132 | |||
5118 | </alerts> | 5133 | </alerts> |
5119 | 5134 | ||