aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview')
-rw-r--r--linden/indra/newview/CMakeLists.txt2
-rw-r--r--linden/indra/newview/app_settings/client_list.xml12
-rw-r--r--linden/indra/newview/floaterotr.cpp102
-rw-r--r--linden/indra/newview/floaterotr.h57
-rw-r--r--linden/indra/newview/llfloaterpreference.cpp17
-rw-r--r--linden/indra/newview/llimpanel.cpp111
-rw-r--r--linden/indra/newview/llprefsadvanced.cpp18
-rw-r--r--linden/indra/newview/llprefsadvanced.h4
-rw-r--r--linden/indra/newview/llprefsim.cpp10
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml19
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_otr_options.xml44
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml42
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml3
13 files changed, 297 insertions, 144 deletions
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index 6d6e8c9..aaaf74f 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -107,6 +107,7 @@ set(viewer_SOURCE_FILES
107 floatergriddefault.cpp 107 floatergriddefault.cpp
108 floatergridmanager.cpp 108 floatergridmanager.cpp
109 floaterlocalassetbrowse.cpp 109 floaterlocalassetbrowse.cpp
110 floaterotr.cpp
110 floatervoicelicense.cpp 111 floatervoicelicense.cpp
111 hbfloatergrouptitles.cpp 112 hbfloatergrouptitles.cpp
112 hippogridmanager.cpp 113 hippogridmanager.cpp
@@ -569,6 +570,7 @@ set(viewer_HEADER_FILES
569 floatergriddefault.h 570 floatergriddefault.h
570 floatergridmanager.h 571 floatergridmanager.h
571 floaterlocalassetbrowse.h 572 floaterlocalassetbrowse.h
573 floaterotr.h
572 floatervoicelicense.h 574 floatervoicelicense.h
573 hbfloatergrouptitles.h 575 hbfloatergrouptitles.h
574 hippogridmanager.h 576 hippogridmanager.h
diff --git a/linden/indra/newview/app_settings/client_list.xml b/linden/indra/newview/app_settings/client_list.xml
index 5aaf3f4..183326c 100644
--- a/linden/indra/newview/app_settings/client_list.xml
+++ b/linden/indra/newview/app_settings/client_list.xml
@@ -1138,6 +1138,18 @@
1138 <key>name</key> 1138 <key>name</key>
1139 <string>Firestorm</string> 1139 <string>Firestorm</string>
1140 </map> 1140 </map>
1141 <key>46697265-7374-6f72-6d00-000000000000</key>
1142 <map>
1143 <key>color</key>
1144 <array>
1145 <real>-0.04313725490196099882078684</real>
1146 <real>-0.6862745098039200186690323</real>
1147 <real>-0.3647058823529399917973137</real>
1148 <real>1</real>
1149 </array>
1150 <key>name</key>
1151 <string>Firestorm</string>
1152 </map>
1141 <key>d3eb4a5f-aec5-4bcb-b007-cce9efe89d37</key> 1153 <key>d3eb4a5f-aec5-4bcb-b007-cce9efe89d37</key>
1142 <map> 1154 <map>
1143 <key>color</key> 1155 <key>color</key>
diff --git a/linden/indra/newview/floaterotr.cpp b/linden/indra/newview/floaterotr.cpp
new file mode 100644
index 0000000..a655fd7
--- /dev/null
+++ b/linden/indra/newview/floaterotr.cpp
@@ -0,0 +1,102 @@
1/**
2* @file floaterotr.cpp
3* @brief Custom OTR settings for meta-impy
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2011, David Seikel
8*
9* meta-impy Viewer Source Code
10* The source code in this file ("Source Code") is provided to you
11* under the terms of the GNU General Public License, version 2.0
12* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
13* this distribution, or online at
14* http://secondlifegrid.net/programs/open_source/licensing/gplv2
15*
16* There are special exceptions to the terms and conditions of the GPL as
17* it is applied to this Source Code. View the full text of the exception
18* in the file doc/FLOSS-exception.txt in this software distribution, or
19* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20*
21* By copying, modifying or distributing this software, you acknowledge
22* that you have read and understood your obligations described above,
23* and agree to abide by those obligations.
24*
25* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
26* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$
29*
30* Copied from floaterbusy.cpp, originally by McCabe Maxsted from Imprudence.
31*/
32
33#include "llviewerprecompiledheaders.h"
34
35#include "floaterotr.h"
36
37#include "llinventorymodel.h"
38#include "llstartup.h"
39#include "lltexteditor.h"
40#include "lluictrlfactory.h"
41#include "llviewercontrol.h"
42#include "llviewerinventory.h"
43#include "llweb.h"
44#include "otr_wrapper.h"
45
46FloaterOTR::FloaterOTR(const LLSD& seed) : LLFloater("floater_busy")
47{
48 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_otr_options.xml");
49}
50
51BOOL FloaterOTR::postBuild()
52{
53 childSetAction("btn_ok", onClickOK, this);
54 childSetAction("btn_cancel", onClickCancel, this);
55
56 childSetValue("EmeraldUseOTR", LLSD((S32)gSavedSettings.getU32("EmeraldUseOTR")));
57 childSetValue("EmeraldUseOTRInTypingStop", gSavedSettings.getBOOL("EmeraldUseOTRInTypingStop"));
58 getChild<LLButton>("otr_help_btn")->setClickedCallback(onClickOtrHelp, this);
59
60 return TRUE;
61}
62
63FloaterOTR::~FloaterOTR()
64{
65}
66
67// static
68void FloaterOTR::onClickOK(void* userdata)
69{
70 FloaterOTR* self = (FloaterOTR*)userdata;
71 self->apply();
72 self->close();
73}
74
75// static
76void FloaterOTR::onClickCancel(void* userdata)
77{
78 FloaterOTR* self = (FloaterOTR*)userdata;
79 self->cancel();
80}
81
82void FloaterOTR::cancel()
83{
84 close();
85}
86
87void FloaterOTR::apply()
88{
89 U32 otrpref = childGetValue("EmeraldUseOTR").asReal();
90
91 gSavedSettings.setU32("EmeraldUseOTR", otrpref);
92 gSavedSettings.setBOOL("EmeraldUseOTRInTypingStop", childGetValue("EmeraldUseOTRInTypingStop").asBoolean());
93 // otrpref: 0 == Require OTR, 1 == Request OTR, 2 == Accept OTR, 3 == Decline OTR
94 if (3 == otrpref)
95 OTR_Wrapper::stopAll();
96}
97
98void FloaterOTR::onClickOtrHelp(void* userdata)
99{
100 LLWeb::loadURL("http://www.cypherpunks.ca/otr/");
101}
102
diff --git a/linden/indra/newview/floaterotr.h b/linden/indra/newview/floaterotr.h
new file mode 100644
index 0000000..a42700f
--- /dev/null
+++ b/linden/indra/newview/floaterotr.h
@@ -0,0 +1,57 @@
1/**
2* @file floaterotr.h
3* @brief Custom OTR settings for meta-impy
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2011, David Seikel
8*
9* meta-impy Viewer Source Code
10* The source code in this file ("Source Code") is provided to you
11* under the terms of the GNU General Public License, version 2.0
12* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
13* this distribution, or online at
14* http://secondlifegrid.net/programs/open_source/licensing/gplv2
15*
16* There are special exceptions to the terms and conditions of the GPL as
17* it is applied to this Source Code. View the full text of the exception
18* in the file doc/FLOSS-exception.txt in this software distribution, or
19* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
20*
21* By copying, modifying or distributing this software, you acknowledge
22* that you have read and understood your obligations described above,
23* and agree to abide by those obligations.
24*
25* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
26* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
27* COMPLETENESS OR PERFORMANCE.
28* $/LicenseInfo$
29*
30* Copied from floaterbusy.h, originally by McCabe Maxsted from Imprudence.
31*/
32
33#ifndef FLOATEROTR_H
34#define FLOATEROTR_H
35
36#include "llfloater.h"
37
38class LLViewerInventoryItem;
39
40class FloaterOTR : public LLFloater, public LLFloaterSingleton<FloaterOTR>
41{
42public:
43 FloaterOTR(const LLSD& seed);
44 virtual ~FloaterOTR();
45
46 BOOL postBuild();
47
48 void apply();
49 void cancel();
50
51private:
52 static void onClickOK(void* userdata);
53 static void onClickCancel(void* userdata);
54 static void onClickOtrHelp(void* userdata);
55};
56
57#endif // FLOATEROTR_H
diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp
index 40f18e8..6a97c38 100644
--- a/linden/indra/newview/llfloaterpreference.cpp
+++ b/linden/indra/newview/llfloaterpreference.cpp
@@ -427,11 +427,6 @@ LLFloaterPreference::~LLFloaterPreference()
427void LLFloaterPreference::apply() 427void LLFloaterPreference::apply()
428{ 428{
429 this->mPreferenceCore->apply(); 429 this->mPreferenceCore->apply();
430#if USE_OTR // [$PLOTR$]
431 U32 otrpref = gSavedSettings.getU32("EmeraldUseOTR");
432 // otrpref: 0 == Require OTR, 1 == Request OTR, 2 == Accept OTR, 3 == Decline OTR
433 if (3 == otrpref) OTR_Wrapper::stopAll();
434#endif // USE_OTR // [/$PLOTR$]
435} 430}
436 431
437 432
@@ -502,13 +497,6 @@ void LLFloaterPreference::onBtnOK( void* userdata )
502 if (fp->canClose()) 497 if (fp->canClose())
503 { 498 {
504 fp->apply(); 499 fp->apply();
505
506#if USE_OTR // [$PLOTR$]
507 U32 otrpref = gSavedSettings.getU32("EmeraldUseOTR");
508 // otrpref: 0 == Require OTR, 1 == Request OTR, 2 == Accept OTR, 3 == Decline OTR
509 if (3 == otrpref) OTR_Wrapper::stopAll();
510#endif // USE_OTR // [/$PLOTR$]
511
512 fp->close(false); 500 fp->close(false);
513 501
514 gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE ); 502 gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
@@ -540,11 +528,6 @@ void LLFloaterPreference::onBtnApply( void* userdata )
540 } 528 }
541 } 529 }
542 fp->apply(); 530 fp->apply();
543#if USE_OTR // [$PLOTR$]
544 U32 otrpref = gSavedSettings.getU32("EmeraldUseOTR");
545 // otrpref: 0 == Require OTR, 1 == Request OTR, 2 == Accept OTR, 3 == Decline OTR
546 if (3 == otrpref) OTR_Wrapper::stopAll();
547#endif // USE_OTR // [/$PLOTR$]
548 531
549 LLPanelLogin::refreshLocation( false ); 532 LLPanelLogin::refreshLocation( false );
550} 533}
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp
index de57225..7ccf49c 100644
--- a/linden/indra/newview/llimpanel.cpp
+++ b/linden/indra/newview/llimpanel.cpp
@@ -1412,21 +1412,22 @@ BOOL LLFloaterIMPanel::postBuild()
1412#if USE_OTR // [$PLOTR$] 1412#if USE_OTR // [$PLOTR$]
1413 if (!gOTR) OTR_Wrapper::init(); 1413 if (!gOTR) OTR_Wrapper::init();
1414 if (gOTR && (IM_NOTHING_SPECIAL == mDialog)) 1414 if (gOTR && (IM_NOTHING_SPECIAL == mDialog))
1415 { 1415 {
1416 LLComboBox *combo = getChild<LLComboBox>("otr_combo"); 1416 childSetCommitCallback("otr_btn", onClickOtr, this);
1417 if (!combo) 1417 LLComboBox *combo = getChild<LLComboBox>("otr_btn");
1418 { 1418 if (!combo)
1419 llwarns << "$PLOTR$ Can't find OTR control/status" << llendl; 1419 {
1420 } 1420 llwarns << "$PLOTR$ Can't find OTR control/status" << llendl;
1421 else 1421 }
1422 { 1422 else
1423 llinfos << "$PLOTR$ found OTR control/status" << llendl; 1423 {
1424 combo->setCommitCallback(onClickOtr); 1424 llinfos << "$PLOTR$ found OTR control/status" << llendl;
1425 combo->setCallbackUserData(this); 1425 combo->setCommitCallback(onClickOtr);
1426 combo->setAllowTextEntry(FALSE, 0, FALSE); 1426 combo->setCallbackUserData(this);
1427 showOtrStatus(); 1427 combo->setAllowTextEntry(FALSE, 0, FALSE);
1428 } 1428 showOtrStatus();
1429 } 1429 }
1430 }
1430#endif // USE_OTR // [/$PLOTR$] 1431#endif // USE_OTR // [/$PLOTR$]
1431 1432
1432 setDefaultBtn("send_btn"); 1433 setDefaultBtn("send_btn");
@@ -2417,45 +2418,61 @@ void LLFloaterIMPanel::doOtrAuth()
2417 } 2418 }
2418} 2419}
2419 2420
2421
2420void LLFloaterIMPanel::doOtrMenu() 2422void LLFloaterIMPanel::doOtrMenu()
2421{ 2423{
2422 if (gOTR && (IM_NOTHING_SPECIAL == mDialog)) 2424 if (gOTR && (IM_NOTHING_SPECIAL == mDialog))
2423 { 2425 {
2424 LLComboBox *combo = getChild<LLComboBox>("otr_combo"); 2426 LLComboBox *combo = getChild<LLComboBox>("otr_btn");
2425 if (!combo) 2427 if (!combo)
2426 { 2428 {
2427 llwarns << "$PLOTR$ Can't find OTR control/status" << llendl; 2429 llwarns << "$PLOTR$ Can't find OTR control/status" << llendl;
2428 } 2430 }
2429 else 2431 else
2430 { 2432 {
2431 std::string choice = combo->getSimple(); 2433 ConnContext *context = getOtrContext();
2432 if ((getString("otr_start") == choice) || 2434 U32 otrpref = gSavedSettings.getU32("EmeraldUseOTR");
2433 (getString("otr_restart") == choice) || 2435 if (combo->getValue().asString() == "otr_auth_entry")
2434 (getString("otr_refresh") == choice))
2435 {
2436 doOtrStart();
2437 }
2438 else if (getString("otr_stop") == choice)
2439 {
2440 doOtrStop();
2441 }
2442 else if (getString("otr_auth") == choice)
2443 { 2436 {
2444 doOtrAuth(); 2437 // Instant crash when doing this with someone that has no OTR capability.
2438 // So guard it if no encryption is happening.
2439 if (context && (OTRL_MSGSTATE_ENCRYPTED == context->msgstate))
2440 {
2441 doOtrAuth();
2442 }
2445 } 2443 }
2446 else if (getString("otr_help") == choice) 2444 else if (combo->getValue().asString() == "otr_help_entry")
2447 { 2445 {
2448 llinfos << "$PLOTR$ otr help" << llendl; 2446 llinfos << "$PLOTR$ otr help" << llendl;
2449 LLWeb::loadURL("http://www.cypherpunks.ca/otr/"); 2447 LLWeb::loadURL("http://www.cypherpunks.ca/otr/");
2450 } 2448 }
2451 else if (getString("otr_levels") == choice) 2449 else if (combo->getValue().asString() == "otr_levels_entry")
2452 { 2450 {
2453 llinfos << "$PLOTR$ otr levels help" << llendl; 2451 llinfos << "$PLOTR$ otr levels help" << llendl;
2454 LLWeb::loadURL("http://www.cypherpunks.ca/otr/help/3.2.0/levels.php"); 2452 LLWeb::loadURL("http://www.cypherpunks.ca/otr/help/3.2.0/levels.php");
2455 } 2453 }
2456 else 2454 else // Clicked the flyout itself. Sort out what level to put them in based on the old level.
2457 { 2455 {
2458 llwarns << "$PLOTR$ unknown menu item" << llendl; 2456 // otrpref: 0 == Require OTR, 1 == Request OTR, 2 == Accept OTR, 3 == Decline OTR
2457 if (3 == otrpref)
2458 {
2459 if (context && (OTRL_MSGSTATE_ENCRYPTED == context->msgstate))
2460 {
2461 doOtrStop();
2462 }
2463 }
2464 else if (context && (OTRL_MSGSTATE_ENCRYPTED == context->msgstate))
2465 {
2466 doOtrStop();
2467 }
2468 else if (context && (OTRL_MSGSTATE_FINISHED == context->msgstate))
2469 {
2470 doOtrStop();
2471 }
2472 else // OTRL_MSGSTATE_PLAINTEXT, or no context yet
2473 {
2474 doOtrStart();
2475 }
2459 } 2476 }
2460 } 2477 }
2461 } 2478 }
@@ -2502,10 +2519,10 @@ void LLFloaterIMPanel::showOtrStatus()
2502{ 2519{
2503 if (gOTR && (IM_NOTHING_SPECIAL == mDialog)) 2520 if (gOTR && (IM_NOTHING_SPECIAL == mDialog))
2504 { 2521 {
2505 LLComboBox *combo = getChild<LLComboBox>("otr_combo"); 2522 LLFlyoutButton *combo = (LLFlyoutButton *) getChild<LLComboBox>("otr_btn");
2506 if (!combo) 2523 if (!combo)
2507 { 2524 {
2508 llwarns << "$PLOTR$ Can't find OTR control/status" << llendl; 2525 llerrs << "$PLOTR$ Can't find OTR control/status" << llendl;
2509 } 2526 }
2510 else 2527 else
2511 { 2528 {
@@ -2518,22 +2535,10 @@ void LLFloaterIMPanel::showOtrStatus()
2518 { 2535 {
2519 doOtrStop(); 2536 doOtrStop();
2520 } 2537 }
2521 combo->removeall();
2522 combo->add(getString("otr_start"), ADD_BOTTOM, TRUE); // to tell them where to turn it back on
2523 combo->add(getString("otr_stop"), ADD_BOTTOM, FALSE);
2524 combo->add(getString("otr_auth"), ADD_BOTTOM, FALSE);
2525 combo->add(getString("otr_help"), ADD_BOTTOM, TRUE);
2526 combo->add(getString("otr_levels"), ADD_BOTTOM, TRUE);
2527 combo->setLabel(getString("otr_not_private")); 2538 combo->setLabel(getString("otr_not_private"));
2528 } 2539 }
2529 else if (context && (OTRL_MSGSTATE_ENCRYPTED == context->msgstate)) 2540 else if (context && (OTRL_MSGSTATE_ENCRYPTED == context->msgstate))
2530 { 2541 {
2531 combo->removeall();
2532 combo->add(getString("otr_refresh"), ADD_BOTTOM, TRUE);
2533 combo->add(getString("otr_stop"), ADD_BOTTOM, TRUE);
2534 combo->add(getString("otr_auth"), ADD_BOTTOM, TRUE);
2535 combo->add(getString("otr_help"), ADD_BOTTOM, TRUE);
2536 combo->add(getString("otr_levels"), ADD_BOTTOM, TRUE);
2537 if (otherIsOtrAuthenticated()) 2542 if (otherIsOtrAuthenticated())
2538 combo->setLabel(getString("otr_private")); 2543 combo->setLabel(getString("otr_private"));
2539 else 2544 else
@@ -2548,22 +2553,10 @@ void LLFloaterIMPanel::showOtrStatus()
2548 else 2553 else
2549 otrLogMessageGetstringName("otr_prog_they_stop_unverified"); 2554 otrLogMessageGetstringName("otr_prog_they_stop_unverified");
2550 } 2555 }
2551 combo->removeall();
2552 combo->add(getString("otr_restart"), ADD_BOTTOM, TRUE);
2553 combo->add(getString("otr_stop"), ADD_BOTTOM, TRUE);
2554 combo->add(getString("otr_auth"), ADD_BOTTOM, FALSE);
2555 combo->add(getString("otr_help"), ADD_BOTTOM, TRUE);
2556 combo->add(getString("otr_levels"), ADD_BOTTOM, TRUE);
2557 combo->setLabel(getString("otr_finished")); 2556 combo->setLabel(getString("otr_finished"));
2558 } 2557 }
2559 else // OTRL_MSGSTATE_PLAINTEXT, or no context yet 2558 else // OTRL_MSGSTATE_PLAINTEXT, or no context yet
2560 { 2559 {
2561 combo->removeall();
2562 combo->add(getString("otr_start"), ADD_BOTTOM, TRUE);
2563 combo->add(getString("otr_stop"), ADD_BOTTOM, FALSE);
2564 combo->add(getString("otr_auth"), ADD_BOTTOM, FALSE);
2565 combo->add(getString("otr_help"), ADD_BOTTOM, TRUE);
2566 combo->add(getString("otr_levels"), ADD_BOTTOM, TRUE);
2567 combo->setLabel(getString("otr_not_private")); 2560 combo->setLabel(getString("otr_not_private"));
2568 } 2561 }
2569 if (context) 2562 if (context)
diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp
index 38e6745..49dd058 100644
--- a/linden/indra/newview/llprefsadvanced.cpp
+++ b/linden/indra/newview/llprefsadvanced.cpp
@@ -47,10 +47,6 @@
47 47
48#include "boost/algorithm/string.hpp" 48#include "boost/algorithm/string.hpp"
49 49
50#if USE_OTR // [$PLOTR$]
51#include "llweb.h"
52#endif // USE_OTR // [/$PLOTR$]
53
54LLPrefsAdvanced* LLPrefsAdvanced::sInstance; 50LLPrefsAdvanced* LLPrefsAdvanced::sInstance;
55 51
56LLPrefsAdvanced::LLPrefsAdvanced() 52LLPrefsAdvanced::LLPrefsAdvanced()
@@ -119,10 +115,6 @@ BOOL LLPrefsAdvanced::postBuild()
119 115
120 initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck"); 116 initHelpBtn("EmeraldHelp_SpellCheck", "EmeraldHelp_SpellCheck");
121 117
122#if USE_OTR // [$PLOTR$]
123 childSetValue("EmeraldUseOTR", LLSD((S32)gSavedSettings.getU32("EmeraldUseOTR")));
124 getChild<LLButton>("otr_help_btn")->setClickedCallback(onClickOtrHelp, this);
125#endif // USE_OTR // [/$PLOTR$]
126 118
127 refresh(); 119 refresh();
128 120
@@ -210,9 +202,6 @@ void LLPrefsAdvanced::apply()
210 202
211 LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox"); 203 LLComboBox* crash_behavior_combobox = getChild<LLComboBox>("crash_behavior_combobox");
212 gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex()); 204 gCrashSettings.setS32(CRASH_BEHAVIOR_SETTING, crash_behavior_combobox->getCurrentIndex());
213#if USE_OTR // [$PLOTR$]
214 gSavedSettings.setU32("EmeraldUseOTR", (U32)childGetValue("EmeraldUseOTR").asReal());
215#endif // USE_OTR // [/$PLOTR$]
216} 205}
217 206
218void LLPrefsAdvanced::cancel() 207void LLPrefsAdvanced::cancel()
@@ -342,10 +331,3 @@ void LLPrefsAdvanced::onClickCommandLine(void* data)
342 FloaterCommandLine::getInstance()->open(); 331 FloaterCommandLine::getInstance()->open();
343 FloaterCommandLine::getInstance()->center(); 332 FloaterCommandLine::getInstance()->center();
344} 333}
345
346#if USE_OTR // [$PLOTR$]
347void LLPrefsAdvanced::onClickOtrHelp(void* data)
348{
349 LLWeb::loadURL("http://www.cypherpunks.ca/otr/");
350}
351#endif // USE_OTR // [/$PLOTR$]
diff --git a/linden/indra/newview/llprefsadvanced.h b/linden/indra/newview/llprefsadvanced.h
index d75dcd3..d76e602 100644
--- a/linden/indra/newview/llprefsadvanced.h
+++ b/linden/indra/newview/llprefsadvanced.h
@@ -59,10 +59,6 @@ private:
59 static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata); 59 static void onSpellBaseComboBoxCommit(LLUICtrl* ctrl, void* userdata);
60 static void onAutoCorrectButton(void * data); 60 static void onAutoCorrectButton(void * data);
61 61
62#if USE_OTR // [$PLOTR$]
63 static void onClickOtrHelp(void* data);
64#endif // USE_OTR // [/$PLOTR$]
65
66protected: 62protected:
67 void initHelpBtn(const std::string& name, const std::string& xml_alert); 63 void initHelpBtn(const std::string& name, const std::string& xml_alert);
68 static void onClickHelp(void* data); 64 static void onClickHelp(void* data);
diff --git a/linden/indra/newview/llprefsim.cpp b/linden/indra/newview/llprefsim.cpp
index 5ac2bb2..c2659b8 100644
--- a/linden/indra/newview/llprefsim.cpp
+++ b/linden/indra/newview/llprefsim.cpp
@@ -36,6 +36,7 @@
36#include "llprefsim.h" 36#include "llprefsim.h"
37 37
38#include "floaterbusy.h" 38#include "floaterbusy.h"
39#include "floaterotr.h"
39#include "llpanel.h" 40#include "llpanel.h"
40#include "llcheckboxctrl.h" 41#include "llcheckboxctrl.h"
41#include "llstring.h" 42#include "llstring.h"
@@ -73,6 +74,7 @@ public:
73 static void onCommitLogging(LLUICtrl* ctrl, void* user_data); 74 static void onCommitLogging(LLUICtrl* ctrl, void* user_data);
74 75
75 static void onClickBusyAdvanced(void* user_data); 76 static void onClickBusyAdvanced(void* user_data);
77 static void onClickOTRAdvanced(void* user_data);
76 78
77protected: 79protected:
78 80
@@ -131,6 +133,7 @@ BOOL LLPrefsIMImpl::postBuild()
131 childSetCommitCallback("log_instant_messages",onCommitLogging,this); 133 childSetCommitCallback("log_instant_messages",onCommitLogging,this);
132 134
133 childSetAction("busy_adv_btn", onClickBusyAdvanced, this); 135 childSetAction("busy_adv_btn", onClickBusyAdvanced, this);
136 childSetAction("otr_adv_btn", onClickOTRAdvanced, this);
134 137
135 preparePerAccountPrefs(LLStartUp::isLoggedIn()); 138 preparePerAccountPrefs(LLStartUp::isLoggedIn());
136 139
@@ -328,6 +331,13 @@ void LLPrefsIMImpl::onClickBusyAdvanced(void* user_data)
328} 331}
329 332
330// static 333// static
334void LLPrefsIMImpl::onClickOTRAdvanced(void* user_data)
335{
336 FloaterOTR::getInstance()->open();
337 FloaterOTR::getInstance()->center();
338}
339
340// static
331void LLPrefsIMImpl::onClickLogPath(void* user_data) 341void LLPrefsIMImpl::onClickLogPath(void* user_data)
332{ 342{
333 LLPrefsIMImpl* self=(LLPrefsIMImpl*)user_data; 343 LLPrefsIMImpl* self=(LLPrefsIMImpl*)user_data;
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
index 5ad564a..96f8f1e 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
@@ -95,6 +95,21 @@
95 image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" 95 image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left"
96 label="End Call" left_delta="0" name="end_call_btn" pad_right="10" 96 label="End Call" left_delta="0" name="end_call_btn" pad_right="10"
97 visible="false" width="100" /> 97 visible="false" width="100" />
98
99 <flyout_button bottom_delta="0" follows="left|top" height="20" label="OTR: Status" left_delta="5" width="150"
100 list_position="below" mouse_opaque="true" name="otr_btn"
101 tool_tip="Click to change OTR status, or dropdown for other options." >
102 <flyout_button_item value="otr_auth_entry" name="otr_auth_entry">
103 Authenticate buddy
104 </flyout_button_item>
105 <flyout_button_item value="otr_help_entry" name="otr_help_entry">
106 What is OTR?
107 </flyout_button_item>
108 <flyout_button_item value="otr_levels_entry" name="otr_levels_entry">
109 What is this?
110 </flyout_button_item>
111 </flyout_button>
112
98 <text bottom_delta="0" left="-240" height="14" width="230" name="inventory_send" halign="right" 113 <text bottom_delta="0" left="-240" height="14" width="230" name="inventory_send" halign="right"
99 text_color="LabelTextColor" follows="right|top" drop_shadow_visible="true" 114 text_color="LabelTextColor" follows="right|top" drop_shadow_visible="true"
100 bg_visible="false" border_drop_shadow_visible="false" border_visible="false"> 115 bg_visible="false" border_drop_shadow_visible="false" border_visible="false">
@@ -108,10 +123,6 @@
108 image_unselected="icn_speaker_dark.tga" label="" left_delta="56" 123 image_unselected="icn_speaker_dark.tga" label="" left_delta="56"
109 name="mute_btn" tool_tip="Mute voice" width="25" /> 124 name="mute_btn" tool_tip="Mute voice" width="25" />
110 </panel> 125 </panel>
111 <!--[$PLOTR$]-->
112 <combo_box bottom="-40" follows="top|right" left="-230" height="20" width="120"
113 label="OTR: Not Private" name="otr_combo"/>
114 <!--[/$PLOTR$]-->
115 <text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor" 126 <text_editor type="string" length="1" bg_readonly_color="ChatHistoryBgColor" bg_writeable_color="ChatHistoryBgColor"
116 bottom="30" embedded_items="false" enabled="false" 127 bottom="30" embedded_items="false" enabled="false"
117 follows="left|top|right|bottom" font="SansSerif" height="221" left="5" 128 follows="left|top|right|bottom" font="SansSerif" height="221" left="5"
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_otr_options.xml b/linden/indra/newview/skins/default/xui/en-us/floater_otr_options.xml
new file mode 100644
index 0000000..9f0d798
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_otr_options.xml
@@ -0,0 +1,44 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater name="busy" title="OTR Options"
3 height="175" width="180" min_height="175" min_width="180"
4 follows="top|right" can_close="true" can_drag_on_left="false"
5 can_minimize="true" can_resize="false" can_tear_off="false">
6
7 <button bottom="-40" follows="left|top" font="SansSerifSmall"
8 height="18" right="-10"
9 name="otr_help_btn" width="98" label="What is OTR?"/>
10 <radio_group bottom="-120" draw_border="false" enabled="true" follows="left|top"
11 height="80"
12 left="10" mouse_opaque="true" name="EmeraldUseOTR" width="160">
13 <radio_item type="string" length="1" bottom_delta="-10" enabled="true" height="16"
14 left_delta="0" mouse_opaque="true" name="0" width="98"
15 tool_tip="Require use of OTR in IMs"
16 >Require use of OTR in IMs</radio_item>
17 <radio_item type="string" length="1" bottom_delta="-10" enabled="true" height="16"
18 left_delta="0" mouse_opaque="true" name="1" width="98"
19 tool_tip="Request OTR if available."
20 >Request OTR if available</radio_item>
21 <radio_item type="string" length="1" bottom_delta="-10" enabled="true" height="16"
22 left_delta="0" mouse_opaque="true" name="2" width="98"
23 tool_tip="Accept OTR requests."
24 >Accept OTR requests</radio_item>
25 <radio_item type="string" length="1" bottom_delta="-10" enabled="true" height="16"
26 left_delta="0" mouse_opaque="true" name="3" width="98"
27 tool_tip="Decline use of OTR."
28 >Decline use of OTR</radio_item>
29 </radio_group>
30 <check_box follows="left|top" left="10" bottom_delta="-20" enabled="true"
31 font="SansSerifSmall"
32 height="16" initial_value="false" mouse_opaque="true"
33 name="EmeraldOTRInTypingStop-toggle"
34 radio_style="false" width="98"
35 control_name="EmeraldOTRInTypingStop"
36 tool_tip="Put all OTR encrypted messages into IM_TYPING_STOP packets to prevent encrypted IM's from going to email."
37 label="Use typing_stop for OTR"/>
38
39 <button bottom_delta="-26" follows="top|right" height="22" label="Cancel"
40 right="-10" name="btn_cancel" tool_tip="" enagled="true" width="80" />
41 <button bottom_delta="0" follows="top|right" height="22" label="OK"
42 right="-95" name="btn_ok" tool_tip="" enabled="true" width="80" />
43
44</floater> \ No newline at end of file
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
index a3961bb..a8ecedc 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml
@@ -178,47 +178,5 @@ To use spellcheck, right-click a misspelled word
178 bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/> 178 bottom_delta="-50" width="180" height="20" font="SansSerifSmall" follows="left|top"/>
179 </panel> 179 </panel>
180 180
181 <!--[$PLOTR$]-->
182 <panel border="true" bottom="-580" follows="left|top|right|bottom"
183 height="525" label="OTR"
184 left="1" mouse_opaque="true" name="OTR" width="418">
185 <button bottom="-25" follows="left|top" font="SansSerifSmall"
186 height="18" right="490"
187 name="otr_help_btn" width="98" label="What is OTR?"/>
188 <radio_group bottom="-120" draw_border="false" enabled="true" follows="left|top"
189 height="80"
190 left="270" mouse_opaque="true" name="EmeraldUseOTR" width="160">
191 <radio_item type="string" length="1" bottom_delta="-10" enabled="true" height="16"
192 left_delta="0" mouse_opaque="true" name="0" width="98"
193 tool_tip="Require use of OTR in IMs"
194 >Require use of OTR in IMs</radio_item>
195 <radio_item type="string" length="1" bottom_delta="-10" enabled="true" height="16"
196 left_delta="0" mouse_opaque="true" name="1" width="98"
197 tool_tip="Request OTR if available."
198 >Request OTR if available</radio_item>
199 <radio_item type="string" length="1" bottom_delta="-10" enabled="true" height="16"
200 left_delta="0" mouse_opaque="true" name="2" width="98"
201 tool_tip="Accept OTR requests."
202 >Accept OTR requests</radio_item>
203 <radio_item type="string" length="1" bottom_delta="-10" enabled="true" height="16"
204 left_delta="0" mouse_opaque="true" name="3" width="98"
205 tool_tip="Decline use of OTR."
206 >Decline use of OTR</radio_item>
207 </radio_group>
208 <check_box follows="left|top" left="270" bottom_delta="-20" enabled="true"
209 font="SansSerifSmall"
210 height="16" initial_value="false" mouse_opaque="true"
211 name="EmeraldOTRInTypingStop-toggle"
212 radio_style="false" width="98"
213 control_name="EmeraldOTRInTypingStop"
214 tool_tip="Put all OTR encrypted messages into IM_TYPING_STOP packets to prevent encrypted IM's from going to email."
215 label="Use typing_stop for OTR"/>
216 <!--<view_border bevel_style="none" border_thickness="1" bottom_delta="40"
217 follows="top|left" height="100"
218 left="260" name="OTRBorder" width="0"/>-->
219
220 </panel>
221 <!--[/$PLOTR$]-->
222
223 </tab_container> 181 </tab_container>
224</panel> 182</panel>
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml
index fe17e7a..2c71998 100644
--- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_im.xml
@@ -68,6 +68,9 @@
68 <button bottom_delta="-25" follows="top|right" height="22" label="IM Response Options" 68 <button bottom_delta="-25" follows="top|right" height="22" label="IM Response Options"
69 left="164" name="busy_adv_btn" tool_tip="Instant message Auto-Response options" 69 left="164" name="busy_adv_btn" tool_tip="Instant message Auto-Response options"
70 width="180" /> 70 width="180" />
71 <button bottom_delta="0" follows="left|top" height="22" label="OTR Options"
72 left="330" name="otr_adv_btn" tool_tip="Off The Record options"
73 width="120" />
71 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 74 <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
72 bottom_delta="-23" drop_shadow_visible="true" enabled="true" follows="left|top" 75 bottom_delta="-23" drop_shadow_visible="true" enabled="true" follows="left|top"
73 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12" 76 font="SansSerifSmall" h_pad="0" halign="left" height="10" left="12"