diff options
author | McCabe Maxsted | 2010-08-02 16:39:41 -0700 |
---|---|---|
committer | Jacek Antonelli | 2010-08-02 19:27:07 -0500 |
commit | 0703e1eedc717ba4f279e60d932c5d4bf5076544 (patch) | |
tree | f78e4ac84ebbdd986415c875bccf53a706b3fca5 | |
parent | Fixed extra space between timw and AM/PM in timestamps (diff) | |
download | meta-impy-0703e1eedc717ba4f279e60d932c5d4bf5076544.zip meta-impy-0703e1eedc717ba4f279e60d932c5d4bf5076544.tar.gz meta-impy-0703e1eedc717ba4f279e60d932c5d4bf5076544.tar.bz2 meta-impy-0703e1eedc717ba4f279e60d932c5d4bf5076544.tar.xz |
Fixed time format settings not being saved
-rw-r--r-- | linden/indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | linden/indra/newview/llpanelgeneral.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/viewertime.cpp | 5 |
3 files changed, 22 insertions, 0 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 9c95b1f..aae182c 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -789,6 +789,17 @@ | |||
789 | <key>Value</key> | 789 | <key>Value</key> |
790 | <string>f54a0c32-3cd1-d49a-5b4f-7b792bebc204</string> | 790 | <string>f54a0c32-3cd1-d49a-5b4f-7b792bebc204</string> |
791 | </map> | 791 | </map> |
792 | <key>TimeFormat</key> | ||
793 | <map> | ||
794 | <key>Comment</key> | ||
795 | <string>0 = 12 hr, 1 = 24 hr, 2 = UTC</string> | ||
796 | <key>Persist</key> | ||
797 | <integer>1</integer> | ||
798 | <key>Type</key> | ||
799 | <string>U32</string> | ||
800 | <key>Value</key> | ||
801 | <real>0</real> | ||
802 | </map> | ||
792 | <key>Use24HourTime</key> | 803 | <key>Use24HourTime</key> |
793 | <map> | 804 | <map> |
794 | <key>Comment</key> | 805 | <key>Comment</key> |
diff --git a/linden/indra/newview/llpanelgeneral.cpp b/linden/indra/newview/llpanelgeneral.cpp index 14b3dc1..538eb22 100644 --- a/linden/indra/newview/llpanelgeneral.cpp +++ b/linden/indra/newview/llpanelgeneral.cpp | |||
@@ -172,6 +172,12 @@ void LLPanelGeneral::apply() | |||
172 | gSavedSettings.setBOOL("UIAutoScale", childGetValue("ui_auto_scale")); | 172 | gSavedSettings.setBOOL("UIAutoScale", childGetValue("ui_auto_scale")); |
173 | gSavedSettings.setString("Language", childGetValue("language_combobox")); | 173 | gSavedSettings.setString("Language", childGetValue("language_combobox")); |
174 | 174 | ||
175 | /* | ||
176 | Time Format: | ||
177 | 0 - sim 12 hour time | ||
178 | 1 - sim 24 hour time | ||
179 | 2 - UTC time | ||
180 | */ | ||
175 | LLComboBox* time_combobox = getChild<LLComboBox>("time_combobox"); | 181 | LLComboBox* time_combobox = getChild<LLComboBox>("time_combobox"); |
176 | gSavedSettings.setU32("TimeFormat", time_combobox->getCurrentIndex()); | 182 | gSavedSettings.setU32("TimeFormat", time_combobox->getCurrentIndex()); |
177 | gViewerTime->updateTimeFormat(time_combobox->getCurrentIndex()); | 183 | gViewerTime->updateTimeFormat(time_combobox->getCurrentIndex()); |
diff --git a/linden/indra/newview/viewertime.cpp b/linden/indra/newview/viewertime.cpp index 57348f0..06dd91a 100644 --- a/linden/indra/newview/viewertime.cpp +++ b/linden/indra/newview/viewertime.cpp | |||
@@ -32,6 +32,7 @@ | |||
32 | 32 | ||
33 | #include "llappviewer.h" // for gPacificDaylightTime | 33 | #include "llappviewer.h" // for gPacificDaylightTime |
34 | #include "lltrans.h" | 34 | #include "lltrans.h" |
35 | #include "llviewercontrol.h" | ||
35 | #include "viewertime.h" | 36 | #include "viewertime.h" |
36 | 37 | ||
37 | // system includes | 38 | // system includes |
@@ -43,6 +44,7 @@ | |||
43 | // TODO: support multiple date formats | 44 | // TODO: support multiple date formats |
44 | 45 | ||
45 | ViewerTime* gViewerTime = 0; | 46 | ViewerTime* gViewerTime = 0; |
47 | // We use statics here for speed reasons | ||
46 | bool ViewerTime::sUse24HourTime = false; | 48 | bool ViewerTime::sUse24HourTime = false; |
47 | bool ViewerTime::sUseUTCTime = false; | 49 | bool ViewerTime::sUseUTCTime = false; |
48 | 50 | ||
@@ -257,4 +259,7 @@ void ViewerTime::updateTimeFormat(const U32& index) | |||
257 | sUseUTCTime = false; | 259 | sUseUTCTime = false; |
258 | break; | 260 | break; |
259 | } | 261 | } |
262 | |||
263 | gSavedSettings.setBOOL("Use24HourTime", sUse24HourTime); | ||
264 | gSavedSettings.setBOOL("UseUTCTime", sUseUTCTime); | ||
260 | } | 265 | } |