aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/CMakeLists.txt9
-rw-r--r--linden/indra/newview/app_settings/ao_template.ini30
-rw-r--r--linden/indra/newview/app_settings/settings.xml11
-rw-r--r--linden/indra/newview/floatergriddefault.cpp102
-rw-r--r--linden/indra/newview/floatergriddefault.h49
-rw-r--r--linden/indra/newview/llappviewer.cpp1
-rw-r--r--linden/indra/newview/llfirstuse.cpp14
-rw-r--r--linden/indra/newview/llfirstuse.h1
-rw-r--r--linden/indra/newview/llpanellogin.cpp64
-rw-r--r--linden/indra/newview/llpanellogin.h2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml19
11 files changed, 260 insertions, 42 deletions
diff --git a/linden/indra/newview/CMakeLists.txt b/linden/indra/newview/CMakeLists.txt
index 7077dde..313f0c4 100644
--- a/linden/indra/newview/CMakeLists.txt
+++ b/linden/indra/newview/CMakeLists.txt
@@ -69,6 +69,7 @@ set(viewer_SOURCE_FILES
69 emeraldboobutils.cpp 69 emeraldboobutils.cpp
70 floaterao.cpp 70 floaterao.cpp
71 floaterbusy.cpp 71 floaterbusy.cpp
72 floatergriddefault.cpp
72 floatergridmanager.cpp 73 floatergridmanager.cpp
73 hbfloatergrouptitles.cpp 74 hbfloatergrouptitles.cpp
74 hippoGridManager.cpp 75 hippoGridManager.cpp
@@ -501,6 +502,7 @@ set(viewer_HEADER_FILES
501 emeraldboobutils.h 502 emeraldboobutils.h
502 floaterao.h 503 floaterao.h
503 floaterbusy.h 504 floaterbusy.h
505 floatergriddefault.h
504 floatergridmanager.h 506 floatergridmanager.h
505 hbfloatergrouptitles.h 507 hbfloatergrouptitles.h
506 hippoGridManager.h 508 hippoGridManager.h
@@ -1121,6 +1123,7 @@ set(viewer_XUI_FILES
1121 skins/default/xui/en-us/floater_camera.xml 1123 skins/default/xui/en-us/floater_camera.xml
1122 skins/default/xui/en-us/floater_chat_history.xml 1124 skins/default/xui/en-us/floater_chat_history.xml
1123 skins/default/xui/en-us/floater_chatterbox.xml 1125 skins/default/xui/en-us/floater_chatterbox.xml
1126 skins/default/xui/en-us/floater_chatterbox_vertical.xml
1124 skins/default/xui/en-us/floater_choose_group.xml 1127 skins/default/xui/en-us/floater_choose_group.xml
1125 skins/default/xui/en-us/floater_color_picker.xml 1128 skins/default/xui/en-us/floater_color_picker.xml
1126 skins/default/xui/en-us/floater_critical.xml 1129 skins/default/xui/en-us/floater_critical.xml
@@ -1132,6 +1135,7 @@ set(viewer_XUI_FILES
1132 skins/default/xui/en-us/floater_font_test.xml 1135 skins/default/xui/en-us/floater_font_test.xml
1133 skins/default/xui/en-us/floater_gesture.xml 1136 skins/default/xui/en-us/floater_gesture.xml
1134 skins/default/xui/en-us/floater_god_tools.xml 1137 skins/default/xui/en-us/floater_god_tools.xml
1138 skins/default/xui/en-us/floater_grid_default_selector.xml
1135 skins/default/xui/en-us/floater_grid_manager.xml 1139 skins/default/xui/en-us/floater_grid_manager.xml
1136 skins/default/xui/en-us/floater_group_info.xml 1140 skins/default/xui/en-us/floater_group_info.xml
1137 skins/default/xui/en-us/floater_group_titles.xml 1141 skins/default/xui/en-us/floater_group_titles.xml
@@ -1155,6 +1159,7 @@ set(viewer_XUI_FILES
1155 skins/default/xui/en-us/floater_live_lsleditor.xml 1159 skins/default/xui/en-us/floater_live_lsleditor.xml
1156 skins/default/xui/en-us/floater_lsl_guide.xml 1160 skins/default/xui/en-us/floater_lsl_guide.xml
1157 skins/default/xui/en-us/floater_media_browser.xml 1161 skins/default/xui/en-us/floater_media_browser.xml
1162 skins/default/xui/en-us/floater_mem_leaking.xml
1158 skins/default/xui/en-us/floater_mini_map.xml 1163 skins/default/xui/en-us/floater_mini_map.xml
1159 skins/default/xui/en-us/floater_moveview.xml 1164 skins/default/xui/en-us/floater_moveview.xml
1160 skins/default/xui/en-us/floater_mute_object.xml 1165 skins/default/xui/en-us/floater_mute_object.xml
@@ -1190,11 +1195,13 @@ set(viewer_XUI_FILES
1190 skins/default/xui/en-us/floater_region_info.xml 1195 skins/default/xui/en-us/floater_region_info.xml
1191 skins/default/xui/en-us/floater_report_abuse.xml 1196 skins/default/xui/en-us/floater_report_abuse.xml
1192 skins/default/xui/en-us/floater_report_bug.xml 1197 skins/default/xui/en-us/floater_report_bug.xml
1198 skins/default/xui/en-us/floater_rlv_behaviour.xml
1193 skins/default/xui/en-us/floater_script_debug.xml 1199 skins/default/xui/en-us/floater_script_debug.xml
1194 skins/default/xui/en-us/floater_script_ed_panel.xml 1200 skins/default/xui/en-us/floater_script_ed_panel.xml
1195 skins/default/xui/en-us/floater_script_preview.xml 1201 skins/default/xui/en-us/floater_script_preview.xml
1196 skins/default/xui/en-us/floater_script_queue.xml 1202 skins/default/xui/en-us/floater_script_queue.xml
1197 skins/default/xui/en-us/floater_script_search.xml 1203 skins/default/xui/en-us/floater_script_search.xml
1204 skins/default/xui/en-us/floater_search_replace.xml
1198 skins/default/xui/en-us/floater_select_key.xml 1205 skins/default/xui/en-us/floater_select_key.xml
1199 skins/default/xui/en-us/floater_sell_land.xml 1206 skins/default/xui/en-us/floater_sell_land.xml
1200 skins/default/xui/en-us/floater_settings_debug.xml 1207 skins/default/xui/en-us/floater_settings_debug.xml
@@ -1304,6 +1311,7 @@ set(viewer_XUI_FILES
1304 skins/default/xui/en-us/role_actions.xml 1311 skins/default/xui/en-us/role_actions.xml
1305 skins/default/xui/en-us/strings.xml 1312 skins/default/xui/en-us/strings.xml
1306 skins/default/xui/en-us/teleport_strings.xml 1313 skins/default/xui/en-us/teleport_strings.xml
1314 skins/default/xui/en-us/ui_strings.xml
1307 skins/default/xui/en-us/xui_version.xml 1315 skins/default/xui/en-us/xui_version.xml
1308 ) 1316 )
1309 1317
@@ -1316,6 +1324,7 @@ list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
1316 1324
1317set(viewer_APPSETTINGS_FILES 1325set(viewer_APPSETTINGS_FILES
1318 app_settings/anim.ini 1326 app_settings/anim.ini
1327 app_settings/ao_template.ini
1319 app_settings/cmd_line.xml 1328 app_settings/cmd_line.xml
1320 app_settings/grass.xml 1329 app_settings/grass.xml
1321 app_settings/high_graphics.xml 1330 app_settings/high_graphics.xml
diff --git a/linden/indra/newview/app_settings/ao_template.ini b/linden/indra/newview/app_settings/ao_template.ini
index d35b2ee..33b530a 100644
--- a/linden/indra/newview/app_settings/ao_template.ini
+++ b/linden/indra/newview/app_settings/ao_template.ini
@@ -1,9 +1,9 @@
1############################################################ 1###############################################
2############################################################ 2###############################################
3## 3##
4## IMPRUDENCE AO TEMPLATE 4## IMPRUDENCE AO TEMPLATE
5## 5##
6############################################################ 6###############################################
7## 7##
8## INSTRUCTIONS: 8## INSTRUCTIONS:
9## 9##
@@ -33,15 +33,15 @@
33## 33##
34## 8. Press the "Reload" button in the AO. 34## 8. Press the "Reload" button in the AO.
35## 35##
36############################################################ 36###############################################
37 37
38############################################################ 38###############################################
39############################################################ 39###############################################
40## 40##
41## LIST YOUR ANIMATIONS HERE 41## LIST YOUR ANIMATIONS HERE
42## 42##
43############################################################ 43###############################################
44############################################################ 44###############################################
45 45
46 46
47[ Standing ] 47[ Standing ]
@@ -61,20 +61,14 @@
61[ Jumping ] 61[ Jumping ]
62[ Pre Jumping ] 62[ Pre Jumping ]
63[ Running ] 63[ Running ]
64[ Turning Right ]
65[ Turning Left ]
66[ Floating ]
67[ Swimming Forward ]
68[ Swimming Up ]
69[ Swimming Down ]
70 64
71 65
72############################################################# 66###############################################
73############################################################# 67###############################################
74## 68##
75## FOR ADVANCED USERS ONLY 69## FOR ADVANCED USERS ONLY
76## 70##
77############################################################# 71###############################################
78## 72##
79## Lines starting with a # are treated as comments and ignored. Blank lines are ignored. Valid lines look like this: 73## Lines starting with a # are treated as comments and ignored. Blank lines are ignored. Valid lines look like this:
80## 74##
@@ -100,4 +94,4 @@
100## 94##
101## Imprudence's AO notecard system is based on the ZHAO-II HUD by Second Life resident Ziggy Puff. 95## Imprudence's AO notecard system is based on the ZHAO-II HUD by Second Life resident Ziggy Puff.
102## 96##
103############################################################ \ No newline at end of file 97############################################### \ No newline at end of file
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index c144f95..9c95b1f 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -844,6 +844,17 @@
844 <key>Value</key> 844 <key>Value</key>
845 <integer>1</integer> 845 <integer>1</integer>
846 </map> 846 </map>
847 <key>WarnFirstLoginScreen</key>
848 <map>
849 <key>Comment</key>
850 <string>Enables default grid selector on FirstLoginScreen</string>
851 <key>Persist</key>
852 <integer>1</integer>
853 <key>Type</key>
854 <string>Boolean</string>
855 <key>Value</key>
856 <integer>1</integer>
857 </map>
847 <key>WarnFirstMiniMap</key> 858 <key>WarnFirstMiniMap</key>
848 <map> 859 <map>
849 <key>Comment</key> 860 <key>Comment</key>
diff --git a/linden/indra/newview/floatergriddefault.cpp b/linden/indra/newview/floatergriddefault.cpp
new file mode 100644
index 0000000..2c853df
--- /dev/null
+++ b/linden/indra/newview/floatergriddefault.cpp
@@ -0,0 +1,102 @@
1/**
2* @file floatergriddefault.cpp
3* @brief prompts user to set the default grid on first use
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2010, McCabe Maxsted
8*
9* Imprudence 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
31#include "llviewerprecompiledheaders.h"
32
33#include "floatergriddefault.h"
34
35#include "hippoGridManager.h"
36#include "llpanellogin.h"
37#include "llscrolllistctrl.h"
38#include "lluictrlfactory.h"
39
40FloaterGridDefault::FloaterGridDefault(const LLSD& key)
41{
42 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_grid_default_selector.xml");
43}
44
45FloaterGridDefault::~FloaterGridDefault()
46{
47}
48
49BOOL FloaterGridDefault::postBuild()
50{
51 // populate the grid chooser
52 LLScrollListCtrl* grid_list = getChild<LLScrollListCtrl>("grid_list");
53 grid_list->deleteAllItems();
54
55 LLSD element;
56
57 for (HippoGridManager::GridIterator it = gHippoGridManager->beginGrid(); it != gHippoGridManager->endGrid(); ++it)
58 {
59 std::string grid_nick = it->second->getGridNick();
60 // There's no reason why empty grids nicks should be in this list, ugh
61 if (!grid_nick.empty())
62 {
63 element["id"] = grid_nick;
64 element["columns"][0]["column"] = "grid";
65 element["columns"][0]["type"] = "text";
66 element["columns"][0]["value"] = grid_nick;
67 grid_list->addElement(element, ADD_BOTTOM);
68 }
69 }
70
71 grid_list->setFocus(TRUE);
72
73 childSetAction("btn_ok", onClickOK, this);
74 childSetAction("btn_cancel", onClickCancel, this);
75
76 return TRUE;
77}
78
79// static
80void FloaterGridDefault::onClickOK(void* userdata)
81{
82 FloaterGridDefault* self = (FloaterGridDefault*)userdata;
83
84 LLScrollListCtrl* grid_list = self->getChild<LLScrollListCtrl>("grid_list");
85 std::string selected = grid_list->getFirstSelected()->getValue().asString();
86
87 if (!selected.empty() || selected != gHippoGridManager->getCurrentGridNick())
88 {
89 gHippoGridManager->setDefaultGrid(selected);
90 gHippoGridManager->setCurrentGridAsConnected();
91 gHippoGridManager->saveFile();
92 LLPanelLogin::updateGridCombo(selected);
93 }
94 self->close();
95}
96
97// static
98void FloaterGridDefault::onClickCancel(void* userdata)
99{
100 FloaterGridDefault* self = (FloaterGridDefault*)userdata;
101 self->close();
102}
diff --git a/linden/indra/newview/floatergriddefault.h b/linden/indra/newview/floatergriddefault.h
new file mode 100644
index 0000000..009e23f
--- /dev/null
+++ b/linden/indra/newview/floatergriddefault.h
@@ -0,0 +1,49 @@
1/**
2* @file floatergriddefault.h
3* @brief prompts user to set the default grid on first use
4*
5* $LicenseInfo:firstyear=2009&license=viewergpl$
6*
7* Copyright (c) 2010, McCabe Maxsted
8*
9* Imprudence 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
31#ifndef FLOATERGRIDDEFAULT_H
32#define FLOATERGRIDDEFAULT_H
33
34#include "llfloater.h"
35
36class FloaterGridDefault : public LLFloater, public LLFloaterSingleton<FloaterGridDefault>
37{
38public:
39 FloaterGridDefault(const LLSD& key);
40 ~FloaterGridDefault();
41
42 /*virtual*/ BOOL postBuild();
43
44private:
45 static void onClickOK(void* userdata);
46 static void onClickCancel(void* userdata);
47};
48
49#endif // FLOATERGRIDDEFAULT_H
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index cba1af1..db2854d 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -1827,6 +1827,7 @@ bool LLAppViewer::initConfiguration()
1827 LLFirstUse::addConfigVariable("FirstSculptedPrim"); 1827 LLFirstUse::addConfigVariable("FirstSculptedPrim");
1828 LLFirstUse::addConfigVariable("FirstVoice"); 1828 LLFirstUse::addConfigVariable("FirstVoice");
1829 LLFirstUse::addConfigVariable("FirstMedia"); 1829 LLFirstUse::addConfigVariable("FirstMedia");
1830 LLFirstUse::addConfigVariable("FirstLoginScreen");
1830 1831
1831 // - read command line settings. 1832 // - read command line settings.
1832 LLControlGroupCLP clp; 1833 LLControlGroupCLP clp;
diff --git a/linden/indra/newview/llfirstuse.cpp b/linden/indra/newview/llfirstuse.cpp
index 34e3fcc..c0f07e5 100644
--- a/linden/indra/newview/llfirstuse.cpp
+++ b/linden/indra/newview/llfirstuse.cpp
@@ -46,6 +46,7 @@
46#include "lltracker.h" 46#include "lltracker.h"
47 47
48#include "llvoavatar.h" 48#include "llvoavatar.h"
49#include "floatergriddefault.h"
49#include "hippoGridManager.h" 50#include "hippoGridManager.h"
50 51
51// [RLVa:KB] - Version: 1.22.11 52// [RLVa:KB] - Version: 1.22.11
@@ -308,6 +309,7 @@ void LLFirstUse::useMedia()
308 LLNotifications::instance().add("FirstMedia"); 309 LLNotifications::instance().add("FirstMedia");
309 } 310 }
310} 311}
312
311void LLFirstUse::callbackClientTags(const LLSD& notification, const LLSD& response) 313void LLFirstUse::callbackClientTags(const LLSD& notification, const LLSD& response)
312{ 314{
313 gSavedSettings.setWarning("ClientTags", FALSE); 315 gSavedSettings.setWarning("ClientTags", FALSE);
@@ -331,6 +333,7 @@ void LLFirstUse::callbackClientTags(const LLSD& notification, const LLSD& respon
331 gSavedSettings.setBOOL("DownloadClientTags",FALSE); 333 gSavedSettings.setBOOL("DownloadClientTags",FALSE);
332 } 334 }
333} 335}
336
334// static 337// static
335void LLFirstUse::ClientTags() 338void LLFirstUse::ClientTags()
336{ 339{
@@ -340,3 +343,14 @@ void LLFirstUse::ClientTags()
340 } 343 }
341} 344}
342 345
346// static
347void LLFirstUse::useLoginScreen()
348{
349 if (gSavedSettings.getWarning("FirstLoginScreen"))
350 {
351 gSavedSettings.setWarning("FirstLoginScreen", FALSE);
352
353 FloaterGridDefault::getInstance()->open();
354 FloaterGridDefault::getInstance()->center();
355 }
356}
diff --git a/linden/indra/newview/llfirstuse.h b/linden/indra/newview/llfirstuse.h
index 6467734..bd44ece 100644
--- a/linden/indra/newview/llfirstuse.h
+++ b/linden/indra/newview/llfirstuse.h
@@ -112,6 +112,7 @@ public:
112 static void useDebugMenus(); 112 static void useDebugMenus();
113 static void useSculptedPrim(); 113 static void useSculptedPrim();
114 static void useMedia(); 114 static void useMedia();
115 static void useLoginScreen();
115 static void callbackClientTags(const LLSD& notification, const LLSD& response); 116 static void callbackClientTags(const LLSD& notification, const LLSD& response);
116 static void ClientTags(); 117 static void ClientTags();
117 118
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index a95272a..460c67f 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -52,6 +52,7 @@
52#include "llcombobox.h" 52#include "llcombobox.h"
53#include "llcurl.h" 53#include "llcurl.h"
54#include "llviewercontrol.h" 54#include "llviewercontrol.h"
55#include "llfirstuse.h"
55#include "llfloaterabout.h" 56#include "llfloaterabout.h"
56#include "llfloatertest.h" 57#include "llfloatertest.h"
57#include "llfloaterpreference.h" 58#include "llfloaterpreference.h"
@@ -329,6 +330,7 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
329 refreshLocation( false ); 330 refreshLocation( false );
330#endif 331#endif
331 332
333 LLFirstUse::useLoginScreen();
332} 334}
333 335
334void LLPanelLogin::setSiteIsAlive( bool alive ) 336void LLPanelLogin::setSiteIsAlive( bool alive )
@@ -801,9 +803,12 @@ void LLPanelLogin::refreshLoginPage()
801 // kick off a request to grab the url manually 803 // kick off a request to grab the url manually
802 gResponsePtr = LLIamHereLogin::build(sInstance); 804 gResponsePtr = LLIamHereLogin::build(sInstance);
803 std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); 805 std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage();
804 if (!login_page.empty()) { 806 if (!login_page.empty())
807 {
805 LLHTTPClient::head(login_page, gResponsePtr); 808 LLHTTPClient::head(login_page, gResponsePtr);
806 } else { 809 }
810 else
811 {
807 sInstance->setSiteIsAlive(false); 812 sInstance->setSiteIsAlive(false);
808 } 813 }
809} 814}
@@ -815,7 +820,8 @@ void LLPanelLogin::loadLoginPage()
815 820
816 821
817 std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage(); 822 std::string login_page = gHippoGridManager->getCurrentGrid()->getLoginPage();
818 if (login_page.empty()) { 823 if (login_page.empty())
824 {
819 sInstance->setSiteIsAlive(false); 825 sInstance->setSiteIsAlive(false);
820 return; 826 return;
821 } 827 }
@@ -1092,35 +1098,45 @@ void LLPanelLogin::onSelectServer(LLUICtrl* ctrl, void*)
1092 // *NOTE: The paramters for this method are ignored. 1098 // *NOTE: The paramters for this method are ignored.
1093 // LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) 1099 // LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*)
1094 // calls this method. 1100 // calls this method.
1101 updateGridCombo(LLStringUtil::null);
1102}
1095 1103
1096 // The user twiddled with the grid choice ui. 1104// static
1097 // apply the selection to the grid setting. 1105void LLPanelLogin::updateGridCombo(std::string grid_nick)
1098 std::string grid_label; 1106{
1099 //S32 grid_index;
1100
1101 LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); 1107 LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
1102 LLSD combo_val = combo->getValue(); 1108
1103 1109 if (grid_nick.empty())
1104 std::string mCurGrid = ctrl->getValue().asString(); 1110 {
1105 //KOW 1111 // The user twiddled with the grid choice ui.
1106 gHippoGridManager->setCurrentGrid(mCurGrid); 1112 // apply the selection to the grid setting.
1107 // HippoGridInfo *gridInfo = gHippoGridManager->getGrid(mCurGrid); 1113 //std::string grid_label;
1108 // if (gridInfo) { 1114 //S32 grid_index;
1109 // //childSetText("gridnick", gridInfo->getGridNick()); 1115
1110 // //platform->setCurrentByIndex(gridInfo->getPlatform()); 1116 grid_nick = combo->getValue().asString();
1111 // //childSetText("gridname", gridInfo->getGridName()); 1117
1112 // LLPanelLogin::setFields( gridInfo->getFirstName(), gridInfo->getLastName(), gridInfo->getAvatarPassword(), 1 ); 1118 // HippoGridInfo *gridInfo = gHippoGridManager->getGrid(mCurGrid);
1113 // } 1119 // if (gridInfo) {
1114 if (mCurGrid == gHippoGridManager->getConnectedGrid()->getGridNick()) 1120 // //childSetText("gridnick", gridInfo->getGridNick());
1115 gHippoLimits->setLimits(); 1121 // //platform->setCurrentByIndex(gridInfo->getPlatform());
1122 // //childSetText("gridname", gridInfo->getGridName());
1123 // LLPanelLogin::setFields( gridInfo->getFirstName(), gridInfo->getLastName(), gridInfo->getAvatarPassword(), 1 );
1124 // }
1125 }
1126 else
1127 {
1128 combo->setSimple(grid_nick);
1129 }
1116 1130
1117 llwarns << "current grid = " << mCurGrid << llendl; 1131 gHippoGridManager->setCurrentGrid(grid_nick);
1132
1133 llinfos << "current grid set to " << grid_nick << llendl;
1118 1134
1119 // grid changed so show new splash screen (possibly) 1135 // grid changed so show new splash screen (possibly)
1120 loadLoginPage(); 1136 loadLoginPage();
1121 1137
1122 // save grid choice to settings 1138 // save grid choice to settings
1123 gSavedSettings.setString("LastSelectedGrid", mCurGrid); 1139 gSavedSettings.setString("LastSelectedGrid", grid_nick);
1124} 1140}
1125/* 1141/*
1126void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) 1142void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*)
diff --git a/linden/indra/newview/llpanellogin.h b/linden/indra/newview/llpanellogin.h
index f2c589d..15c2d28 100644
--- a/linden/indra/newview/llpanellogin.h
+++ b/linden/indra/newview/llpanellogin.h
@@ -65,6 +65,8 @@ public:
65 65
66 static void addServer(const std::string& server); 66 static void addServer(const std::string& server);
67 static void refreshLocation( bool force_visible ); 67 static void refreshLocation( bool force_visible );
68 // Updates grid combo at login screen with a specific nick. Use an empty string to refresh
69 static void updateGridCombo(std::string grid_nick);
68 70
69 static void getFields(std::string *firstname, std::string *lastname, 71 static void getFields(std::string *firstname, std::string *lastname,
70 std::string *password); 72 std::string *password);
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml b/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml
new file mode 100644
index 0000000..2cf9cd7
--- /dev/null
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml
@@ -0,0 +1,19 @@
1<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
2<floater can_close="true" can_drag_on_left="false" can_minimize="false" can_resize="false"
3 height="350" min_height="350" min_width="250" name="default_grid"
4 title="Select a Default Grid" width="250">
5 <text top="-18" follows="top|left" font="SansSerifSmall" left="10"
6 halign="left" h_pad="0" v_pad="0" height="16" name="select_label">
7 Or use the Grid Manager to add a new one
8 </text>
9 <scroll_list background_visible="true" bottom_delta="30" draw_border="true"
10 draw_stripes="false" sort_column="0"
11 follows="top|left|bottom" height="280" left="10" multi_select="false"
12 name="grid_list" width="230">
13 <column label="" name="grid" width="230" />
14 </scroll_list>
15 <button bottom="5" follows="bottom|right" height="20" label="Cancel"
16 right="-5" name="btn_cancel" width="85" />
17 <button bottom_delta="0" follows="bottom|right" height="20" label="OK"
18 left_delta="-90" name="btn_ok" width="85" />
19</floater> \ No newline at end of file