aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloaterpreference.cpp')
-rw-r--r--linden/indra/newview/llfloaterpreference.cpp46
1 files changed, 39 insertions, 7 deletions
diff --git a/linden/indra/newview/llfloaterpreference.cpp b/linden/indra/newview/llfloaterpreference.cpp
index 100ae0c..25a88e6 100644
--- a/linden/indra/newview/llfloaterpreference.cpp
+++ b/linden/indra/newview/llfloaterpreference.cpp
@@ -47,13 +47,16 @@
47#include "llspinctrl.h" 47#include "llspinctrl.h"
48#include "message.h" 48#include "message.h"
49 49
50#include "llcommandhandler.h"
50#include "llfloaterabout.h" 51#include "llfloaterabout.h"
52#include "llfloaterpreference.h"
51#include "llpanelnetwork.h" 53#include "llpanelnetwork.h"
52#include "llpanelaudioprefs.h" 54#include "llpanelaudioprefs.h"
53#include "llpaneldisplay.h" 55#include "llpaneldisplay.h"
54#include "llpaneldebug.h" 56#include "llpaneldebug.h"
55#include "llpanelgeneral.h" 57#include "llpanelgeneral.h"
56#include "llpanelinput.h" 58#include "llpanelinput.h"
59#include "llpanellogin.h"
57#include "llpanelLCD.h" 60#include "llpanelLCD.h"
58#include "llpanelmsgs.h" 61#include "llpanelmsgs.h"
59#include "llpanelweb.h" 62#include "llpanelweb.h"
@@ -71,6 +74,13 @@
71#include "llkeyboard.h" 74#include "llkeyboard.h"
72#include "llscrollcontainer.h" 75#include "llscrollcontainer.h"
73 76
77#if LL_WINDOWS
78// for Logitech LCD keyboards / speakers
79#ifndef LL_LOGITECH_LCD_H
80#include "lllogitechlcd.h"
81#endif
82extern llLCD *gLcdScreen;
83#endif
74 84
75const S32 PREF_BORDER = 4; 85const S32 PREF_BORDER = 4;
76const S32 PREF_PAD = 5; 86const S32 PREF_PAD = 5;
@@ -81,13 +91,20 @@ const S32 PREF_FLOATER_MIN_HEIGHT = 2 * SCROLLBAR_SIZE + 2 * LLPANEL_BORDER_WIDT
81 91
82LLFloaterPreference* LLFloaterPreference::sInstance = NULL; 92LLFloaterPreference* LLFloaterPreference::sInstance = NULL;
83 93
84#if LL_WINDOWS 94
85// for Logitech LCD keyboards / speakers 95class LLPreferencesHandler : public LLCommandHandler
86#ifndef LL_LOGITECH_LCD_H 96{
87#include "lllogitechlcd.h" 97public:
88#endif 98 LLPreferencesHandler() : LLCommandHandler("preferences") { }
89extern llLCD *gLcdScreen; 99 bool handle(const LLSD& tokens, const LLSD& queryMap)
90#endif 100 {
101 LLFloaterPreference::show(NULL);
102 return true;
103 }
104};
105
106LLPreferencesHandler gPreferencesHandler;
107
91 108
92// Must be done at run time, not compile time. JC 109// Must be done at run time, not compile time. JC
93S32 pref_min_width() 110S32 pref_min_width()
@@ -410,6 +427,8 @@ void LLFloaterPreference::show(void*)
410 gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); 427 gMessageSystem->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
411 gAgent.sendReliableMessage(); 428 gAgent.sendReliableMessage();
412 } 429 }
430
431 LLPanelLogin::setAlwaysRefresh(true);
413} 432}
414 433
415 434
@@ -423,6 +442,9 @@ void LLFloaterPreference::onClickAbout(void*)
423// static 442// static
424void LLFloaterPreference::onBtnOK( void* userdata ) 443void LLFloaterPreference::onBtnOK( void* userdata )
425{ 444{
445 //refresh splash page if we're displaying it
446 LLPanelLogin::loadLoginPage();
447
426 LLFloaterPreference *fp =(LLFloaterPreference *)userdata; 448 LLFloaterPreference *fp =(LLFloaterPreference *)userdata;
427 // commit any outstanding text entry 449 // commit any outstanding text entry
428 if (fp->hasFocus()) 450 if (fp->hasFocus())
@@ -466,6 +488,16 @@ void LLFloaterPreference::onBtnApply( void* userdata )
466 } 488 }
467 } 489 }
468 fp->apply(); 490 fp->apply();
491
492 //refresh splash page if we're displaying it
493 LLPanelLogin::loadLoginPage();
494}
495
496
497void LLFloaterPreference::onClose(bool app_quitting)
498{
499 LLPanelLogin::setAlwaysRefresh(false);
500 LLFloater::onClose(app_quitting);
469} 501}
470 502
471 503