aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-04-15 21:07:29 -0700
committerMcCabe Maxsted2011-04-15 21:07:29 -0700
commitf7df6f323e4746abae0a0858cb7ef56bedbb94ca (patch)
tree7a4a9e3be1ca658c0d72c78f413946249a38ad21
parenttest commit - slviewer-0-v12500-DeadObjectsFixes_v2.patch (diff)
downloadmeta-impy-f7df6f323e4746abae0a0858cb7ef56bedbb94ca.zip
meta-impy-f7df6f323e4746abae0a0858cb7ef56bedbb94ca.tar.gz
meta-impy-f7df6f323e4746abae0a0858cb7ef56bedbb94ca.tar.bz2
meta-impy-f7df6f323e4746abae0a0858cb7ef56bedbb94ca.tar.xz
Updated the grid manager to save names and passwords along with grid info. This commit includes the following:
* Fixed missing GPL headers from hippo grid manager * Fixed grids named <required> or "" being saved in the list * Fixed grid manager list only showing grid nicks, not grid names * Fixed grid names not settable in the grid manager * Grid manager now remembers avatar names and passwords * Usernames can now be set in the grid manager for SL (needs work) * Fixed grid manager being stuck in an updating state * Some general code cleanup
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/floatergriddefault.cpp57
-rw-r--r--linden/indra/newview/floatergriddefault.h3
-rw-r--r--linden/indra/newview/floatergridmanager.cpp864
-rw-r--r--linden/indra/newview/floatergridmanager.h96
-rw-r--r--linden/indra/newview/hippogridmanager.cpp387
-rw-r--r--linden/indra/newview/hippogridmanager.h171
-rw-r--r--linden/indra/newview/llappviewer.cpp4
-rw-r--r--linden/indra/newview/llpaneldirfind.cpp12
-rw-r--r--linden/indra/newview/llpanellogin.cpp75
-rw-r--r--linden/indra/newview/llstartup.cpp96
-rw-r--r--linden/indra/newview/llviewernetwork.cpp6
-rw-r--r--linden/indra/newview/llxmlrpctransaction.cpp10
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_grid_default_selector.xml5
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml229
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml25
15 files changed, 989 insertions, 1051 deletions
diff --git a/linden/indra/newview/floatergriddefault.cpp b/linden/indra/newview/floatergriddefault.cpp
index 6a2526d..b89674f 100644
--- a/linden/indra/newview/floatergriddefault.cpp
+++ b/linden/indra/newview/floatergriddefault.cpp
@@ -49,26 +49,7 @@ FloaterGridDefault::~FloaterGridDefault()
49BOOL FloaterGridDefault::postBuild() 49BOOL FloaterGridDefault::postBuild()
50{ 50{
51 // populate the grid chooser 51 // populate the grid chooser
52 LLScrollListCtrl* grid_list = getChild<LLScrollListCtrl>("grid_list"); 52 refreshGridList();
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 53
73 childSetAction("btn_ok", onClickOK, this); 54 childSetAction("btn_ok", onClickOK, this);
74 childSetAction("btn_cancel", onClickCancel, this); 55 childSetAction("btn_cancel", onClickCancel, this);
@@ -99,3 +80,39 @@ void FloaterGridDefault::onClickCancel(void* userdata)
99 FloaterGridDefault* self = (FloaterGridDefault*)userdata; 80 FloaterGridDefault* self = (FloaterGridDefault*)userdata;
100 self->close(); 81 self->close();
101} 82}
83
84// static
85void FloaterGridDefault::refreshGridList()
86{
87 LLScrollListCtrl* grid_list = FloaterGridDefault::getInstance()->getChild<LLScrollListCtrl>("grid_list");
88 if (grid_list)
89 {
90 grid_list->deleteAllItems();
91
92 LLSD element;
93
94 for (HippoGridManager::GridIterator it = gHippoGridManager->beginGrid();
95 it != gHippoGridManager->endGrid(); ++it)
96 {
97 std::string grid_nick = it->second->getGridNick();
98 // There's no reason why empty grids nicks should be in this list...
99 if (grid_nick.empty())
100 {
101 continue;
102 }
103 else
104 {
105 element["id"] = grid_nick;
106 element["columns"][0]["column"] = "grid_nick";
107 element["columns"][0]["type"] = "text";
108 element["columns"][0]["value"] = grid_nick;
109 element["columns"][1]["column"] = "grid_name";
110 element["columns"][1]["type"] = "text";
111 element["columns"][1]["value"] = it->second->getGridName();
112 grid_list->addElement(element, ADD_BOTTOM);
113 }
114 }
115
116 grid_list->setFocus(TRUE);
117 }
118}
diff --git a/linden/indra/newview/floatergriddefault.h b/linden/indra/newview/floatergriddefault.h
index 009e23f..5c07efe 100644
--- a/linden/indra/newview/floatergriddefault.h
+++ b/linden/indra/newview/floatergriddefault.h
@@ -41,6 +41,9 @@ public:
41 41
42 /*virtual*/ BOOL postBuild(); 42 /*virtual*/ BOOL postBuild();
43 43
44 // refresh the default grid list selection. Steals focus
45 void refreshGridList();
46
44private: 47private:
45 static void onClickOK(void* userdata); 48 static void onClickOK(void* userdata);
46 static void onClickCancel(void* userdata); 49 static void onClickCancel(void* userdata);
diff --git a/linden/indra/newview/floatergridmanager.cpp b/linden/indra/newview/floatergridmanager.cpp
index 298fe35..ad6ea05 100644
--- a/linden/indra/newview/floatergridmanager.cpp
+++ b/linden/indra/newview/floatergridmanager.cpp
@@ -1,54 +1,68 @@
1/* 1/**
2 * floatergridmanager.cpp 2* @file floatergridmanager.cpp
3 * This is Meerkats grid manager. 3* @brief UI for managing grid information
4 * -Patrick Sapinski (Monday, August 17, 2009) 4*
5 * 5* $LicenseInfo:firstyear=2011&license=viewergpl$
6 * Modified by McCabe Maxsted for Imprudence 6*
7 */ 7* Copyright (c) 2011, McCabe Maxsted
8* based on Meerkat's grid manager by Patrick Sapinski
9*
10* Imprudence Viewer Source Code
11* The source code in this file ("Source Code") is provided to you
12* under the terms of the GNU General Public License, version 2.0
13* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
14* this distribution, or online at
15* http://secondlifegrid.net/programs/open_source/licensing/gplv2
16*
17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21*
22* By copying, modifying or distributing this software, you acknowledge
23* that you have read and understood your obligations described above,
24* and agree to abide by those obligations.
25*
26* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
27* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28* COMPLETENESS OR PERFORMANCE.
29* $/LicenseInfo$
30*/
8 31
9#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
10 33
11#include "floatergridmanager.h" 34#include "floatergridmanager.h"
12 35
13#include <boost/algorithm/string.hpp> 36#include <boost/algorithm/string.hpp>
37#include "floatergriddefault.h"
14#include "llviewercontrol.h" 38#include "llviewercontrol.h"
15#include "llcombobox.h" 39#include "llcombobox.h"
16#include "llscrolllistctrl.h" 40#include "llscrolllistctrl.h"
17#include "llmd5.h" 41#include "llmd5.h"
42#include "llnotifications.h"
18#include "llurlsimstring.h" 43#include "llurlsimstring.h"
19#include "lluictrlfactory.h" 44#include "lluictrlfactory.h"
20#include "hippogridmanager.h" 45#include "hippogridmanager.h"
21#include "llviewernetwork.h" 46#include "llviewernetwork.h"
22#include "llpanellogin.h" 47#include "llpanellogin.h"
23 48
24#define PASSWORD_FILLER "123456789!123456" 49const std::string PASSWORD_FILLER = "123456789!123456";
25 50//bool FloaterGridManager::sIsInitialLogin;
26LoginController* FloaterGridManager::sController = NULL;
27bool FloaterGridManager::sIsInitialLogin;
28std::string FloaterGridManager::sGrid;
29 51
30FloaterGridManager::FloaterGridManager(const LLSD& key) 52FloaterGridManager::FloaterGridManager(const LLSD& key)
31: mState(NORMAL), 53 :
32 mCurGrid(gHippoGridManager->getCurrentGridNick()), 54 mState(GRID_STATE_NORMAL),
33 mIncomingPassword(""), 55 mCurGrid(""),
34 mMungedPassword("") 56 mMungedPassword("")
35{ 57{
36 llinfos << "Opening grid manager" << llendl; 58 llinfos << "Opening grid manager" << llendl;
37 59
38 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_grid_manager.xml"); 60 LLUICtrlFactory::getInstance()->buildFloater(this, "floater_grid_manager.xml");
39 center(); 61 center();
40
41 LLLineEditor* edit = getChild<LLLineEditor>("avatar_password_edit");
42 if (edit)
43 {
44 edit->setDrawAsterixes(TRUE);
45 }
46} 62}
47 63
48
49FloaterGridManager::~FloaterGridManager() 64FloaterGridManager::~FloaterGridManager()
50{ 65{
51 FloaterGridManager::sController = NULL;
52} 66}
53 67
54BOOL FloaterGridManager::postBuild() 68BOOL FloaterGridManager::postBuild()
@@ -64,105 +78,117 @@ BOOL FloaterGridManager::postBuild()
64 childSetAction("btn_copy", onClickCopy, this); 78 childSetAction("btn_copy", onClickCopy, this);
65 childSetAction("btn_ok", onClickOk, this); 79 childSetAction("btn_ok", onClickOk, this);
66 childSetAction("btn_apply", onClickApply, this); 80 childSetAction("btn_apply", onClickApply, this);
67 // childSetAction("set_default", onClickDefault, this); // We use the last selected grid as the default
68 childSetAction("btn_cancel", onClickCancel, this); 81 childSetAction("btn_cancel", onClickCancel, this);
69 childSetAction("btn_clear", onClickClear, this); 82 childSetAction("btn_clear", onClickClear, this);
70 childSetAction("btn_gridinfo", onClickGridInfo, this); 83 childSetAction("btn_gridinfo", onClickGridInfo, this);
71 // childSetAction("btn_help_render_compat", onClickHelpRenderCompat, this); // Ugly ugly ugly
72 84
73 childSetCommitCallback("grid_selector", onSelectGrid, this); 85 childSetCommitCallback("grid_selector", onSelectGrid, this);
74 LLScrollListCtrl* combo = getChild<LLScrollListCtrl>("grid_selector"); 86 LLScrollListCtrl* combo = getChild<LLScrollListCtrl>("grid_selector");
75 combo->setFocus(TRUE); 87 combo->setFocus(TRUE);
76 88
89 clearGridInfo(true);
90
77 refreshGrids(); 91 refreshGrids();
78 92
79 return TRUE; 93 // We use the last selected grid as the default
80} 94 HippoGridInfo* first_selected = gHippoGridManager->getGrid(mCurGrid);
95 if (first_selected)
96 {
97 getChild<LLLineEditor>("first_name")->setVisible(!first_selected->isUsernameCompat());
98 getChild<LLLineEditor>("last_name")->setVisible(!first_selected->isUsernameCompat());
99 getChild<LLLineEditor>("username")->setVisible(first_selected->isUsernameCompat());
100 }
101 getChild<LLLineEditor>("gridnick")->setEnabled(false);
81 102
82void FloaterGridManager::clearInfo() 103 return TRUE;
83{
84 //getChild<LLScrollListCtrl>("grid_selector")->clear();
85 //getChild<LLLineEditor>("gridnick")->clear();
86 //getChild<LLLineEditor>("gridname")->clear();
87 //getChild<LLLineEditor>("loginuri")->clear();
88 getChild<LLLineEditor>("loginpage")->clear();
89 getChild<LLLineEditor>("helperuri")->clear();
90 getChild<LLLineEditor>("website")->clear();
91 getChild<LLLineEditor>("support")->clear();
92 getChild<LLLineEditor>("register")->clear();
93 getChild<LLLineEditor>("password")->clear();
94 //getChild<LLLineEditor>("first_name")->clear();
95 //getChild<LLLineEditor>("last_name")->clear();
96 //getChild<LLLineEditor>("avatar_password")->clear();
97 getChild<LLLineEditor>("search")->clear();
98 //getChild<LLButton>("btn_delete");
99 //getChild<LLButton>("btn_add")
100 //getChild<LLButton>("btn_copy");
101 //getChild<LLButton>("set_default")->setEnabled(FALSE);
102 getChild<LLButton>("btn_gridinfo")->setEnabled(TRUE);
103 //getChild<LLButton>("btn_clear");
104 //getChild<LLButton>("btn_help_render_compat")->setEnabled(FALSE);
105} 104}
106 105
107void FloaterGridManager::draw() 106void FloaterGridManager::draw()
108{ 107{
109 refresh(); 108 refresh();
110
111 LLFloater::draw(); 109 LLFloater::draw();
112} 110}
113 111
114void FloaterGridManager::refresh() 112void FloaterGridManager::refresh()
115{ 113{
116 //TODO: these should just be set in a prompt 114 //TODO: new grid creation should just be set in a popup
117 bool can_edit = (!getChild<LLLineEditor>("gridnick")->getText().empty() && 115 bool can_edit = (!(getChild<LLLineEditor>("gridnick")->getText().empty()) &&
118 !getChild<LLLineEditor>("loginuri")->getText().empty() && 116 !(getChild<LLLineEditor>("gridname")->getText().empty()) &&
119 getChild<LLLineEditor>("gridnick")->getText() != "<required>" && 117 !(getChild<LLLineEditor>("loginuri")->getText().empty()));
120 getChild<LLLineEditor>("loginuri")->getText() != "<required>");
121 118
122 //getChild<LLLineEditor>("gridname");
123 getChild<LLLineEditor>("loginpage")->setEnabled(can_edit); 119 getChild<LLLineEditor>("loginpage")->setEnabled(can_edit);
124 getChild<LLLineEditor>("helperuri")->setEnabled(can_edit); 120 getChild<LLLineEditor>("helperuri")->setEnabled(can_edit);
125 getChild<LLLineEditor>("website")->setEnabled(can_edit); 121 getChild<LLLineEditor>("website")->setEnabled(can_edit);
126 getChild<LLLineEditor>("support")->setEnabled(can_edit); 122 getChild<LLLineEditor>("support")->setEnabled(can_edit);
127 getChild<LLLineEditor>("register")->setEnabled(can_edit); 123 getChild<LLLineEditor>("register")->setEnabled(can_edit);
128 getChild<LLLineEditor>("password")->setEnabled(can_edit); 124 getChild<LLLineEditor>("password")->setEnabled(can_edit);
129 //getChild<LLLineEditor>("first_name")->setEnabled(can_edit); 125 getChild<LLLineEditor>("first_name")->setEnabled(can_edit);
130 //getChild<LLLineEditor>("last_name")->setEnabled(can_edit); 126 getChild<LLLineEditor>("last_name")->setEnabled(can_edit);
131 //getChild<LLLineEditor>("avatar_password")->setEnabled(can_edit); 127 getChild<LLLineEditor>("username")->setEnabled(can_edit);
128 getChild<LLLineEditor>("avatar_password")->setEnabled(can_edit);
132 getChild<LLLineEditor>("search")->setEnabled(can_edit); 129 getChild<LLLineEditor>("search")->setEnabled(can_edit);
133 getChild<LLButton>("btn_delete")->setEnabled(can_edit); 130 getChild<LLButton>("btn_delete")->setEnabled(can_edit);
134 //getChild<LLButton>("btn_add")
135 //getChild<LLButton>("btn_copy")->setEnabled(can_edit); 131 //getChild<LLButton>("btn_copy")->setEnabled(can_edit);
136 //getChild<LLButton>("set_default")->setEnabled(can_dit);
137 getChild<LLButton>("btn_gridinfo")->setEnabled(can_edit); 132 getChild<LLButton>("btn_gridinfo")->setEnabled(can_edit);
138 getChild<LLButton>("btn_clear")->setEnabled(can_edit); 133 getChild<LLButton>("btn_clear")->setEnabled(can_edit);
139 //getChild<LLButton>("btn_help_render_compat")->setEnabled(can_edit); 134
135 getChild<LLTextBox>("loginpage_text")->setEnabled(can_edit);
136 getChild<LLTextBox>("helperuri_text")->setEnabled(can_edit);
137 getChild<LLTextBox>("website_text")->setEnabled(can_edit);
138 getChild<LLTextBox>("support_text")->setEnabled(can_edit);
139 getChild<LLTextBox>("register_text")->setEnabled(can_edit);
140 getChild<LLTextBox>("password_text")->setEnabled(can_edit);
141 getChild<LLTextBox>("first_name_text")->setEnabled(can_edit);
142 getChild<LLTextBox>("last_name_text")->setEnabled(can_edit);
143 getChild<LLTextBox>("username_text")->setEnabled(can_edit);
144 getChild<LLTextBox>("avatar_password_text")->setEnabled(can_edit);
145 getChild<LLTextBox>("search_text")->setEnabled(can_edit);
140} 146}
141 147
142void FloaterGridManager::refreshGrids() 148void FloaterGridManager::refreshGrids()
143{ 149{
144 LLScrollListCtrl *grids = FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector"); 150 // no need to update the list while editing
151 if (FloaterGridManager::getInstance()->getGridState() >= GRID_STATE_NEW)
152 {
153 return;
154 }
155
156 LLScrollListCtrl* grid_list = FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector");
145 std::string lastSelectedItem; 157 std::string lastSelectedItem;
146 LLSD element; 158 LLSD element;
147 159
148 if (grids->getFirstSelected()) 160 if (grid_list->getFirstSelected())
149 { 161 {
150 lastSelectedItem = grids->getFirstSelected()->getValue().asString(); 162 // grid NICK
163 lastSelectedItem = grid_list->getFirstSelected()->getColumn(0)->getValue().asString();
151 } 164 }
152 165
153 grids->deleteAllItems(); 166 grid_list->deleteAllItems();
154 167
155 for (HippoGridManager::GridIterator it = gHippoGridManager->beginGrid(); it != gHippoGridManager->endGrid(); ++it) 168 // Grids should really have UUIDs, but we'll use their nicks to keep track of 'em instead
169 for (HippoGridManager::GridIterator it = gHippoGridManager->beginGrid();
170 it != gHippoGridManager->endGrid(); ++it)
156 { 171 {
157 std::string grid_nick = it->second->getGridNick(); 172 std::string grid_nick = it->second->getGridNick();
158 // There's no reason why empty grids nicks should be in this list, ugh 173
159 if (!grid_nick.empty() && grid_nick != gHippoGridManager->getCurrentGridNick()) 174 if (grid_nick.empty())
175 {
176 // shouldn't ever happen
177 continue;
178 }
179
180 // Note: default sorted by grid NAME in the XUI
181 if (grid_nick != gHippoGridManager->getCurrentGridNick())
160 { 182 {
161 element["id"] = grid_nick; 183 element["id"] = grid_nick;
162 element["columns"][0]["column"] = "grid"; 184 element["columns"][0]["column"] = "grid_nick";
163 element["columns"][0]["type"] = "text"; 185 element["columns"][0]["type"] = "text";
164 element["columns"][0]["value"] = grid_nick; 186 element["columns"][0]["value"] = grid_nick;
165 grids->addElement(element, ADD_BOTTOM); 187 element["columns"][1]["column"] = "grid_name";
188 element["columns"][1]["type"] = "text";
189 element["columns"][1]["value"] = it->second->getGridName();
190
191 grid_list->addElement(element, ADD_BOTTOM);
166 } 192 }
167 } 193 }
168 194
@@ -172,368 +198,359 @@ void FloaterGridManager::refreshGrids()
172 if (!gHippoGridManager->getCurrentGridNick().empty()) 198 if (!gHippoGridManager->getCurrentGridNick().empty())
173 { 199 {
174 element["id"] = gHippoGridManager->getCurrentGridNick(); 200 element["id"] = gHippoGridManager->getCurrentGridNick();
175 element["columns"][0]["column"] = "grid"; 201 element["columns"][0]["column"] = "grid_nick";
176 element["columns"][0]["type"] = "text"; 202 element["columns"][0]["type"] = "text";
177 element["columns"][0]["font-style"] = "BOLD"; 203 element["columns"][0]["font-style"] = "BOLD";
178 element["columns"][0]["value"] = gHippoGridManager->getCurrentGridNick(); 204 element["columns"][0]["value"] = gHippoGridManager->getCurrentGridNick();
179 grids->addElement(element, ADD_TOP); 205 element["columns"][1]["column"] = "grid_name";
206 element["columns"][1]["type"] = "text";
207 element["columns"][1]["value"] = gHippoGridManager->getCurrentGrid()->getGridName();
208
209 grid_list->addElement(element, ADD_TOP);
180 } 210 }
181 211
182 // Reselect the item if we had one selected 212 // Reselect the item if we had one selected
183 if (lastSelectedItem.empty()) 213 if (lastSelectedItem.empty())
184 { 214 {
185 grids->selectItemByLabel(gHippoGridManager->getCurrentGridNick()); 215 grid_list->selectItemByLabel(gHippoGridManager->getCurrentGridNick());
216 FloaterGridManager::getInstance()->setCurGrid(gHippoGridManager->getCurrentGridNick());
186 } 217 }
187 else 218 else
188 { 219 {
189 grids->selectItemByLabel(lastSelectedItem); 220 grid_list->selectItemByLabel(lastSelectedItem);
190 } 221 FloaterGridManager::getInstance()->setCurGrid(lastSelectedItem);
191
192 // TODO: get rid of all this state junk
193 if ((FloaterGridManager::getInstance()->getState() == ADD_NEW) || (FloaterGridManager::getInstance()->getState() == ADD_COPY))
194 {
195 grids->addElement("<new>", ADD_BOTTOM);
196 } 222 }
197 223
198 //if (selectIndex >= 0) 224 //if (selectIndex >= 0)
199 //{ 225 //{
200 // grids->setCurrentByIndex(selectIndex); 226 // grid_list->setCurrentByIndex(selectIndex);
201 //} 227 //}
202 //else 228 //else
203 //{ 229 //{
204 // grids->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label 230 // grid_list->setLabel(LLStringExplicit("")); // LLComboBox::removeall() does not clear the label
205 //} 231 //}
206
207 // FloaterGridManager::getInstance()->childSetTextArg("default_grid", "[DEFAULT]", (defaultGrid != "")? defaultGrid: " ");
208 232
209 FloaterGridManager::getInstance()->childSetEnabled("btn_delete", grids->getItemCount() > 0); 233 FloaterGridManager::getInstance()->childSetEnabled("btn_delete", grid_list->getItemCount() > 0);
234 FloaterGridManager::getInstance()->childSetEnabled("btn_copy", grid_list->getItemCount() > 0);
210 235
211 FloaterGridManager::getInstance()->childSetEnabled("btn_copy", (FloaterGridManager::getInstance()->getState() == NORMAL) && (grids->getItemCount() > 0)); 236 HippoGridInfo *gridInfo = gHippoGridManager->getGrid(FloaterGridManager::getInstance()->mCurGrid);
212 // FloaterGridManager::getInstance()->childSetEnabled("set_default", (FloaterGridManager::getInstance()->getState() == NORMAL) && (grids->getItemCount() > 0)); 237 if (gridInfo)
213 FloaterGridManager::getInstance()->childSetEnabled("gridnick", (FloaterGridManager::getInstance()->getState() == ADD_NEW) || (FloaterGridManager::getInstance()->getState() == ADD_COPY));
214
215 if (FloaterGridManager::getInstance()->getState() == NORMAL)
216 { 238 {
217 HippoGridInfo *gridInfo = gHippoGridManager->getGrid(FloaterGridManager::getInstance()->getCurGrid()); 239 // Remember: NEVER let users change an existing grid's nick. Bad juju awaits if you do
218 if (gridInfo) 240 FloaterGridManager::getInstance()->getChild<LLLineEditor>("gridnick")->setText(gridInfo->getGridNick());
241 FloaterGridManager::getInstance()->getChild<LLLineEditor>("gridname")->setText(gridInfo->getGridName());
242
243 FloaterGridManager::getInstance()->getChild<LLLineEditor>("loginuri")->setText(gridInfo->getLoginURI());
244 FloaterGridManager::getInstance()->getChild<LLLineEditor>("loginpage")->setText(gridInfo->getLoginPage());
245 FloaterGridManager::getInstance()->getChild<LLLineEditor>("helperuri")->setText(gridInfo->getHelperURI());
246 FloaterGridManager::getInstance()->getChild<LLLineEditor>("website")->setText(gridInfo->getWebSite());
247 FloaterGridManager::getInstance()->getChild<LLLineEditor>("support")->setText(gridInfo->getSupportURL());
248 FloaterGridManager::getInstance()->getChild<LLLineEditor>("register")->setText(gridInfo->getRegisterURL());
249 FloaterGridManager::getInstance()->getChild<LLLineEditor>("password")->setText(gridInfo->getPasswordURL());
250 FloaterGridManager::getInstance()->getChild<LLLineEditor>("first_name")->setText(gridInfo->getFirstName());
251 FloaterGridManager::getInstance()->getChild<LLLineEditor>("last_name")->setText(gridInfo->getLastName());
252 FloaterGridManager::getInstance()->getChild<LLLineEditor>("username")->setText(gridInfo->getUsername());
253 FloaterGridManager::getInstance()->getChild<LLLineEditor>("avatar_password")->setText(gridInfo->getAvatarPassword());
254
255 FloaterGridManager::getInstance()->getChild<LLLineEditor>("first_name")->setVisible(!gridInfo->isUsernameCompat());
256 FloaterGridManager::getInstance()->getChild<LLTextBox>("first_name_text")->setVisible(!gridInfo->isUsernameCompat());
257 FloaterGridManager::getInstance()->getChild<LLLineEditor>("last_name")->setVisible(!gridInfo->isUsernameCompat());
258 FloaterGridManager::getInstance()->getChild<LLTextBox>("last_name_text")->setVisible(!gridInfo->isUsernameCompat());
259 FloaterGridManager::getInstance()->getChild<LLLineEditor>("username")->setVisible(gridInfo->isUsernameCompat());
260 FloaterGridManager::getInstance()->getChild<LLTextBox>("username_text")->setVisible(gridInfo->isUsernameCompat());
261
262 if (gridInfo->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE)
219 { 263 {
220 FloaterGridManager::getInstance()->childSetText("gridnick", gridInfo->getGridNick()); 264 FloaterGridManager::getInstance()->childSetEnabled("search", false);
221 //FloaterGridManager::getInstance()->childSetText("grid_name", gridInfo->getGridName()); 265 FloaterGridManager::getInstance()->getChild<LLLineEditor>("search")->setText(LLStringExplicit(""));
222 FloaterGridManager::getInstance()->childSetText("loginuri", gridInfo->getLoginUri()); 266 }
223 FloaterGridManager::getInstance()->childSetText("loginpage", gridInfo->getLoginPage());
224 FloaterGridManager::getInstance()->childSetText("helperuri", gridInfo->getHelperUri());
225 FloaterGridManager::getInstance()->childSetText("website", gridInfo->getWebSite());
226 FloaterGridManager::getInstance()->childSetText("support", gridInfo->getSupportUrl());
227 FloaterGridManager::getInstance()->childSetText("register", gridInfo->getRegisterUrl());
228 FloaterGridManager::getInstance()->childSetText("password", gridInfo->getPasswordUrl());
229
230 // FloaterGridManager::getInstance()->childSetText("first_name", gridInfo->getFirstName());
231 // FloaterGridManager::getInstance()->childSetText("last_name", gridInfo->getLastName());
232 // if(gridInfo->getAvatarPassword().length() == 32)
233 // FloaterGridManager::getInstance()->childSetText("avatar_password", std::string(PASSWORD_FILLER));
234 // else if(gridInfo->getPasswordUrl().empty())
235 // FloaterGridManager::getInstance()->childSetText("avatar_password", std::string(""));
236
237 if (gridInfo->getPlatform() == HippoGridInfo::PLATFORM_SECONDLIFE)
238 {
239 FloaterGridManager::getInstance()->childSetEnabled("search", false);
240 FloaterGridManager::getInstance()->childSetText("search", LLStringUtil::null);
241 //childSetEnabled("render_compat", false);
242 //childSetValue("render_compat", false);
243 }
244 else
245 {
246 FloaterGridManager::getInstance()->childSetEnabled("search", true);
247 FloaterGridManager::getInstance()->childSetText("search", gridInfo->getSearchUrl());
248 //childSetEnabled("render_compat", true);
249 //childSetValue("render_compat", gridInfo->isRenderCompat());
250 }
251
252 }
253 else 267 else
254 { 268 {
255 FloaterGridManager::getInstance()->childSetText("gridnick", LLStringUtil::null); 269 FloaterGridManager::getInstance()->childSetEnabled("search", true);
256 FloaterGridManager::getInstance()->childSetText("gridname", LLStringUtil::null); 270 FloaterGridManager::getInstance()->getChild<LLLineEditor>("search")->setText(gridInfo->getSearchURL());
257 FloaterGridManager::getInstance()->childSetText("loginuri", LLStringUtil::null); 271 }
258 FloaterGridManager::getInstance()->childSetText("loginpage", LLStringUtil::null); 272 }
259 FloaterGridManager::getInstance()->childSetText("helperuri", LLStringUtil::null);
260 FloaterGridManager::getInstance()->childSetText("website", LLStringUtil::null);
261 FloaterGridManager::getInstance()->childSetText("support", LLStringUtil::null);
262 FloaterGridManager::getInstance()->childSetText("register", LLStringUtil::null);
263 FloaterGridManager::getInstance()->childSetText("password", LLStringUtil::null);
264 // FloaterGridManager::getInstance()->childSetText("first_name", LLStringUtil::null);
265 // FloaterGridManager::getInstance()->childSetText("last_name", LLStringUtil::null);
266 // FloaterGridManager::getInstance()->childSetText("avatar_password", LLStringUtil::null);
267 FloaterGridManager::getInstance()->childSetText("search", LLStringUtil::null);
268 }
269 }
270 else if (FloaterGridManager::getInstance()->getState() == ADD_NEW)
271 {
272 llinfos << "mState == ADD_NEW" << llendl;
273 std::string required = "<required>";
274 FloaterGridManager::getInstance()->childSetText("gridnick", required);
275 FloaterGridManager::getInstance()->childSetText("gridname", LLStringUtil::null);
276 FloaterGridManager::getInstance()->childSetText("loginuri", required);
277 FloaterGridManager::getInstance()->childSetText("loginpage", LLStringUtil::null);
278 FloaterGridManager::getInstance()->childSetText("helperuri", LLStringUtil::null);
279 FloaterGridManager::getInstance()->childSetText("website", LLStringUtil::null);
280 FloaterGridManager::getInstance()->childSetText("support", LLStringUtil::null);
281 FloaterGridManager::getInstance()->childSetText("register", LLStringUtil::null);
282 FloaterGridManager::getInstance()->childSetText("password", LLStringUtil::null);
283 // FloaterGridManager::getInstance()->childSetText("first_name", LLStringUtil::null);
284 // FloaterGridManager::getInstance()->childSetText("last_name", LLStringUtil::null);
285 // FloaterGridManager::getInstance()->childSetText("avatar_password", LLStringUtil::null);
286 //childSetEnabled("search", true);
287 FloaterGridManager::getInstance()->childSetText("search", LLStringUtil::null);
288 }
289 else if (FloaterGridManager::getInstance()->getState() == ADD_COPY)
290 {
291 llinfos << "mState == ADD_COPY" << llendl;
292 FloaterGridManager::getInstance()->childSetText("gridnick", LLStringExplicit("<required>"));
293 }
294 else 273 else
295 { 274 {
296 llwarns << "Illegal state " << FloaterGridManager::getInstance()->getState() << llendl; 275 // should never happen, but if so default to creating a new entry
276 FloaterGridManager::getInstance()->setupNewGridEntry();
297 } 277 }
298 return; 278}
299}
300 279
301void FloaterGridManager::update() 280void FloaterGridManager::update()
302{ 281{
303 setState(NORMAL); 282 // no need to update the list until we need to
304 setCurGrid(gHippoGridManager->getCurrentGridNick()); 283 if (getGridState() >= GRID_STATE_NEW)
284 {
285 return;
286 }
305 refreshGrids(); 287 refreshGrids();
306 //KOW gHippoLimits->setLimits();
307} 288}
308 289
309void FloaterGridManager::applyChanges() 290void FloaterGridManager::applyChanges()
310{ 291{
311 HippoGridInfo* gridInfo = gHippoGridManager->getGrid(mCurGrid); 292 // When we apply changes, we update based on the state
312 if (gridInfo) 293 // of the UI. This is ugly and could really be improved
294
295 // Note: nick and loginuri are required
296 std::string grid_nick = childGetValue("gridnick").asString();
297 if (grid_nick.empty())
298 {
299 LLNotifications::instance().add("GridsNoNick");
300 return;
301 }
302
303 if (childGetValue("loginuri").asString().empty())
304 {
305 LLSD args;
306 args["[NAME]"] = grid_nick;
307 LLNotifications::instance().add("GridsNoLoginURI", args);
308 return ;
309 }
310
311 HippoGridInfo* grid = NULL;
312
313 // Note: we disable the scroll list during grid creation to prevent conflicts
314 if (getGridState() == GRID_STATE_NEW || getGridState() == GRID_STATE_COPY)
313 { 315 {
314 if (gridInfo->getGridNick() == childGetValue("gridnick").asString()) 316 if (gHippoGridManager->hasGridNick(grid_nick))
315 { 317 {
316 gridInfo->setGridName(childGetValue("gridname")); 318 LLSD args;
317 gridInfo->setLoginUri(childGetValue("loginuri")); 319 args["[NAME]"] = grid_nick;
318 gridInfo->setLoginPage(childGetValue("loginpage")); 320 LLNotifications::instance().add("GridExists", args);
319 gridInfo->setHelperUri(childGetValue("helperuri")); 321 return;
320 gridInfo->setWebSite(childGetValue("website")); 322 }
321 gridInfo->setSupportUrl(childGetValue("support")); 323 else
322 gridInfo->setRegisterUrl(childGetValue("register"));
323 gridInfo->setPasswordUrl(childGetValue("password"));
324 gridInfo->setSearchUrl(childGetValue("search"));
325 gridInfo->setRenderCompat(childGetValue("render_compat"));
326
327 // gridInfo->setFirstName(childGetValue("first_name"));
328 // gridInfo->setLastName(childGetValue("last_name"));
329 // if(childGetValue("avatar_password").asString().empty())
330 // gridInfo->setAvatarPassword(std::string(""));
331 // else if(childGetValue("avatar_password").asString() != std::string(PASSWORD_FILLER))
332 // {
333 // // store account authentication data
334 // std::string auth_password = childGetValue("avatar_password");
335 // std::string hashed_password;
336 // hashPassword(auth_password, hashed_password);
337 // gridInfo->setAvatarPassword(hashed_password);
338 // }
339
340 //this bug was a feature -Patrick Sapinski (Friday, August 21, 2009)
341 //LLPanelLogin::setFields(gridInfo->getFirstName(), gridInfo->getLastName(),
342 // gridInfo->getAvatarPassword(), true);
343 }
344 else
345 { 324 {
346 llwarns << "Grid nickname mismatch, ignoring changes." << llendl; 325 grid = new HippoGridInfo(grid_nick);
326 }
327 }
328 else // updating grid
329 {
330 if (!gHippoGridManager->hasGridNick(grid_nick))
331 {
332 llwarns << "Can't update info for a grid we don't know, ignoring changes." << llendl;
333 return;
334 }
335 else
336 {
337 grid = gHippoGridManager->getGrid(grid_nick);
347 } 338 }
348 } 339 }
349}
350 340
341 grid->setGridName(childGetValue("gridname"));
342 grid->setLoginURI(childGetValue("loginuri"));
343 grid->setLoginPage(childGetValue("loginpage"));
344 grid->setHelperURI(childGetValue("helperuri"));
345 grid->setWebSite(childGetValue("website"));
346 grid->setSupportURL(childGetValue("support"));
347 grid->setRegisterURL(childGetValue("register"));
348 grid->setPasswordURL(childGetValue("password"));
349 grid->setSearchURL(childGetValue("search"));
350 grid->setFirstName(childGetValue("first_name"));
351 grid->setLastName(childGetValue("last_name"));
352 grid->setUsername(childGetValue("username"));
353
354 // don't allow users to set their password as PASSWORD_FILLER
355 // would be nice to get grid-specific rules on password formatting, too
356 // passwords are remembered by default
357 std::string password_new = childGetValue("avatar_password").asString();
358 std::string password_old = grid->getAvatarPassword(); // initialized to ""
359 if (!password_new.empty() && password_new != PASSWORD_FILLER && password_new != password_old)
360 {
361 // store account authentication data
362 std::string hashed_password;
363 hashPassword(password_new, hashed_password);
364 grid->setAvatarPassword(hashed_password);
365 }
351 366
352bool FloaterGridManager::createNewGrid() 367 FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector")->setEnabled(true);
353{ 368 FloaterGridManager::getInstance()->getChild<LLLineEditor>("gridnick")->setEnabled(false);
354 // check nickname 369
355 std::string gridnick = childGetValue("gridnick"); 370 if (getGridState() == GRID_STATE_NEW || getGridState() == GRID_STATE_COPY)
356 if (gridnick == "<required>")
357 { 371 {
358 gridnick = ""; 372 gHippoGridManager->addGrid(grid);
373 refreshGrids();
374 FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector")->selectByValue(LLSD(grid_nick));
359 } 375 }
360 376
361 if (gridnick.empty()) 377 // just in case
378 gHippoGridManager->setCurrentGrid(grid_nick);
379
380 // should this be settable?
381 if (grid->isUsernameCompat())
362 { 382 {
363 LLNotifications::instance().add("GridsNoNick"); 383 LLPanelLogin::setFields(grid->getUsername(), grid->getAvatarPassword());
364 return false;
365 } 384 }
366 385 else
367 if (gHippoGridManager->getGrid(gridnick))
368 { 386 {
369 LLSD args; 387 LLPanelLogin::setFields(grid->getFirstName(), grid->getLastName(), grid->getAvatarPassword());
370 args["[NAME]"] = gridnick;
371 LLNotifications::instance().add("GridExists", args);
372 return false;
373 } 388 }
374 389
375 // check login URI 390 if (FloaterGridDefault::instanceVisible())
376 std::string loginuri = childGetValue("loginuri");
377 if ((loginuri.empty()) || (loginuri == "<required>"))
378 { 391 {
379 LLSD args; 392 FloaterGridDefault::getInstance()->refreshGridList();
380 args["[NAME]"] = gridnick;
381 LLNotifications::instance().add("GridsNoLoginUri", args);
382 return false;
383 } 393 }
384 394
385 // create new grid 395 setGridState(GRID_STATE_NORMAL);
386 HippoGridInfo* grid = new HippoGridInfo(gridnick);
387 grid->setGridName(childGetValue("gridname"));
388 grid->setLoginUri(loginuri);
389 grid->setLoginPage(childGetValue("loginpage"));
390 grid->setHelperUri(childGetValue("helperuri"));
391 grid->setWebSite(childGetValue("website"));
392 grid->setSupportUrl(childGetValue("support"));
393 grid->setRegisterUrl(childGetValue("register"));
394 grid->setPasswordUrl(childGetValue("password"));
395 grid->setSearchUrl(childGetValue("search"));
396 grid->setRenderCompat(childGetValue("render_compat"));
397 gHippoGridManager->addGrid(grid);
398
399 // grid->setFirstName(childGetValue("first_name"));
400 // grid->setLastName(childGetValue("last_name"));
401 // if(childGetValue("avatar_password").asString().empty())
402 // grid->setAvatarPassword(std::string(""));
403 // else
404 // {
405 // std::string hashed_password;
406 // hashPassword(childGetValue("avatar_password"), hashed_password);
407 // grid->setAvatarPassword(hashed_password);
408 // }
409
410 setCurGrid(gridnick);
411 return true;
412} 396}
413 397
414void FloaterGridManager::retrieveGridInfo() 398void FloaterGridManager::clearGridInfo(bool clear_all)
415{ 399{
416 std::string loginuri = childGetValue("loginuri"); 400 if (clear_all)
417 if ((loginuri == "") || (loginuri == "<required>")) 401 {
418 { 402 getChild<LLLineEditor>("gridnick")->clear();
419 LLNotifications::instance().add("GridInfoNoLoginUri"); 403 getChild<LLLineEditor>("gridname")->clear();
420 return; 404 getChild<LLLineEditor>("loginuri")->clear();
405 getChild<LLLineEditor>("password")->clear();
406 getChild<LLLineEditor>("first_name")->clear();
407 getChild<LLLineEditor>("last_name")->clear();
408 getChild<LLLineEditor>("username")->clear();
409 getChild<LLLineEditor>("avatar_password")->clear();
421 } 410 }
422 411
423 HippoGridInfo* grid = 0; 412 getChild<LLLineEditor>("loginpage")->clear();
424 bool cleanupGrid = false; 413 getChild<LLLineEditor>("helperuri")->clear();
414 getChild<LLLineEditor>("website")->clear();
415 getChild<LLLineEditor>("support")->clear();
416 getChild<LLLineEditor>("register")->clear();
417 getChild<LLLineEditor>("search")->clear();
418
419 getChild<LLButton>("btn_gridinfo")->setEnabled(TRUE);
420}
425 421
426 if (mState == NORMAL) 422void FloaterGridManager::createNewGrid()
423{
424 // warn us if anything's dirty
425 if (getChild<LLLineEditor>("gridnick")->isDirty() ||
426 getChild<LLLineEditor>("gridname")->isDirty() ||
427 getChild<LLLineEditor>("loginuri")->isDirty() ||
428 getChild<LLLineEditor>("loginpage")->isDirty() ||
429 getChild<LLLineEditor>("helperuri")->isDirty() ||
430 getChild<LLLineEditor>("website")->isDirty() ||
431 getChild<LLLineEditor>("support")->isDirty() ||
432 getChild<LLLineEditor>("register")->isDirty() ||
433 getChild<LLLineEditor>("password")->isDirty() ||
434 getChild<LLLineEditor>("first_name")->isDirty() ||
435 getChild<LLLineEditor>("last_name")->isDirty() ||
436 getChild<LLLineEditor>("username")->isDirty() ||
437 getChild<LLLineEditor>("avatar_password")->isDirty() ||
438 getChild<LLLineEditor>("search")->isDirty())
439 {
440 LLNotifications::instance().add("GridInfoDirty", LLSD(), LLSD(), newGridCreationCallback);
441 }
442 else
427 { 443 {
428 grid = gHippoGridManager->getGrid(mCurGrid); 444 // This clears the form. Until an entry is entered, we keep the UI open and blank
429 } 445 // This is clearly undesirable if you want to cancel, but redoing this window is
430 else if ((mState == ADD_NEW) || (mState == ADD_COPY)) 446 // a WIP -- MC
447 setupNewGridEntry();
448 }
449}
450
451void FloaterGridManager::setupNewGridEntry()
452{
453 // disable scroll list until we can use it again
454 getChild<LLScrollListCtrl>("grid_selector")->setEnabled(false);
455
456 getChild<LLLineEditor>("gridnick")->setEnabled(true);
457 clearGridInfo(true);
458
459 setGridState(GRID_STATE_NEW);
460}
461
462bool FloaterGridManager::newGridCreationCallback(const LLSD& notification, const LLSD& response)
463{
464 S32 option = LLNotification::getSelectedOption(notification, response);
465 if (option == 0)
431 { 466 {
432 grid = new HippoGridInfo(""); 467 FloaterGridManager::getInstance()->setupNewGridEntry();
433 cleanupGrid = true; 468 }
434 } 469 return false;
435 else 470}
471
472void FloaterGridManager::setupCopyGridEntry()
473{
474 // disable scroll list until we can use it again
475 getChild<LLScrollListCtrl>("grid_selector")->setEnabled(false);
476
477 getChild<LLLineEditor>("gridnick")->setEnabled(true);
478 getChild<LLLineEditor>("gridnick")->clear();
479 getChild<LLLineEditor>("gridname")->clear();
480 getChild<LLLineEditor>("loginuri")->clear();
481
482 setGridState(GRID_STATE_COPY);
483}
484
485void FloaterGridManager::retrieveGridInfo()
486{
487 std::string loginuri = childGetValue("loginuri");
488 if (loginuri.empty())
436 { 489 {
437 llerrs << "Illegal state " << mState << '.' << llendl; 490 LLNotifications::instance().add("GridInfoNoLoginURI");
438 return; 491 return;
439 } 492 }
493
494 // this can be clicked even for grids we haven't saved yet
495 HippoGridInfo* grid = gHippoGridManager->getGrid(childGetValue("gridnick"));
496 bool del_temp_grid = false;
440 if (!grid) 497 if (!grid)
441 { 498 {
442 llerrs << "Internal error retrieving grid info." << llendl; 499 // easier than fixing the hippo grid manager
443 return; 500 HippoGridInfo* temp = new HippoGridInfo("");
501 if (temp)
502 {
503 del_temp_grid = true;
504 grid = temp;
505 }
444 } 506 }
445 507
446 grid->setLoginUri(loginuri); 508 grid->setLoginURI(loginuri);
447 if (grid->retrieveGridInfo()) 509 if (grid->retrieveGridInfo())
448 { 510 {
449 if (grid->getGridNick() != "") childSetText("gridnick", grid->getGridNick()); 511 // just in case
450 if (grid->getGridName() != "") childSetText("gridname", grid->getGridName()); 512 if (!(grid->getGridNick().empty()))
451 if (grid->getLoginUri() != "") childSetText("loginuri", grid->getLoginUri()); 513 getChild<LLLineEditor>("gridnick")->setText(grid->getGridNick());
452 if (grid->getLoginPage() != "") childSetText("loginpage", grid->getLoginPage()); 514 if (!(grid->getLoginURI().empty()))
453 if (grid->getHelperUri() != "") childSetText("helperuri", grid->getHelperUri()); 515 getChild<LLLineEditor>("loginuri")->setText(grid->getLoginURI());
454 if (grid->getWebSite() != "") childSetText("website", grid->getWebSite()); 516 getChild<LLLineEditor>("gridname")->setText(grid->getGridName());
455 if (grid->getSupportUrl() != "") childSetText("support", grid->getSupportUrl()); 517 getChild<LLLineEditor>("loginpage")->setText(grid->getLoginPage());
456 if (grid->getRegisterUrl() != "") childSetText("register", grid->getRegisterUrl()); 518 getChild<LLLineEditor>("helperuri")->setText(grid->getHelperURI());
457 if (grid->getPasswordUrl() != "") childSetText("password", grid->getPasswordUrl()); 519 getChild<LLLineEditor>("website")->setText(grid->getWebSite());
458 if (grid->getSearchUrl() != "") childSetText("search", grid->getSearchUrl()); 520 getChild<LLLineEditor>("support")->setText(grid->getSupportURL());
459 } 521 getChild<LLLineEditor>("register")->setText(grid->getRegisterURL());
460 else 522 getChild<LLLineEditor>("password")->setText(grid->getPasswordURL());
523 getChild<LLLineEditor>("search")->setText(grid->getSearchURL());
524 }
525 else
461 { 526 {
462 LLNotifications::instance().add("GridInfoError"); 527 LLNotifications::instance().add("GridInfoError");
463 } 528 }
464 529
465 if (cleanupGrid) delete grid; 530 if (del_temp_grid)
531 {
532 delete grid;
533 }
466} 534}
467 535
468void FloaterGridManager::apply() 536void FloaterGridManager::apply()
469{ 537{
470 if (mState == NORMAL) 538 // where all the magic happens!
471 { 539 applyChanges();
472 applyChanges(); 540
473 }
474 else if ((mState == ADD_NEW) || (mState == ADD_COPY))
475 {
476 if (!createNewGrid()) return;
477 }
478 else
479 {
480 llwarns << "Illegal state " << mState << '.' << llendl;
481 return;
482 }
483 //gHippoGridManager->setCurrentGrid(mCurGrid);
484 //gHippoGridManager->setDefaultGrid(mCurGrid);
485 gHippoGridManager->saveFile(); 541 gHippoGridManager->saveFile();
486 LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel()); 542 LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel());
487} 543}
488 544
489//void FloaterGridManager::setDefault() 545// static
490//{
491// if (mState == NORMAL)
492// {
493// applyChanges();
494// }
495// else if ((mState == ADD_NEW) || (mState == ADD_COPY))
496// {
497// if (!createNewGrid()) return;
498// }
499// else
500// {
501// llwarns << "Illegal state " << mState << '.' << llendl;
502// return;
503// }
504// gHippoGridManager->setCurrentGrid(mCurGrid);
505// gHippoGridManager->setDefaultGrid(mCurGrid);
506// gHippoGridManager->saveFile();
507// LLPanelLogin::addServer(LLViewerLogin::getInstance()->getGridLabel());
508//}
509
510void FloaterGridManager::onSelectGrid(LLUICtrl* ctrl, void* data) 546void FloaterGridManager::onSelectGrid(LLUICtrl* ctrl, void* data)
511{ 547{
512 FloaterGridManager* self = (FloaterGridManager*)data; 548 FloaterGridManager* self = (FloaterGridManager*)data;
513 if (self->getState() == NORMAL) 549 if (self)
514 {
515 self->applyChanges();
516 }
517 else if ((self->getState() == ADD_NEW) || (self->getState() == ADD_COPY))
518 {
519 if (self->createNewGrid())
520 {
521 self->setState(NORMAL);
522 }
523 else
524 {
525 //LLScrollListCtrl *grids = self->getChild<LLScrollListCtrl>("grid_selector");
526 //grids->setCurrentByIndex(grids->getItemCount() - 1);
527 return;
528 }
529 }
530 else
531 { 550 {
532 llwarns << "Illegal state " << self->getState() << llendl; 551 self->setCurGrid(ctrl->getValue().asString());
533 return; 552 self->refreshGrids();
534 } 553 }
535 self->setCurGrid(ctrl->getValue().asString());
536 self->refreshGrids();
537} 554}
538 555
539//static 556//static
@@ -541,7 +558,7 @@ void FloaterGridManager::onClickDelete(void* data)
541{ 558{
542 //llinfos << "onClickDelete" << llendl; 559 //llinfos << "onClickDelete" << llendl;
543 FloaterGridManager* self = (FloaterGridManager*)data; 560 FloaterGridManager* self = (FloaterGridManager*)data;
544 if (self->getState() == NORMAL) 561 if (self)
545 { 562 {
546 gHippoGridManager->deleteGrid(self->getCurGrid()); 563 gHippoGridManager->deleteGrid(self->getCurGrid());
547 } 564 }
@@ -553,71 +570,80 @@ void FloaterGridManager::onClickAdd(void* data)
553{ 570{
554 //llinfos << "onClickAdd" << llendl; 571 //llinfos << "onClickAdd" << llendl;
555 FloaterGridManager* self = (FloaterGridManager*)data; 572 FloaterGridManager* self = (FloaterGridManager*)data;
556 self->setState(ADD_NEW); 573 if (self)
557 self->refreshGrids(); 574 {
575 self->createNewGrid();
576 }
558} 577}
559 578
560 579
561//static 580//static
562void FloaterGridManager::onClickCopy(void* data) 581void FloaterGridManager::onClickCopy(void* data)
563{ 582{
564 //llinfos << "onClickCopy" << llendl;
565 FloaterGridManager* self = (FloaterGridManager*)data; 583 FloaterGridManager* self = (FloaterGridManager*)data;
566 self->setState(ADD_COPY); 584 if (self)
567 self->refreshGrids(); 585 {
586 self->setupCopyGridEntry();
587 }
568} 588}
569 589
570// static 590// static
571void FloaterGridManager::onClickOk(void* data) 591void FloaterGridManager::onClickOk(void* data)
572{ 592{
573 FloaterGridManager::getInstance()->apply(); 593 FloaterGridManager* self = (FloaterGridManager*)data;
574 FloaterGridManager::getInstance()->close(); 594 if (self)
595 {
596 self->apply();
597 self->close();
598 }
575} 599}
576 600
577//static 601//static
578void FloaterGridManager::onClickApply(void* data) 602void FloaterGridManager::onClickApply(void* data)
579{ 603{
580 FloaterGridManager::getInstance()->apply(); 604 FloaterGridManager* self = (FloaterGridManager*)data;
605 if (self)
606 {
607 self->apply();
608 }
581 refreshGrids(); 609 refreshGrids();
582} 610}
583 611
584// static 612// static
585void FloaterGridManager::onClickClear(void* data) 613void FloaterGridManager::onClickClear(void* data)
586{ 614{
587 FloaterGridManager::getInstance()->clearInfo(); 615 FloaterGridManager* self = (FloaterGridManager*)data;
616 if (self)
617 {
618 self->clearGridInfo(false);
619 }
588} 620}
589 621
590//static 622//static
591//void FloaterGridManager::onClickDefault(void* data)
592//{
593// FloaterGridManager::getInstance()->setDefault();
594// FloaterGridManager::getInstance()->refreshGrids();
595//}
596
597//static
598void FloaterGridManager::onClickGridInfo(void* data) 623void FloaterGridManager::onClickGridInfo(void* data)
599{ 624{
600 //HippoPanelGrids* self = (HippoPanelGrids*)data; 625 FloaterGridManager* self = (FloaterGridManager*)data;
601 FloaterGridManager::getInstance()->retrieveGridInfo(); 626 if (self)
627 {
628 self->retrieveGridInfo();
629 }
602} 630}
603 631
604//static 632//static
605void FloaterGridManager::onClickCancel(void* data) 633void FloaterGridManager::onClickCancel(void* data)
606{ 634{
607 FloaterGridManager::getInstance()->close(); 635 FloaterGridManager* self = (FloaterGridManager*)data;
636 if (self)
637 {
638 self->close();
639 }
608} 640}
609 641
610//void FloaterGridManager::setAlwaysRefresh(bool refresh) 642//void FloaterGridManager::refreshLocation(bool force_visible)
611//{
612// // wargames 2: dead code, LLPanelLogin compatibility
613// return;
614//}
615
616//void FloaterGridManager::refreshLocation( bool force_visible )
617//{ 643//{
618// llinfos << "refreshLocation called" << llendl; 644// llinfos << "refreshLocation called" << llendl;
619// 645//
620// if (!FloaterGridManager::getInstance()) 646// if (!FloaterGridManager::instanceVisible())
621// { 647// {
622// return; 648// return;
623// } 649// }
@@ -645,41 +671,10 @@ void FloaterGridManager::onClickCancel(void* data)
645 //FloaterGridManager::getInstance()->childSetVisible("server_combo", TRUE); 671 //FloaterGridManager::getInstance()->childSetVisible("server_combo", TRUE);
646//} 672//}
647 673
648//void FloaterGridManager::setFocus(BOOL b)
649//{
650// if(b != hasFocus())
651// {
652// if(b)
653// {
654// FloaterGridManager::giveFocus();
655// }
656// else
657// {
658// LLPanel::setFocus(b);
659// }
660// }
661//}
662//
663//void FloaterGridManager::giveFocus()
664//{
665// LLScrollListCtrl *combo = NULL;
666//
667// if (!FloaterGridManager::getInstance())
668// {
669// llinfos << "giveFocus has no FloaterGridManager instance. FloaterGridManager::getInstance()=" << FloaterGridManager::getInstance() << llendl;
670// return;
671// }
672//
673// // for our combo box approach, selecting the combo box is almost always
674// // the right thing to do on the floater receiving focus
675// combo = FloaterGridManager::getInstance()->getChild<LLScrollListCtrl>("grid_selector");
676// combo->setFocus(TRUE);
677//}
678
679BOOL FloaterGridManager::isGridComboDirty() 674BOOL FloaterGridManager::isGridComboDirty()
680{ 675{
681 BOOL user_picked = FALSE; 676 BOOL user_picked = FALSE;
682 if (!FloaterGridManager::getInstance()) 677 if (!FloaterGridManager::instanceVisible())
683 { 678 {
684 llwarns << "Attempted getServer with no login view shown" << llendl; 679 llwarns << "Attempted getServer with no login view shown" << llendl;
685 } 680 }
@@ -691,17 +686,17 @@ BOOL FloaterGridManager::isGridComboDirty()
691 return user_picked; 686 return user_picked;
692} 687}
693 688
694void FloaterGridManager::getLocation(std::string &location) 689//void FloaterGridManager::getLocation(std::string& location)
695{ 690//{
696 if (!FloaterGridManager::getInstance()) 691// if (!FloaterGridManager::instanceVisible())
697 { 692// {
698 llwarns << "Attempted getLocation with no login view shown" << llendl; 693// llwarns << "Attempted getLocation with no login view shown" << llendl;
699 return; 694// return;
700 } 695// }
701 696//
702 LLComboBox* combo = FloaterGridManager::getInstance()->getChild<LLComboBox>("start_location_combo"); 697// LLComboBox* combo = FloaterGridManager::getInstance()->getChild<LLComboBox>("start_location_combo");
703 location = combo->getValue().asString(); 698// location = combo->getValue().asString();
704} 699//}
705 700
706std::string& FloaterGridManager::getPassword() 701std::string& FloaterGridManager::getPassword()
707{ 702{
@@ -718,37 +713,6 @@ bool FloaterGridManager::isSamePassword(std::string &password)
718 return mMungedPassword == password; 713 return mMungedPassword == password;
719} 714}
720 715
721//void FloaterGridManager::addServer(const std::string& server, S32 domain_name)
722//{
723// if (!FloaterGridManager::getInstance())
724// {
725// llwarns << "Attempted addServer with no login view shown" << llendl;
726// return;
727// }
728//
729// /*LLComboBox* combo = FloaterGridManager::getInstance()->getChild<LLComboBox>("server_combo");
730// combo->add(server, LLSD(domain_name) );
731// combo->setCurrentByIndex(0);*/
732//}
733
734//void FloaterGridManager::cancel_old()
735//{
736// if (!FloaterGridManager::getInstance())
737// {
738// return;
739// }
740//
741// if (FloaterGridManager::getInstance()->sIsInitialLogin)
742// {
743// // send a callback that indicates we're quitting or closing
744// if (FloaterGridManager::getInstance()->mCallback)
745// FloaterGridManager::getInstance()->mCallback(LOGIN_OPTION_QUIT, FloaterGridManager::getInstance()->mCallbackData);
746// return;
747// }
748//
749// FloaterGridManager::getInstance()->close();
750//}
751
752void FloaterGridManager::hashPassword(const std::string& password, std::string& hashedPassword) 716void FloaterGridManager::hashPassword(const std::string& password, std::string& hashedPassword)
753{ 717{
754 // Max "actual" password length is 16 characters. 718 // Max "actual" password length is 16 characters.
diff --git a/linden/indra/newview/floatergridmanager.h b/linden/indra/newview/floatergridmanager.h
index 55517f5..b93a430 100644
--- a/linden/indra/newview/floatergridmanager.h
+++ b/linden/indra/newview/floatergridmanager.h
@@ -1,22 +1,39 @@
1/* 1/**
2 * floatergridmanager.h 2* @file floatergridmanager.h
3 * This is Meerkats grid manager. 3* @brief UI for managing grid information
4 * -Patrick Sapinski (Monday, August 17, 2009) 4*
5 * 5* $LicenseInfo:firstyear=2011&license=viewergpl$
6 * Modified by McCabe Maxsted for Imprudence 6*
7 */ 7* Copyright (c) 2011, McCabe Maxsted
8* based on Meerkat's grid manager by Patrick Sapinski
9*
10* Imprudence Viewer Source Code
11* The source code in this file ("Source Code") is provided to you
12* under the terms of the GNU General Public License, version 2.0
13* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
14* this distribution, or online at
15* http://secondlifegrid.net/programs/open_source/licensing/gplv2
16*
17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21*
22* By copying, modifying or distributing this software, you acknowledge
23* that you have read and understood your obligations described above,
24* and agree to abide by those obligations.
25*
26* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
27* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28* COMPLETENESS OR PERFORMANCE.
29* $/LicenseInfo$
30*/
8 31
9#ifndef PL_floaterlogin_H 32#ifndef PL_floaterlogin_H
10#define PL_floaterlogin_H 33#define PL_floaterlogin_H
11 34
12#define LOGIN_OPTION_CONNECT 0
13#define LOGIN_OPTION_QUIT 1
14
15#include "llfloater.h" 35#include "llfloater.h"
16 36
17class LoginController;
18class AuthenticationModel;
19
20class FloaterGridManager : public LLFloater, public LLFloaterSingleton<FloaterGridManager> 37class FloaterGridManager : public LLFloater, public LLFloaterSingleton<FloaterGridManager>
21{ 38{
22public: 39public:
@@ -27,11 +44,8 @@ public:
27 44
28 static void refreshGrids(); 45 static void refreshGrids();
29 void apply(); 46 void apply();
30 //void setDefault();
31 void cancel(); 47 void cancel();
32 48
33 void clearInfo();
34
35 virtual void draw(); 49 virtual void draw();
36 50
37 void refresh(); 51 void refresh();
@@ -40,44 +54,38 @@ public:
40 virtual std::string& getPassword(); 54 virtual std::string& getPassword();
41 virtual void setPassword(std::string &password); 55 virtual void setPassword(std::string &password);
42 virtual bool isSamePassword(std::string &password); 56 virtual bool isSamePassword(std::string &password);
43 static void getFields(std::string &loginname, std::string &password, 57
44 BOOL &remember); 58 // clears either the loginuri fetched info or all the info in the grid manager
45 static void setFields(const std::string &loginname, const std::string &password, 59 void clearGridInfo(bool clear_all);
46 BOOL remember);
47 60
48 // LLLoginPanel compatibility 61 //static void getLocation(std::string &location);
49 /*static void setAlwaysRefresh(bool refresh); 62 //void refreshLocation(bool force_visible)
50 static void refreshLocation(bool force_visible);
51 virtual void setFocus(BOOL b);
52 static void giveFocus();*/
53 static void getLocation(std::string &location);
54 static BOOL isGridComboDirty(); 63 static BOOL isGridComboDirty();
55 //static void addServer(const std::string& server, S32 domain_name); 64 //static void addServer(const std::string& server, S32 domain_name);
56 static void hashPassword(const std::string& password, std::string& hashedPassword); 65 static void hashPassword(const std::string& password, std::string& hashedPassword);
57protected: 66
58 static bool sIsInitialLogin;
59 static std::string sGrid;
60private: 67private:
61 enum State 68
69 enum EGridState
62 { 70 {
63 NORMAL, 71 GRID_STATE_NORMAL,
64 ADD_NEW, 72 GRID_STATE_NEW,
65 ADD_COPY 73 GRID_STATE_COPY
66 }; 74 };
67 75
68 State mState; 76 void setGridState(EGridState state) { mState = state; }
69 void setState(const State& state) { mState = state; } 77 EGridState getGridState() { return mState; }
70 State getState() { return mState; } 78 std::string mMungedPassword;
71 79 EGridState mState;
72 std::string mCurGrid; 80 std::string mCurGrid;
73 void setCurGrid(const std::string& grid) { mCurGrid = grid; }
74 std::string getCurGrid() { return mCurGrid; }
75 81
76 std::string mIncomingPassword; 82 void setCurGrid(std::string grid) { mCurGrid = grid; }
77 std::string mMungedPassword; 83 std::string getCurGrid() { return mCurGrid; }
78 84
79 void applyChanges(); 85 void applyChanges();
80 bool createNewGrid(); 86 void createNewGrid();
87 void setupNewGridEntry();
88 void setupCopyGridEntry();
81 void update(); 89 void update();
82 void retrieveGridInfo(); 90 void retrieveGridInfo();
83 91
@@ -87,13 +95,11 @@ private:
87 static void onClickCopy(void* data); 95 static void onClickCopy(void* data);
88 static void onClickOk(void* data); 96 static void onClickOk(void* data);
89 static void onClickApply(void* data); 97 static void onClickApply(void* data);
90 static void onClickDefault(void* data);
91 static void onClickGridInfo(void* data); 98 static void onClickGridInfo(void* data);
92 static void onClickCancel(void* data); 99 static void onClickCancel(void* data);
93 static void onClickClear(void* data); 100 static void onClickClear(void* data);
94 101
95 static LoginController* sController; 102 static bool newGridCreationCallback(const LLSD& notification, const LLSD& response);
96 static AuthenticationModel* sModel;
97}; 103};
98 104
99#endif // PL_floaterlogin_H 105#endif // PL_floaterlogin_H
diff --git a/linden/indra/newview/hippogridmanager.cpp b/linden/indra/newview/hippogridmanager.cpp
index 6bf6e63..8277361 100644
--- a/linden/indra/newview/hippogridmanager.cpp
+++ b/linden/indra/newview/hippogridmanager.cpp
@@ -1,4 +1,33 @@
1// Ported to Imprudence from the Hippo OpenSim Viewer by Jacek Antonelli 1/**
2* @file hippogridmanager.cpp
3* @brief stores grid information
4*
5* $LicenseInfo:firstyear=2011&license=viewergpl$
6*
7* Copyright (c) 2011
8* Ported to Imprudence from the Hippo OpenSim Viewer by Jacek Antonelli
9*
10* Imprudence Viewer Source Code
11* The source code in this file ("Source Code") is provided to you
12* under the terms of the GNU General Public License, version 2.0
13* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
14* this distribution, or online at
15* http://secondlifegrid.net/programs/open_source/licensing/gplv2
16*
17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21*
22* By copying, modifying or distributing this software, you acknowledge
23* that you have read and understood your obligations described above,
24* and agree to abide by those obligations.
25*
26* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
27* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28* COMPLETENESS OR PERFORMANCE.
29* $/LicenseInfo$
30*/
2 31
3#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
4 33
@@ -43,14 +72,14 @@ HippoGridInfo::HippoGridInfo(const std::string& gridNick) :
43 mPlatform(PLATFORM_OPENSIM), 72 mPlatform(PLATFORM_OPENSIM),
44 mGridNick(gridNick), 73 mGridNick(gridNick),
45 mGridName(LLStringUtil::null), 74 mGridName(LLStringUtil::null),
46 mLoginUri(LLStringUtil::null), 75 mLoginURI(LLStringUtil::null),
47 mLoginPage(LLStringUtil::null), 76 mLoginPage(LLStringUtil::null),
48 mHelperUri(LLStringUtil::null), 77 mHelperURI(LLStringUtil::null),
49 mWebSite(LLStringUtil::null), 78 mWebSite(LLStringUtil::null),
50 mSupportUrl(LLStringUtil::null), 79 mSupportURL(LLStringUtil::null),
51 mRegisterUrl(LLStringUtil::null), 80 mRegisterURL(LLStringUtil::null),
52 mPasswordUrl(LLStringUtil::null), 81 mPasswordURL(LLStringUtil::null),
53 mSearchUrl(LLStringUtil::null), 82 mSearchURL(LLStringUtil::null),
54 mFirstName(LLStringUtil::null), 83 mFirstName(LLStringUtil::null),
55 mLastName(LLStringUtil::null), 84 mLastName(LLStringUtil::null),
56 mAvatarPassword(LLStringUtil::null), 85 mAvatarPassword(LLStringUtil::null),
@@ -60,133 +89,24 @@ HippoGridInfo::HippoGridInfo(const std::string& gridNick) :
60 mMaxAgentGroups(-1), 89 mMaxAgentGroups(-1),
61 mCurrencySymbol("OS$"), 90 mCurrencySymbol("OS$"),
62 mRealCurrencySymbol("US$"), 91 mRealCurrencySymbol("US$"),
63 mDirectoryFee(30) 92 mDirectoryFee(30),
93 mUsername(LLStringUtil::null),
94 mUsernameCompat(false)
64{ 95{
65 std::string nick = gridNick; 96 std::string nick = gridNick;
66 mGridNick = sanitizeGridNick( nick ); 97 mGridNick = sanitizeGridNick(nick);
67} 98}
68 99
69
70// ********************************************************************
71// Getters
72
73HippoGridInfo::Platform HippoGridInfo::getPlatform()
74{
75 return mPlatform;
76}
77
78bool HippoGridInfo::isOpenSimulator() const
79{
80 return (mPlatform == HippoGridInfo::PLATFORM_OPENSIM);
81}
82
83bool HippoGridInfo::isSecondLife() const
84{
85 return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE);
86}
87
88const std::string& HippoGridInfo::getGridNick() const
89{
90 return mGridNick;
91}
92
93const std::string& HippoGridInfo::getGridName() const
94{
95 return mGridName;
96}
97
98const std::string& HippoGridInfo::getLoginUri() const
99{
100 return mLoginUri;
101}
102
103const std::string& HippoGridInfo::getLoginPage() const
104{
105 return mLoginPage;
106}
107
108const std::string& HippoGridInfo::getHelperUri() const
109{
110 return mHelperUri;
111}
112
113const std::string& HippoGridInfo::getWebSite() const
114{
115 return mWebSite;
116}
117
118const std::string& HippoGridInfo::getSupportUrl() const
119{
120 return mSupportUrl;
121}
122
123const std::string& HippoGridInfo::getRegisterUrl() const
124{
125 return mRegisterUrl;
126}
127
128const std::string& HippoGridInfo::getPasswordUrl() const
129{
130 return mPasswordUrl;
131}
132
133const std::string& HippoGridInfo::getSearchUrl() const
134{
135 return mSearchUrl;
136}
137
138const std::string& HippoGridInfo::getFirstName() const
139{
140 return mFirstName;
141}
142
143const std::string& HippoGridInfo::getLastName() const
144{
145 return mLastName;
146}
147
148const std::string& HippoGridInfo::getAvatarPassword() const
149{
150 return mAvatarPassword;
151}
152
153bool HippoGridInfo::isRenderCompat() const
154{
155 return mRenderCompat;
156}
157
158const std::string& HippoGridInfo::getCurrencySymbol() const
159{
160 return mCurrencySymbol;
161}
162
163const std::string& HippoGridInfo::getRealCurrencySymbol() const
164{
165 return mRealCurrencySymbol;
166}
167
168bool HippoGridInfo::isUsernameCompat() const
169{
170 // currently only SecondLife grids support username-style logins
171 // but Aurora is working on implementing it -- MC
172 return (mPlatform == HippoGridInfo::PLATFORM_SECONDLIFE);
173}
174
175
176
177// ********************************************************************
178// Setters
179
180void HippoGridInfo::setPlatform(Platform platform) 100void HippoGridInfo::setPlatform(Platform platform)
181{ 101{
182 mPlatform = platform; 102 mPlatform = platform;
183 if (mPlatform == PLATFORM_SECONDLIFE) 103 if (mPlatform == PLATFORM_SECONDLIFE)
184 { 104 {
185 mCurrencySymbol = "L$"; 105 mCurrencySymbol = "L$";
106 mUsernameCompat = true;
186 } 107 }
187} 108}
188 109
189
190void HippoGridInfo::setPlatform(const std::string& platform) 110void HippoGridInfo::setPlatform(const std::string& platform)
191{ 111{
192 std::string tmp = platform; 112 std::string tmp = platform;
@@ -208,96 +128,25 @@ void HippoGridInfo::setPlatform(const std::string& platform)
208 } 128 }
209} 129}
210 130
211void HippoGridInfo::setGridName(const std::string& gridName) 131void HippoGridInfo::setLoginURI(const std::string& loginURI)
212{ 132{
213 mGridName = gridName; 133 std::string uri = loginURI;
134 mLoginURI = sanitizeURI(uri);
214} 135}
215 136
216void HippoGridInfo::setLoginUri(const std::string& loginUri) 137void HippoGridInfo::setHelperURI(const std::string& helperURI)
217{ 138{
218 std::string uri = loginUri; 139 std::string uri = helperURI;
219 mLoginUri = sanitizeUri(uri); 140 mHelperURI = sanitizeURI(uri);
220} 141}
221 142
222void HippoGridInfo::setLoginPage(const std::string& loginPage)
223{
224 mLoginPage = loginPage;
225}
226
227void HippoGridInfo::setHelperUri(const std::string& helperUri)
228{
229 std::string uri = helperUri;
230 mHelperUri = sanitizeUri(uri);
231}
232
233void HippoGridInfo::setWebSite(const std::string& website)
234{
235 mWebSite = website;
236}
237
238void HippoGridInfo::setSupportUrl(const std::string& url)
239{
240 mSupportUrl = url;
241}
242
243void HippoGridInfo::setRegisterUrl(const std::string& url)
244{
245 mRegisterUrl = url;
246}
247
248void HippoGridInfo::setPasswordUrl(const std::string& url)
249{
250 mPasswordUrl = url;
251}
252
253void HippoGridInfo::setSearchUrl(const std::string& url)
254{
255 mSearchUrl = url;
256}
257
258void HippoGridInfo::setFirstName(const std::string& firstName)
259{
260 mFirstName = firstName;
261}
262
263void HippoGridInfo::setLastName(const std::string& lastName)
264{
265 mLastName = lastName;
266}
267
268void HippoGridInfo::setAvatarPassword(const std::string& avatarPassword)
269{
270 mAvatarPassword = avatarPassword;
271}
272
273void HippoGridInfo::setRenderCompat(bool compat)
274{
275 mRenderCompat = compat;
276}
277
278void HippoGridInfo::setCurrencySymbol(const std::string& sym)
279{
280 mCurrencySymbol = sym.substr(0, 3);
281}
282
283void HippoGridInfo::setRealCurrencySymbol(const std::string& sym)
284{
285 mRealCurrencySymbol = sym.substr(0, 3);
286}
287
288void HippoGridInfo::setDirectoryFee(int fee)
289{
290 mDirectoryFee = fee;
291}
292
293
294 143
295// ******************************************************************** 144// ********************************************************************
296// Grid Info 145// Grid Info
297 146
298std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const 147std::string HippoGridInfo::getSearchURL(SearchType ty, bool is_web) const
299{ 148{
300 // Don't worry about whether or not mSearchUrl is empty here anymore -- MC 149 // Don't worry about whether or not mSearchURL is empty here anymore -- MC
301 if (is_web) 150 if (is_web)
302 { 151 {
303 if (mPlatform == PLATFORM_SECONDLIFE) 152 if (mPlatform == PLATFORM_SECONDLIFE)
@@ -321,16 +170,16 @@ std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const
321 return ""; 170 return "";
322 } 171 }
323 } 172 }
324 else if (!mSearchUrl.empty()) 173 else if (!mSearchURL.empty())
325 { 174 {
326 // Search url sent to us in the login response 175 // Search url sent to us in the login response
327 if (ty == SEARCH_ALL_EMPTY) 176 if (ty == SEARCH_ALL_EMPTY)
328 { 177 {
329 return (mSearchUrl); 178 return (mSearchURL);
330 } 179 }
331 else if (ty == SEARCH_ALL_QUERY) 180 else if (ty == SEARCH_ALL_QUERY)
332 { 181 {
333 return (mSearchUrl + "q=[QUERY]&s=[COLLECTION]&"); 182 return (mSearchURL + "q=[QUERY]&s=[COLLECTION]&");
334 } 183 }
335 else if (ty == SEARCH_ALL_TEMPLATE) 184 else if (ty == SEARCH_ALL_TEMPLATE)
336 { 185 {
@@ -369,11 +218,11 @@ std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const
369 // Use the old search all 218 // Use the old search all
370 if (ty == SEARCH_ALL_EMPTY) 219 if (ty == SEARCH_ALL_EMPTY)
371 { 220 {
372 return (mSearchUrl + "panel=All&"); 221 return (mSearchURL + "panel=All&");
373 } 222 }
374 else if (ty == SEARCH_ALL_QUERY) 223 else if (ty == SEARCH_ALL_QUERY)
375 { 224 {
376 return (mSearchUrl + "q=[QUERY]&s=[COLLECTION]&"); 225 return (mSearchURL + "q=[QUERY]&s=[COLLECTION]&");
377 } 226 }
378 else if (ty == SEARCH_ALL_TEMPLATE) 227 else if (ty == SEARCH_ALL_TEMPLATE)
379 { 228 {
@@ -424,7 +273,7 @@ void HippoGridInfo::onXmlElementEnd(void* userData, const XML_Char* name)
424} 273}
425 274
426//static 275//static
427void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int len) 276void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, S32 len)
428{ 277{
429 HippoGridInfo* self = (HippoGridInfo*)userData; 278 HippoGridInfo* self = (HippoGridInfo*)userData;
430 switch (self->mXmlState) 279 switch (self->mXmlState)
@@ -446,30 +295,30 @@ void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int le
446 case XML_LOGINURI: 295 case XML_LOGINURI:
447 { 296 {
448 std::string loginuri(s, len); 297 std::string loginuri(s, len);
449 self->mLoginUri = sanitizeUri( loginuri ); 298 self->mLoginURI = sanitizeURI( loginuri );
450 break; 299 break;
451 } 300 }
452 301
453 case XML_HELPERURI: 302 case XML_HELPERURI:
454 { 303 {
455 std::string helperuri(s, len); 304 std::string helperuri(s, len);
456 self->mHelperUri = sanitizeUri( helperuri ); 305 self->mHelperURI = sanitizeURI( helperuri );
457 break; 306 break;
458 } 307 }
459 308
460 case XML_SEARCH: 309 case XML_SEARCH:
461 { 310 {
462 self->mSearchUrl.assign(s, len); 311 self->mSearchURL.assign(s, len);
463 //sanitizeQueryUrl(mSearchUrl); 312 //sanitizeQueryURL(mSearchURL);
464 break; 313 break;
465 } 314 }
466 315
467 case XML_GRIDNAME: self->mGridName.assign(s, len); break; 316 case XML_GRIDNAME: self->mGridName.assign(s, len); break;
468 case XML_LOGINPAGE: self->mLoginPage.assign(s, len); break; 317 case XML_LOGINPAGE: self->mLoginPage.assign(s, len); break;
469 case XML_WEBSITE: self->mWebSite.assign(s, len); break; 318 case XML_WEBSITE: self->mWebSite.assign(s, len); break;
470 case XML_SUPPORT: self->mSupportUrl.assign(s, len); break; 319 case XML_SUPPORT: self->mSupportURL.assign(s, len); break;
471 case XML_REGISTER: self->mRegisterUrl.assign(s, len); break; 320 case XML_REGISTER: self->mRegisterURL.assign(s, len); break;
472 case XML_PASSWORD: self->mPasswordUrl.assign(s, len); break; 321 case XML_PASSWORD: self->mPasswordURL.assign(s, len); break;
473 322
474 case XML_VOID: break; 323 case XML_VOID: break;
475 } 324 }
@@ -478,16 +327,16 @@ void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int le
478 327
479bool HippoGridInfo::retrieveGridInfo() 328bool HippoGridInfo::retrieveGridInfo()
480{ 329{
481 if (mLoginUri == "") return false; 330 if (mLoginURI == "") return false;
482 331
483 // If last character in uri is not "/" 332 // If last character in uri is not "/"
484 std::string uri = mLoginUri; 333 std::string uri = mLoginURI;
485 if (uri.compare(uri.length()-1, 1, "/") != 0) 334 if (uri.compare(uri.length()-1, 1, "/") != 0)
486 { 335 {
487 uri += '/'; 336 uri += '/';
488 } 337 }
489 std::string reply; 338 std::string reply;
490 int result = HippoRestRequest::getBlocking(uri + "get_grid_info", &reply); 339 S32 result = HippoRestRequest::getBlocking(uri + "get_grid_info", &reply);
491 if (result != 200) return false; 340 if (result != 200) return false;
492 341
493 llinfos << "Received: " << reply << llendl; 342 llinfos << "Received: " << reply << llendl;
@@ -508,6 +357,14 @@ bool HippoGridInfo::retrieveGridInfo()
508 return success; 357 return success;
509} 358}
510 359
360const std::string& HippoGridInfo::getGridName() const
361{
362 if (mGridName.empty())
363 {
364 return mGridNick;
365 }
366 return mGridName;
367}
511 368
512std::string HippoGridInfo::getUploadFee() const 369std::string HippoGridInfo::getUploadFee() const
513{ 370{
@@ -531,7 +388,7 @@ std::string HippoGridInfo::getDirectoryFee() const
531 return fee; 388 return fee;
532} 389}
533 390
534void HippoGridInfo::formatFee(std::string &fee, int cost, bool showFree) const 391void HippoGridInfo::formatFee(std::string &fee, S32 cost, bool showFree) const
535{ 392{
536 if (showFree && (cost == 0)) 393 if (showFree && (cost == 0))
537 { 394 {
@@ -556,7 +413,9 @@ const char* HippoGridInfo::getPlatformString(Platform platform)
556 }; 413 };
557 414
558 if ((platform < PLATFORM_OTHER) || (platform >= PLATFORM_LAST)) 415 if ((platform < PLATFORM_OTHER) || (platform >= PLATFORM_LAST))
416 {
559 platform = PLATFORM_OTHER; 417 platform = PLATFORM_OTHER;
418 }
560 return platformStrings[platform]; 419 return platformStrings[platform];
561} 420}
562 421
@@ -565,8 +424,8 @@ const char* HippoGridInfo::getPlatformString(Platform platform)
565std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick) 424std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick)
566{ 425{
567 std::string tmp; 426 std::string tmp;
568 int size = gridnick.size(); 427 S32 size = gridnick.size();
569 for (int i=0; i<size; i++) 428 for (S32 i=0; i<size; i++)
570 { 429 {
571 char c = gridnick[i]; 430 char c = gridnick[i];
572 if ((c == '_') || isalnum(c)) 431 if ((c == '_') || isalnum(c))
@@ -582,8 +441,10 @@ std::string HippoGridInfo::sanitizeGridNick(std::string &gridnick)
582} 441}
583 442
584// static 443// static
585std::string HippoGridInfo::sanitizeUri(std::string &uri) 444std::string HippoGridInfo::sanitizeURI(std::string &uri)
586{ 445{
446 // Why don't we do this anymore? -- MC
447
587 // if (uri.empty()) { 448 // if (uri.empty()) {
588 // return ""; 449 // return "";
589 // } 450 // }
@@ -603,8 +464,8 @@ void HippoGridInfo::initFallback()
603 FALLBACK_GRIDINFO.mGridNick = "localhost"; 464 FALLBACK_GRIDINFO.mGridNick = "localhost";
604 FALLBACK_GRIDINFO.setPlatform(PLATFORM_OPENSIM); 465 FALLBACK_GRIDINFO.setPlatform(PLATFORM_OPENSIM);
605 FALLBACK_GRIDINFO.setGridName("Local Host"); 466 FALLBACK_GRIDINFO.setGridName("Local Host");
606 FALLBACK_GRIDINFO.setLoginUri("http://127.0.0.1:9000/"); 467 FALLBACK_GRIDINFO.setLoginURI("http://127.0.0.1:9000/");
607 FALLBACK_GRIDINFO.setHelperUri("http://127.0.0.1:9000/"); 468 FALLBACK_GRIDINFO.setHelperURI("http://127.0.0.1:9000/");
608} 469}
609 470
610 471
@@ -683,7 +544,7 @@ HippoGridInfo* HippoGridManager::getGrid(const std::string& grid) const
683 544
684HippoGridInfo* HippoGridManager::getConnectedGrid() const 545HippoGridInfo* HippoGridManager::getConnectedGrid() const
685{ 546{
686 return (mConnectedGrid)? mConnectedGrid: getCurrentGrid(); 547 return (mConnectedGrid) ? mConnectedGrid : getCurrentGrid();
687} 548}
688 549
689 550
@@ -700,11 +561,6 @@ HippoGridInfo* HippoGridManager::getCurrentGrid() const
700 } 561 }
701} 562}
702 563
703const std::string& HippoGridManager::getDefaultGridNick() const
704{
705 return mDefaultGrid;
706}
707
708const std::string& HippoGridManager::getCurrentGridNick() const 564const std::string& HippoGridManager::getCurrentGridNick() const
709{ 565{
710 if (mCurrentGrid.empty()) 566 if (mCurrentGrid.empty())
@@ -714,12 +570,6 @@ const std::string& HippoGridManager::getCurrentGridNick() const
714 return mCurrentGrid; 570 return mCurrentGrid;
715} 571}
716 572
717void HippoGridManager::setCurrentGridAsConnected()
718{
719 mConnectedGrid = getCurrentGrid();
720}
721
722
723void HippoGridManager::addGrid(HippoGridInfo* grid) 573void HippoGridManager::addGrid(HippoGridInfo* grid)
724{ 574{
725 if (!grid) return; 575 if (!grid) return;
@@ -743,17 +593,25 @@ void HippoGridManager::addGrid(HippoGridInfo* grid)
743void HippoGridManager::deleteGrid(const std::string& grid) 593void HippoGridManager::deleteGrid(const std::string& grid)
744{ 594{
745 GridIterator it = mGridInfo.find(grid); 595 GridIterator it = mGridInfo.find(grid);
746 if (it == mGridInfo.end()) { 596 if (it == mGridInfo.end())
597 {
747 llwarns << "Trying to delete non-existing grid " << grid << '.' << llendl; 598 llwarns << "Trying to delete non-existing grid " << grid << '.' << llendl;
748 return; 599 return;
749 } 600 }
601
750 mGridInfo.erase(it); 602 mGridInfo.erase(it);
603
751 llinfos << "Number of grids now: " << mGridInfo.size() << llendl; 604 llinfos << "Number of grids now: " << mGridInfo.size() << llendl;
605
752 if (mGridInfo.empty()) llinfos << "Grid info map is empty." << llendl; 606 if (mGridInfo.empty()) llinfos << "Grid info map is empty." << llendl;
753 if (grid == mDefaultGrid) 607 if (grid == mDefaultGrid)
608 {
754 setDefaultGrid(LLStringUtil::null); // sets first grid, if map not empty 609 setDefaultGrid(LLStringUtil::null); // sets first grid, if map not empty
610 }
755 if (grid == mCurrentGrid) 611 if (grid == mCurrentGrid)
612 {
756 mCurrentGrid = mDefaultGrid; 613 mCurrentGrid = mDefaultGrid;
614 }
757} 615}
758 616
759 617
@@ -793,6 +651,18 @@ void HippoGridManager::setCurrentGrid(const std::string& grid)
793 } 651 }
794} 652}
795 653
654bool HippoGridManager::hasGridNick(const std::string& grid_nick)
655{
656 for (GridIterator it = beginGrid(); it != endGrid(); ++it)
657 {
658 if (grid_nick == it->second->getGridNick())
659 {
660 return true;
661 }
662 }
663 return false;
664}
665
796 666
797// ******************************************************************** 667// ********************************************************************
798// Persistent Store 668// Persistent Store
@@ -810,7 +680,7 @@ void HippoGridManager::loadFromFile()
810 std::string update_list = gSavedSettings.getString("GridUpdateList"); 680 std::string update_list = gSavedSettings.getString("GridUpdateList");
811 if (!update_list.empty()) 681 if (!update_list.empty())
812 { 682 {
813 parseUrl(update_list, !mGridInfo.empty()); 683 parseURL(update_list, !mGridInfo.empty());
814 } 684 }
815 else 685 else
816 { 686 {
@@ -825,7 +695,7 @@ void HippoGridManager::loadFromFile()
825} 695}
826 696
827 697
828void HippoGridManager::parseUrl(const std::string url, bool mergeIfNewer) 698void HippoGridManager::parseURL(const std::string url, bool mergeIfNewer)
829{ 699{
830 llinfos << "Loading grid info from '" << url << "'." << llendl; 700 llinfos << "Loading grid info from '" << url << "'." << llendl;
831 701
@@ -879,7 +749,7 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer)
879 LLSD gridMap = *it; 749 LLSD gridMap = *it;
880 if (gridMap.has("default_grids_version")) 750 if (gridMap.has("default_grids_version"))
881 { 751 {
882 int version = gridMap["default_grids_version"]; 752 S32 version = gridMap["default_grids_version"];
883 if (version <= mDefaultGridsVersion) return; 753 if (version <= mDefaultGridsVersion) return;
884 else break; 754 else break;
885 } 755 }
@@ -917,20 +787,22 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer)
917 // update existing grid info 787 // update existing grid info
918 grid = it->second; 788 grid = it->second;
919 } 789 }
920 grid->setLoginUri(gridMap["loginuri"]); 790 grid->setLoginURI(gridMap["loginuri"]);
921 if (gridMap.has("platform")) grid->setPlatform(gridMap["platform"]); 791 if (gridMap.has("platform")) grid->setPlatform(gridMap["platform"]);
922 if (gridMap.has("gridname")) grid->setGridName(gridMap["gridname"]); 792 if (gridMap.has("gridname")) grid->setGridName(gridMap["gridname"]);
923 if (gridMap.has("loginpage")) grid->setLoginPage(gridMap["loginpage"]); 793 if (gridMap.has("loginpage")) grid->setLoginPage(gridMap["loginpage"]);
924 if (gridMap.has("helperuri")) grid->setHelperUri(gridMap["helperuri"]); 794 if (gridMap.has("helperuri")) grid->setHelperURI(gridMap["helperuri"]);
925 if (gridMap.has("website")) grid->setWebSite(gridMap["website"]); 795 if (gridMap.has("website")) grid->setWebSite(gridMap["website"]);
926 if (gridMap.has("support")) grid->setSupportUrl(gridMap["support"]); 796 if (gridMap.has("support")) grid->setSupportURL(gridMap["support"]);
927 if (gridMap.has("register")) grid->setRegisterUrl(gridMap["register"]); 797 if (gridMap.has("register")) grid->setRegisterURL(gridMap["register"]);
928 if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]); 798 if (gridMap.has("password")) grid->setPasswordURL(gridMap["password"]);
929 if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]); 799 if (gridMap.has("search")) grid->setSearchURL(gridMap["search"]);
930 if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]); 800 if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]);
931 // if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]); 801 if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]);
932 // if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]); 802 if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]);
933 // if (gridMap.has("avatarpassword")) grid->setAvatarPassword(gridMap["avatarpassword"]); 803 if (gridMap.has("avatarpassword")) grid->setAvatarPassword(gridMap["avatarpassword"]);
804 if (gridMap.has("username")) grid->setUsername(gridMap["username"]);
805 if (gridMap.has("username_compat")) grid->setUsernameCompat(gridMap["username_compat"]);
934 if (newGrid) addGrid(grid); 806 if (newGrid) addGrid(grid);
935 } 807 }
936 } 808 }
@@ -955,19 +827,22 @@ void HippoGridManager::saveFile()
955 gridInfo[i]["gridnick"] = grid->getGridNick(); 827 gridInfo[i]["gridnick"] = grid->getGridNick();
956 gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform()); 828 gridInfo[i]["platform"] = HippoGridInfo::getPlatformString(grid->getPlatform());
957 gridInfo[i]["gridname"] = grid->getGridName(); 829 gridInfo[i]["gridname"] = grid->getGridName();
958 gridInfo[i]["loginuri"] = grid->getLoginUri(); 830 gridInfo[i]["loginuri"] = grid->getLoginURI();
959 gridInfo[i]["loginpage"] = grid->getLoginPage(); 831 gridInfo[i]["loginpage"] = grid->getLoginPage();
960 gridInfo[i]["helperuri"] = grid->getHelperUri(); 832 gridInfo[i]["helperuri"] = grid->getHelperURI();
961 gridInfo[i]["website"] = grid->getWebSite(); 833 gridInfo[i]["website"] = grid->getWebSite();
962 gridInfo[i]["support"] = grid->getSupportUrl(); 834 gridInfo[i]["support"] = grid->getSupportURL();
963 gridInfo[i]["register"] = grid->getRegisterUrl(); 835 gridInfo[i]["register"] = grid->getRegisterURL();
964 gridInfo[i]["password"] = grid->getPasswordUrl(); 836 gridInfo[i]["password"] = grid->getPasswordURL();
965 // gridInfo[i]["firstname"] = grid->getFirstName(); 837 gridInfo[i]["firstname"] = grid->getFirstName();
966 // gridInfo[i]["lastname"] = grid->getLastName(); 838 gridInfo[i]["lastname"] = grid->getLastName();
967 // gridInfo[i]["avatarpassword"] = grid->getAvatarPassword(); 839 gridInfo[i]["avatarpassword"] = grid->getAvatarPassword();
968 840
969 gridInfo[i]["search"] = grid->getSearchUrl(); 841 gridInfo[i]["search"] = grid->getSearchURL();
970 gridInfo[i]["render_compat"] = grid->isRenderCompat(); 842 gridInfo[i]["render_compat"] = grid->isRenderCompat();
843
844 gridInfo[i]["username"] = grid->getUsername();
845 gridInfo[i]["username_compat"] = grid->isUsernameCompat();
971 } 846 }
972 847
973 // write client grid info file 848 // write client grid info file
diff --git a/linden/indra/newview/hippogridmanager.h b/linden/indra/newview/hippogridmanager.h
index 1b6fbc5..f1b0a8e 100644
--- a/linden/indra/newview/hippogridmanager.h
+++ b/linden/indra/newview/hippogridmanager.h
@@ -1,3 +1,34 @@
1/**
2* @file hippogridmanager.h
3* @brief stores grid information
4*
5* $LicenseInfo:firstyear=2011&license=viewergpl$
6*
7* Copyright (c) 2011
8* Ported to Imprudence from the Hippo OpenSim Viewer by Jacek Antonelli
9*
10* Imprudence Viewer Source Code
11* The source code in this file ("Source Code") is provided to you
12* under the terms of the GNU General Public License, version 2.0
13* ("GPL"). Terms of the GPL can be found in doc/GPL-license.txt in
14* this distribution, or online at
15* http://secondlifegrid.net/programs/open_source/licensing/gplv2
16*
17* There are special exceptions to the terms and conditions of the GPL as
18* it is applied to this Source Code. View the full text of the exception
19* in the file doc/FLOSS-exception.txt in this software distribution, or
20* online at http://secondlifegrid.net/programs/open_source/licensing/flossexception
21*
22* By copying, modifying or distributing this software, you acknowledge
23* that you have read and understood your obligations described above,
24* and agree to abide by those obligations.
25*
26* ALL SOURCE CODE IS PROVIDED "AS IS." THE AUTHOR MAKES NO
27* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
28* COMPLETENESS OR PERFORMANCE.
29* $/LicenseInfo$
30*/
31
1#ifndef __HIPPO_GRID_MANAGER_H__ 32#ifndef __HIPPO_GRID_MANAGER_H__
2#define __HIPPO_GRID_MANAGER_H__ 33#define __HIPPO_GRID_MANAGER_H__
3 34
@@ -35,57 +66,61 @@ public:
35 66
36 explicit HippoGridInfo(const std::string& gridNick); 67 explicit HippoGridInfo(const std::string& gridNick);
37 68
38 Platform getPlatform(); 69 Platform getPlatform() { return mPlatform; }
39 bool isOpenSimulator() const; 70 bool isOpenSimulator() const { return (mPlatform == PLATFORM_OPENSIM); }
40 bool isSecondLife() const; 71 bool isSecondLife() const { return (mPlatform == PLATFORM_SECONDLIFE); }
41 const std::string& getGridNick() const; 72 bool isRenderCompat() const { return mRenderCompat; }
42 const std::string& getGridName() const; 73 // currently only SecondLife grids support username-style logins but Aurora is working on implementing it
43 const std::string& getLoginUri() const; 74 bool isUsernameCompat() const { return mUsernameCompat; }
44 const std::string& getLoginPage() const; 75
45 const std::string& getHelperUri() const; 76 const std::string& getGridNick() const { return mGridNick; }
46 const std::string& getWebSite() const; 77 // returns grid nick if no grid name is available
47 const std::string& getSupportUrl() const; 78 const std::string& getGridName() const;
48 const std::string& getRegisterUrl() const; 79 const std::string& getLoginURI() const { return mLoginURI; }
49 const std::string& getPasswordUrl() const; 80 const std::string& getLoginPage() const { return mLoginPage; }
81 const std::string& getHelperURI() const { return mHelperURI; }
82 const std::string& getWebSite() const { return mWebSite; }
83 const std::string& getSupportURL() const { return mSupportURL; }
84 const std::string& getRegisterURL() const { return mRegisterURL; }
85 const std::string& getPasswordURL() const { return mPasswordURL; }
50 // Returns the url base used for the Web Search tab 86 // Returns the url base used for the Web Search tab
51 const std::string& getSearchUrl() const; 87 const std::string& getSearchURL() const { return mSearchURL; }
52 const std::string& getFirstName() const; 88 const std::string& getFirstName() const { return mFirstName; }
53 const std::string& getLastName() const; 89 const std::string& getLastName() const { return mLastName; }
54 const std::string& getAvatarPassword() const; 90 const std::string& getUsername() const { return mUsername; }
55 const std::string& getVoiceConnector() const { return mVoiceConnector; } 91 const std::string& getAvatarPassword() const { return mAvatarPassword; }
56 std::string getSearchUrl(SearchType ty, bool is_web) const; 92 const std::string& getVoiceConnector() const { return mVoiceConnector; }
57 bool isRenderCompat() const; 93 S32 getMaxAgentGroups() const { return mMaxAgentGroups; }
58 bool isUsernameCompat() const; 94 const std::string& getCurrencySymbol() const { return mCurrencySymbol; }
59 int getMaxAgentGroups() const { return mMaxAgentGroups; } 95 const std::string& getRealCurrencySymbol() const { return mRealCurrencySymbol; }
60 96 std::string getUploadFee() const;
61 const std::string& getCurrencySymbol() const; 97 std::string getGroupCreationFee() const;
62 const std::string& getRealCurrencySymbol() const; 98 std::string getDirectoryFee() const;
63 std::string getUploadFee() const; 99 std::string getSearchURL(SearchType ty, bool is_web) const;
64 std::string getGroupCreationFee() const;
65 std::string getDirectoryFee() const;
66 100
67 void setPlatform (const std::string& platform); 101 void setPlatform (const std::string& platform);
68 void setPlatform (Platform platform); 102 void setPlatform (Platform platform);
69 void setGridName (const std::string& gridName); 103 void setGridName (const std::string& gridName) { mGridName = gridName; }
70 void setLoginUri (const std::string& loginUri); 104 void setLoginURI (const std::string& loginURI);
71 void setLoginPage(const std::string& loginPage); 105 void setLoginPage(const std::string& loginPage) { mLoginPage = loginPage; }
72 void setHelperUri(const std::string& helperUri); 106 void setHelperURI(const std::string& helperURI);
73 void setWebSite (const std::string& website); 107 void setWebSite (const std::string& website) { mWebSite = website; }
74 void setSupportUrl(const std::string& url); 108 void setSupportURL(const std::string& url) { mSupportURL = url; }
75 void setRegisterUrl(const std::string& url); 109 void setRegisterURL(const std::string& url) { mRegisterURL = url; }
76 void setPasswordUrl(const std::string& url); 110 void setPasswordURL(const std::string& url) { mPasswordURL = url; }
77 // sets the url base used for the Web Search tab 111 // sets the url base used for the Web Search tab
78 void setSearchUrl(const std::string& url); 112 void setSearchURL(const std::string& url) { mSearchURL = url; }
79 void setRenderCompat(bool compat); 113 void setRenderCompat(bool compat) { mRenderCompat = compat; }
80 void setMaxAgentGroups(int max) { mMaxAgentGroups = max; } 114 void setMaxAgentGroups(S32 max) { mMaxAgentGroups = max; }
81 void setFirstName(const std::string& firstName); 115 void setFirstName(const std::string& firstName) { mFirstName = firstName; }
82 void setLastName(const std::string& lastName); 116 void setLastName(const std::string& lastName) { mLastName = lastName; }
83 void setAvatarPassword(const std::string& avatarPassword); 117 void setAvatarPassword(const std::string& avatarPassword) { mAvatarPassword = avatarPassword; }
84 void setVoiceConnector(const std::string& vc) { mVoiceConnector = vc; } 118 void setVoiceConnector(const std::string& vc) { mVoiceConnector = vc; }
85 119 void setCurrencySymbol(const std::string& sym) { mCurrencySymbol = sym.substr(0, 3); }
86 void setCurrencySymbol(const std::string& sym); 120 void setRealCurrencySymbol(const std::string& sym) { mRealCurrencySymbol = sym.substr(0, 3); }
87 void setRealCurrencySymbol(const std::string& sym); 121 void setDirectoryFee(U32 fee) { mDirectoryFee = fee; }
88 void setDirectoryFee(int fee); 122 void setUsername(const std::string& username) { mUsername = username; }
123 void setUsernameCompat(bool compat) { mUsernameCompat = compat; }
89 124
90 bool retrieveGridInfo(); 125 bool retrieveGridInfo();
91 126
@@ -96,27 +131,30 @@ public:
96 static void initFallback(); 131 static void initFallback();
97 132
98private: 133private:
99 Platform mPlatform; 134 Platform mPlatform;
100 std::string mGridNick; 135 std::string mGridNick;
101 std::string mGridName; 136 std::string mGridName;
102 std::string mLoginUri; 137 std::string mLoginURI;
103 std::string mLoginPage; 138 std::string mLoginPage;
104 std::string mHelperUri; 139 std::string mHelperURI;
105 std::string mWebSite; 140 std::string mWebSite;
106 std::string mSupportUrl; 141 std::string mSupportURL;
107 std::string mRegisterUrl; 142 std::string mRegisterURL;
108 std::string mPasswordUrl; 143 std::string mPasswordURL;
109 std::string mSearchUrl; 144 std::string mSearchURL;
110 std::string mVoiceConnector; 145 std::string mVoiceConnector;
111 std::string mFirstName; 146 std::string mFirstName;
112 std::string mLastName; 147 std::string mLastName;
113 std::string mAvatarPassword; 148 std::string mAvatarPassword;
114 bool mRenderCompat; 149 bool mRenderCompat;
115 int mMaxAgentGroups; 150 S32 mMaxAgentGroups;
151
152 std::string mUsername;
153 bool mUsernameCompat;
116 154
117 std::string mCurrencySymbol; 155 std::string mCurrencySymbol;
118 std::string mRealCurrencySymbol; 156 std::string mRealCurrencySymbol;
119 int mDirectoryFee; 157 U32 mDirectoryFee;
120 158
121 // for parsing grid info XML 159 // for parsing grid info XML
122 enum XmlState 160 enum XmlState
@@ -127,12 +165,12 @@ private:
127 }; 165 };
128 XmlState mXmlState; 166 XmlState mXmlState;
129 167
130 static std::string sanitizeUri(std::string &uri); 168 static std::string sanitizeURI(std::string &uri);
131 void formatFee(std::string &fee, int cost, bool showFree) const; 169 void formatFee(std::string &fee, S32 cost, bool showFree) const;
132 170
133 static void onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts); 171 static void onXmlElementStart(void* userData, const XML_Char* name, const XML_Char** atts);
134 static void onXmlElementEnd(void* userData, const XML_Char* name); 172 static void onXmlElementEnd(void* userData, const XML_Char* name);
135 static void onXmlCharacterData(void* userData, const XML_Char* s, int len); 173 static void onXmlCharacterData(void* userData, const XML_Char* s, S32 len);
136}; 174};
137 175
138 176
@@ -149,31 +187,34 @@ public:
149 HippoGridInfo* getGrid(const std::string& grid) const; 187 HippoGridInfo* getGrid(const std::string& grid) const;
150 HippoGridInfo* getConnectedGrid() const; 188 HippoGridInfo* getConnectedGrid() const;
151 HippoGridInfo* getCurrentGrid() const; 189 HippoGridInfo* getCurrentGrid() const;
152 const std::string& getDefaultGridNick() const; 190 const std::string& getDefaultGridNick() const { return mDefaultGrid; }
153 const std::string& getCurrentGridNick() const; 191 const std::string& getCurrentGridNick() const;
154 192
155 void setDefaultGrid(const std::string& grid); 193 void setDefaultGrid(const std::string& grid);
156 void setCurrentGrid(const std::string& grid); 194 void setCurrentGrid(const std::string& grid);
157 void setCurrentGridAsConnected(); 195 void setCurrentGridAsConnected() { mConnectedGrid = getCurrentGrid(); }
158 196
159 void addGrid(HippoGridInfo* grid); 197 void addGrid(HippoGridInfo* grid);
160 void deleteGrid(const std::string& grid); 198 void deleteGrid(const std::string& grid);
161 199
162 typedef std::map<std::string, HippoGridInfo*>::iterator GridIterator; 200 typedef std::map<std::string, HippoGridInfo*>::iterator GridIterator;
163 GridIterator beginGrid() { return mGridInfo.begin(); } 201 GridIterator beginGrid() { return mGridInfo.begin(); }
164 GridIterator endGrid() { return mGridInfo.end(); } 202 GridIterator endGrid() { return mGridInfo.end(); }
203
204 // returns true if the grid manager knows of a nickname
205 bool hasGridNick(const std::string& grid_nick);
165 206
166private: 207private:
167 std::map<std::string, HippoGridInfo*> mGridInfo; 208 std::map<std::string, HippoGridInfo*> mGridInfo;
168 std::string mDefaultGrid; 209 std::string mDefaultGrid;
169 std::string mCurrentGrid; 210 std::string mCurrentGrid;
170 HippoGridInfo* mConnectedGrid; 211 HippoGridInfo* mConnectedGrid;
171 int mDefaultGridsVersion; 212 S32 mDefaultGridsVersion;
172 213
173 void cleanup(); 214 void cleanup();
174 void loadFromFile(); 215 void loadFromFile();
175 void parseFile(const std::string& fileName, bool mergeIfNewer); 216 void parseFile(const std::string& fileName, bool mergeIfNewer);
176 void parseUrl(const std::string url, bool mergeIfNewer); 217 void parseURL(const std::string url, bool mergeIfNewer);
177 void parseData(LLSD &gridInfo, bool mergeIfNewer); 218 void parseData(LLSD &gridInfo, bool mergeIfNewer);
178}; 219};
179 220
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index 0eaecb1..cbec717 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -3262,10 +3262,10 @@ void LLAppViewer::badNetworkHandler()
3262 LLAppViewer::handleViewerCrash(); 3262 LLAppViewer::handleViewerCrash();
3263 3263
3264 std::string grid_support_msg = ""; 3264 std::string grid_support_msg = "";
3265 if (!gHippoGridManager->getCurrentGrid()->getSupportUrl().empty()) 3265 if (!gHippoGridManager->getCurrentGrid()->getSupportURL().empty())
3266 { 3266 {
3267 grid_support_msg = "\n\nOr visit the gird support page at: \n " 3267 grid_support_msg = "\n\nOr visit the gird support page at: \n "
3268 + gHippoGridManager->getCurrentGrid()->getSupportUrl(); 3268 + gHippoGridManager->getCurrentGrid()->getSupportURL();
3269 } 3269 }
3270 std::ostringstream message; 3270 std::ostringstream message;
3271 message << 3271 message <<
diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp
index 719a7a0..9fdaf2e 100644
--- a/linden/indra/newview/llpaneldirfind.cpp
+++ b/linden/indra/newview/llpaneldirfind.cpp
@@ -270,7 +270,7 @@ void LLPanelDirFind::navigateToDefaultPage()
270{ 270{
271 std::string start_url = ""; 271 std::string start_url = "";
272 // Note: we use the web panel in OpenSim as well as Second Life -- MC 272 // Note: we use the web panel in OpenSim as well as Second Life -- MC
273 if (gHippoGridManager->getConnectedGrid()->getSearchUrl().empty() && 273 if (gHippoGridManager->getConnectedGrid()->getSearchURL().empty() &&
274 !gHippoGridManager->getConnectedGrid()->isSecondLife()) 274 !gHippoGridManager->getConnectedGrid()->isSecondLife())
275 { 275 {
276 // OS-based but doesn't have its own web search url -- MC 276 // OS-based but doesn't have its own web search url -- MC
@@ -293,7 +293,7 @@ void LLPanelDirFind::navigateToDefaultPage()
293 else 293 else
294 { 294 {
295 // OS-based but has its own web search url -- MC 295 // OS-based but has its own web search url -- MC
296 start_url = gHippoGridManager->getConnectedGrid()->getSearchUrl(); 296 start_url = gHippoGridManager->getConnectedGrid()->getSearchURL();
297 } 297 }
298 298
299 BOOL inc_pg = childGetValue("incpg").asBoolean(); 299 BOOL inc_pg = childGetValue("incpg").asBoolean();
@@ -323,7 +323,7 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const
323 std::string url; 323 std::string url;
324 if (search_text.empty()) 324 if (search_text.empty())
325 { 325 {
326 url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_EMPTY, is_web); 326 url = gHippoGridManager->getConnectedGrid()->getSearchURL(HippoGridInfo::SEARCH_ALL_EMPTY, is_web);
327 } 327 }
328 else 328 else
329 { 329 {
@@ -348,7 +348,7 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const
348 "-._~$+!*'()"; 348 "-._~$+!*'()";
349 std::string query = LLURI::escape(search_text_with_plus, allowed); 349 std::string query = LLURI::escape(search_text_with_plus, allowed);
350 350
351 url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_QUERY, is_web); 351 url = gHippoGridManager->getConnectedGrid()->getSearchURL(HippoGridInfo::SEARCH_ALL_QUERY, is_web);
352 std::string substring = "[QUERY]"; 352 std::string substring = "[QUERY]";
353 std::string::size_type where = url.find(substring); 353 std::string::size_type where = url.find(substring);
354 if (where != std::string::npos) 354 if (where != std::string::npos)
@@ -373,13 +373,13 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const
373// static 373// static
374std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult, bool is_web) 374std::string LLPanelDirFind::getSearchURLSuffix(bool inc_pg, bool inc_mature, bool inc_adult, bool is_web)
375{ 375{
376 std::string url = gHippoGridManager->getConnectedGrid()->getSearchUrl(HippoGridInfo::SEARCH_ALL_TEMPLATE, is_web); 376 std::string url = gHippoGridManager->getConnectedGrid()->getSearchURL(HippoGridInfo::SEARCH_ALL_TEMPLATE, is_web);
377 377
378 if (!url.empty()) 378 if (!url.empty())
379 { 379 {
380 // Note: opensim's default template (SearchURLSuffixOpenSim) is currently empty -- MC 380 // Note: opensim's default template (SearchURLSuffixOpenSim) is currently empty -- MC
381 if (gHippoGridManager->getConnectedGrid()->isSecondLife() || 381 if (gHippoGridManager->getConnectedGrid()->isSecondLife() ||
382 !gHippoGridManager->getConnectedGrid()->getSearchUrl().empty()) 382 !gHippoGridManager->getConnectedGrid()->getSearchURL().empty())
383 { 383 {
384 // if the mature checkbox is unchecked, modify query to remove 384 // if the mature checkbox is unchecked, modify query to remove
385 // terms with given phrase from the result set 385 // terms with given phrase from the result set
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index 3f748d4..1dff0cc 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -829,9 +829,9 @@ void LLPanelLogin::refreshLoginPage()
829 if (!sInstance) return; 829 if (!sInstance) return;
830 830
831 sInstance->childSetVisible("create_new_account_text", 831 sInstance->childSetVisible("create_new_account_text",
832 !gHippoGridManager->getCurrentGrid()->getRegisterUrl().empty()); 832 !gHippoGridManager->getCurrentGrid()->getRegisterURL().empty());
833 sInstance->childSetVisible("forgot_password_text", 833 sInstance->childSetVisible("forgot_password_text",
834 !gHippoGridManager->getCurrentGrid()->getPasswordUrl().empty()); 834 !gHippoGridManager->getCurrentGrid()->getPasswordURL().empty());
835 835
836 // kick off a request to grab the url manually 836 // kick off a request to grab the url manually
837 gResponsePtr = LLIamHereLogin::build(sInstance); 837 gResponsePtr = LLIamHereLogin::build(sInstance);
@@ -853,44 +853,43 @@ void LLPanelLogin::loadLoginForm()
853 if (!sInstance) return; 853 if (!sInstance) return;
854 854
855 // toggle between username/first+last login based on grid -- MC 855 // toggle between username/first+last login based on grid -- MC
856 LLTextBox* firstnamet = sInstance->getChild<LLTextBox>("first_name_text"); 856 LLTextBox* firstname_t = sInstance->getChild<LLTextBox>("first_name_text");
857 LLTextBox* lastnamet = sInstance->getChild<LLTextBox>("last_name_text"); 857 LLTextBox* lastname_t = sInstance->getChild<LLTextBox>("last_name_text");
858 LLTextBox* usernamet = sInstance->getChild<LLTextBox>("username_text"); 858 LLTextBox* username_t = sInstance->getChild<LLTextBox>("username_text");
859 859
860 LLLineEditor* firstnamel = sInstance->getChild<LLLineEditor>("first_name_edit"); 860 LLLineEditor* firstname_l = sInstance->getChild<LLLineEditor>("first_name_edit");
861 LLLineEditor* lastnamel = sInstance->getChild<LLLineEditor>("last_name_edit"); 861 LLLineEditor* lastname_l = sInstance->getChild<LLLineEditor>("last_name_edit");
862 LLLineEditor* usernamel = sInstance->getChild<LLLineEditor>("username_edit"); 862 LLLineEditor* username_l = sInstance->getChild<LLLineEditor>("username_edit");
863 863
864 firstnamet->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 864 firstname_t->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat());
865 lastnamet->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 865 lastname_t->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat());
866 usernamet->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 866 username_t->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat());
867 867
868 firstnamel->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 868 firstname_l->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat());
869 lastnamel->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 869 lastname_l->setVisible(!gHippoGridManager->getCurrentGrid()->isUsernameCompat());
870 usernamel->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat()); 870 username_l->setVisible(gHippoGridManager->getCurrentGrid()->isUsernameCompat());
871 871
872 // these should really REALLY be stored in the grid info -- MC 872 // get name info if we've got it
873 std::string firstnames = gSavedSettings.getString("FirstName"); 873 std::string firstname_s = gHippoGridManager->getCurrentGrid()->getFirstName();
874 std::string lastnames = gSavedSettings.getString("LastName"); 874 std::string lastname_s = gHippoGridManager->getCurrentGrid()->getLastName();
875 if (!firstnames.empty() && !lastnames.empty()) 875 if (gHippoGridManager->getCurrentGrid()->isUsernameCompat())
876 { 876 {
877 if (gHippoGridManager->getCurrentGrid()->isUsernameCompat()) 877 if (lastname_s == "resident" || lastname_s == "Resident")
878 { 878 {
879 if (lastnames == "resident" || lastnames == "Resident") 879 username_l->setText(firstname_s);
880 {
881 usernamel->setText(firstnames);
882 }
883 else
884 {
885 usernamel->setText(firstnames+"."+lastnames);
886 }
887 } 880 }
888 else 881 else
889 { 882 {
890 firstnamel->setText(firstnames); 883 username_l->setText(firstname_s+"."+lastname_s);
891 lastnamel->setText(lastnames);
892 } 884 }
893 } 885 }
886 else
887 {
888 firstname_l->setText(firstname_s);
889 lastname_l->setText(lastname_s);
890 }
891
892 setPassword(gHippoGridManager->getCurrentGrid()->getAvatarPassword());
894} 893}
895 894
896 895
@@ -1208,11 +1207,14 @@ bool LLPanelLogin::newAccountAlertCallback(const LLSD& notification, const LLSD&
1208// static 1207// static
1209void LLPanelLogin::onClickNewAccount(void*) 1208void LLPanelLogin::onClickNewAccount(void*)
1210{ 1209{
1211 const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); 1210 const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterURL();
1212 if (!url.empty()) { 1211 if (!url.empty())
1212 {
1213 llinfos << "Going to account creation URL." << llendl; 1213 llinfos << "Going to account creation URL." << llendl;
1214 LLWeb::loadURLExternal(url); 1214 LLWeb::loadURLExternal(url);
1215 } else { 1215 }
1216 else
1217 {
1216 llinfos << "Account creation URL is empty." << llendl; 1218 llinfos << "Account creation URL is empty." << llendl;
1217 sInstance->setFocus(TRUE); 1219 sInstance->setFocus(TRUE);
1218 } 1220 }
@@ -1246,10 +1248,13 @@ void LLPanelLogin::onClickForgotPassword(void*)
1246{ 1248{
1247 if (sInstance ) 1249 if (sInstance )
1248 { 1250 {
1249 const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordUrl(); 1251 const std::string &url = gHippoGridManager->getConnectedGrid()->getPasswordURL();
1250 if (!url.empty()) { 1252 if (!url.empty())
1253 {
1251 LLWeb::loadURLExternal(url); 1254 LLWeb::loadURLExternal(url);
1252 } else { 1255 }
1256 else
1257 {
1253 llwarns << "Link for 'forgotton password' not set." << llendl; 1258 llwarns << "Link for 'forgotton password' not set." << llendl;
1254 } 1259 }
1255 } 1260 }
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 88445c3..4028cad 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -802,7 +802,7 @@ bool idle_startup()
802 802
803 timeout_count = 0; 803 timeout_count = 0;
804 804
805 if(LLStartUp::shouldAutoLogin()) 805 if (LLStartUp::shouldAutoLogin())
806 { 806 {
807 show_connect_box = false; 807 show_connect_box = false;
808 } 808 }
@@ -823,23 +823,33 @@ bool idle_startup()
823 823
824 // Show the login dialog 824 // Show the login dialog
825 login_show(); 825 login_show();
826 // connect dialog is already shown, so fill in the names 826
827 // connect dialog is already shown, so fill in the names associated with the grid
828 // note how we always remember avatar names, but don't necessarily have to
827 // icky how usernames get bolted on here as a kind of hack -- MC 829 // icky how usernames get bolted on here as a kind of hack -- MC
828 if (gHippoGridManager && gHippoGridManager->getCurrentGrid()->isUsernameCompat()) 830 if (gHippoGridManager)
829 { 831 {
830 if (lastname == "resident" || lastname == "Resident") 832 firstname = gHippoGridManager->getCurrentGrid()->getFirstName();
833 lastname = gHippoGridManager->getCurrentGrid()->getLastName();
834 // RememberPassword toggles this being saved
835 password = gHippoGridManager->getCurrentGrid()->getAvatarPassword();
836
837 if (gHippoGridManager->getCurrentGrid()->isUsernameCompat())
831 { 838 {
832 LLPanelLogin::setFields(firstname, password); 839 if (lastname == "resident" || lastname == "Resident")
840 {
841 LLPanelLogin::setFields(firstname, password);
842 }
843 else
844 {
845 LLPanelLogin::setFields(firstname+"."+lastname, password);
846 }
833 } 847 }
834 else 848 else
835 { 849 {
836 LLPanelLogin::setFields(firstname+"."+lastname, password); 850 LLPanelLogin::setFields(firstname, lastname, password);
837 } 851 }
838 } 852 }
839 else
840 {
841 LLPanelLogin::setFields(firstname, lastname, password);
842 }
843 853
844 LLPanelLogin::giveFocus(); 854 LLPanelLogin::giveFocus();
845 855
@@ -972,21 +982,8 @@ bool idle_startup()
972 lastname = gLoginHandler.getLastName(); 982 lastname = gLoginHandler.getLastName();
973 web_login_key = gLoginHandler.getWebLoginKey(); 983 web_login_key = gLoginHandler.getWebLoginKey();
974 } 984 }
975 985 // note: the grid manager overrides defaults, always -- MC
976 /* Jacek - Grid manager stuff that's changed with 1.23 986 else if (show_connect_box)
977 if(!gLoginHandler.mPassword.empty())
978 {
979 firstname = gLoginHandler.mFirstName;
980 lastname = gLoginHandler.mLastName;
981 password = gLoginHandler.mPassword;
982
983 gLoginHandler.mFirstName = "";
984 gLoginHandler.mLastName = "";
985 gLoginHandler.mPassword = "";
986 LLStartUp::setShouldAutoLogin(false);
987 }*/
988
989 if (show_connect_box)
990 { 987 {
991 // TODO if not use viewer auth 988 // TODO if not use viewer auth
992 // Load all the name information out of the login view 989 // Load all the name information out of the login view
@@ -995,6 +992,8 @@ bool idle_startup()
995 992
996 // HACK: Try to make not jump on login 993 // HACK: Try to make not jump on login
997 gKeyboard->resetKeys(); 994 gKeyboard->resetKeys();
995
996 LLStartUp::setShouldAutoLogin(false);
998 } 997 }
999 998
1000 if (!firstname.empty() && !lastname.empty()) 999 if (!firstname.empty() && !lastname.empty())
@@ -1003,16 +1002,17 @@ bool idle_startup()
1003 gSavedSettings.setString("LastName", lastname); 1002 gSavedSettings.setString("LastName", lastname);
1004 1003
1005 //LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << " " << password << LL_ENDL; 1004 //LL_INFOS("AppInit") << "Attempting login as: " << firstname << " " << lastname << " " << password << LL_ENDL;
1006 gDebugInfo["LoginName"] = firstname + " " + lastname; 1005 gDebugInfo["LoginName"] = firstname + " " + lastname;
1007 }
1008
1009 1006
1010 1007 // create necessary directories
1011 1008 gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname);
1012 // create necessary directories 1009 LLFile::mkdir(gDirUtilp->getLindenUserDir());
1013 // *FIX: these mkdir's should error check 1010 }
1014 gDirUtilp->setLindenUserDir(gHippoGridManager->getCurrentGridNick(), firstname, lastname); 1011 else
1015 LLFile::mkdir(gDirUtilp->getLindenUserDir()); 1012 {
1013 // we don't do anything from here on out -- MC
1014 llerrs << "No first or last name given! Cannot proceed!" << llendl;
1015 }
1016 1016
1017 // Set PerAccountSettingsFile to the default value. 1017 // Set PerAccountSettingsFile to the default value.
1018 gSavedSettings.setString("PerAccountSettingsFile", 1018 gSavedSettings.setString("PerAccountSettingsFile",
@@ -1547,7 +1547,7 @@ bool idle_startup()
1547 default: 1547 default:
1548 if (sAuthUriNum >= (int) sAuthUris.size() - 1) 1548 if (sAuthUriNum >= (int) sAuthUris.size() - 1)
1549 { 1549 {
1550 emsg << "Unable to connect to " << gHippoGridManager->getCurrentGrid()->getGridNick() << ".\n"; 1550 emsg << "Unable to connect to " << gHippoGridManager->getCurrentGrid()->getGridName() << ".\n";
1551 emsg << LLUserAuth::getInstance()->errorMessage(); 1551 emsg << LLUserAuth::getInstance()->errorMessage();
1552 } else { 1552 } else {
1553 sAuthUriNum++; 1553 sAuthUriNum++;
@@ -1826,31 +1826,31 @@ bool idle_startup()
1826 std::string tmp = LLUserAuth::getInstance()->getResponse("gridname"); 1826 std::string tmp = LLUserAuth::getInstance()->getResponse("gridname");
1827 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp); 1827 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setGridName(tmp);
1828 tmp = LLUserAuth::getInstance()->getResponse("loginuri"); 1828 tmp = LLUserAuth::getInstance()->getResponse("loginuri");
1829 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginUri(tmp); 1829 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginURI(tmp);
1830 tmp = LLUserAuth::getInstance()->getResponse("welcome"); 1830 tmp = LLUserAuth::getInstance()->getResponse("welcome");
1831 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); 1831 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp);
1832 tmp = LLUserAuth::getInstance()->getResponse("loginpage"); 1832 tmp = LLUserAuth::getInstance()->getResponse("loginpage");
1833 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp); 1833 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setLoginPage(tmp);
1834 tmp = LLUserAuth::getInstance()->getResponse("economy"); 1834 tmp = LLUserAuth::getInstance()->getResponse("economy");
1835 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperUri(tmp); 1835 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperURI(tmp);
1836 tmp = LLUserAuth::getInstance()->getResponse("helperuri"); 1836 tmp = LLUserAuth::getInstance()->getResponse("helperuri");
1837 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperUri(tmp); 1837 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setHelperURI(tmp);
1838 tmp = LLUserAuth::getInstance()->getResponse("about"); 1838 tmp = LLUserAuth::getInstance()->getResponse("about");
1839 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); 1839 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp);
1840 tmp = LLUserAuth::getInstance()->getResponse("website"); 1840 tmp = LLUserAuth::getInstance()->getResponse("website");
1841 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp); 1841 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setWebSite(tmp);
1842 tmp = LLUserAuth::getInstance()->getResponse("help"); 1842 tmp = LLUserAuth::getInstance()->getResponse("help");
1843 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportUrl(tmp); 1843 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportURL(tmp);
1844 tmp = LLUserAuth::getInstance()->getResponse("support"); 1844 tmp = LLUserAuth::getInstance()->getResponse("support");
1845 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportUrl(tmp); 1845 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSupportURL(tmp);
1846 tmp = LLUserAuth::getInstance()->getResponse("register"); 1846 tmp = LLUserAuth::getInstance()->getResponse("register");
1847 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterUrl(tmp); 1847 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterURL(tmp);
1848 tmp = LLUserAuth::getInstance()->getResponse("account"); 1848 tmp = LLUserAuth::getInstance()->getResponse("account");
1849 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterUrl(tmp); 1849 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setRegisterURL(tmp);
1850 tmp = LLUserAuth::getInstance()->getResponse("password"); 1850 tmp = LLUserAuth::getInstance()->getResponse("password");
1851 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setPasswordUrl(tmp); 1851 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setPasswordURL(tmp);
1852 tmp = LLUserAuth::getInstance()->getResponse("search"); 1852 tmp = LLUserAuth::getInstance()->getResponse("search");
1853 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchUrl(tmp); 1853 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setSearchURL(tmp);
1854 tmp = LLUserAuth::getInstance()->getResponse("currency"); 1854 tmp = LLUserAuth::getInstance()->getResponse("currency");
1855 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp); 1855 if (!tmp.empty()) gHippoGridManager->getConnectedGrid()->setCurrencySymbol(tmp);
1856 tmp = LLUserAuth::getInstance()->getResponse("real_currency"); 1856 tmp = LLUserAuth::getInstance()->getResponse("real_currency");
@@ -2375,9 +2375,7 @@ bool idle_startup()
2375 LLStringUtil::format_map_t args; 2375 LLStringUtil::format_map_t args;
2376 args["[FIRST_NAME]"] = firstname; 2376 args["[FIRST_NAME]"] = firstname;
2377 args["[LAST_NAME]"] = lastname; 2377 args["[LAST_NAME]"] = lastname;
2378 args["[GRID_NAME]"] = (gHippoGridManager->getConnectedGrid()->getGridName().empty()) ? 2378 args["[GRID_NAME]"] = gHippoGridManager->getConnectedGrid()->getGridName();
2379 gHippoGridManager->getConnectedGrid()->getGridNick() :
2380 gHippoGridManager->getConnectedGrid()->getGridName();
2381 std::string title_text = LLTrans::getString("TitleBarMultiple", args); 2379 std::string title_text = LLTrans::getString("TitleBarMultiple", args);
2382 gWindowTitle = gSecondLife + " - " + title_text; 2380 gWindowTitle = gSecondLife + " - " + title_text;
2383 LLStringUtil::truncate(gWindowTitle, 255); 2381 LLStringUtil::truncate(gWindowTitle, 255);
@@ -3271,7 +3269,7 @@ bool first_run_dialog_callback(const LLSD& notification, const LLSD& response)
3271 if (0 == option) 3269 if (0 == option)
3272 { 3270 {
3273 LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL; 3271 LL_DEBUGS("AppInit") << "First run dialog cancelling" << LL_ENDL;
3274 const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterUrl(); 3272 const std::string &url = gHippoGridManager->getConnectedGrid()->getRegisterURL();
3275 if (!url.empty()) { 3273 if (!url.empty()) {
3276 LLWeb::loadURL(url); 3274 LLWeb::loadURL(url);
3277 } else { 3275 } else {
@@ -3323,7 +3321,7 @@ bool login_alert_status(const LLSD& notification, const LLSD& response)
3323 case 0: // OK 3321 case 0: // OK
3324 break; 3322 break;
3325 case 1: { // Help 3323 case 1: { // Help
3326 const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportUrl(); 3324 const std::string &url = gHippoGridManager->getConnectedGrid()->getSupportURL();
3327 if (!url.empty()) LLWeb::loadURLInternal(url); 3325 if (!url.empty()) LLWeb::loadURLInternal(url);
3328 break; 3326 break;
3329 } 3327 }
diff --git a/linden/indra/newview/llviewernetwork.cpp b/linden/indra/newview/llviewernetwork.cpp
index 1cfe665..0c39e15 100644
--- a/linden/indra/newview/llviewernetwork.cpp
+++ b/linden/indra/newview/llviewernetwork.cpp
@@ -75,7 +75,7 @@ void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const
75 // If there was no command line uri... 75 // If there was no command line uri...
76 if(uris.empty()) 76 if(uris.empty())
77 { 77 {
78 uris.push_back(gHippoGridManager->getConnectedGrid()->getLoginUri()); 78 uris.push_back(gHippoGridManager->getConnectedGrid()->getLoginURI());
79 /* 79 /*
80 // If its a known grid choice, get the uri from the table, 80 // If its a known grid choice, get the uri from the table,
81 // else try the grid name. 81 // else try the grid name.
@@ -92,7 +92,7 @@ void LLViewerLogin::getLoginURIs(std::vector<std::string>& uris) const
92 92
93const std::string &LLViewerLogin::getGridLabel() const 93const std::string &LLViewerLogin::getGridLabel() const
94{ 94{
95 return gHippoGridManager->getConnectedGrid()->getGridNick(); 95 return gHippoGridManager->getConnectedGrid()->getGridName();
96} 96}
97 97
98const std::string &LLViewerLogin::getLoginPage() const 98const std::string &LLViewerLogin::getLoginPage() const
@@ -102,7 +102,7 @@ const std::string &LLViewerLogin::getLoginPage() const
102 102
103const std::string &LLViewerLogin::getHelperURI() const 103const std::string &LLViewerLogin::getHelperURI() const
104{ 104{
105 return gHippoGridManager->getConnectedGrid()->getHelperUri(); 105 return gHippoGridManager->getConnectedGrid()->getHelperURI();
106} 106}
107 107
108bool LLViewerLogin::isOpenSimulator() 108bool LLViewerLogin::isOpenSimulator()
diff --git a/linden/indra/newview/llxmlrpctransaction.cpp b/linden/indra/newview/llxmlrpctransaction.cpp
index 30b0249..e0805ee 100644
--- a/linden/indra/newview/llxmlrpctransaction.cpp
+++ b/linden/indra/newview/llxmlrpctransaction.cpp
@@ -438,7 +438,7 @@ void LLXMLRPCTransaction::Impl::setStatus(Status status,
438 mStatusMessage = 438 mStatusMessage =
439 "Despite our best efforts, something unexpected has gone wrong. \n" 439 "Despite our best efforts, something unexpected has gone wrong. \n"
440 " \n" 440 " \n"
441 "Please check " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s status \n" 441 "Please check " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s status \n"
442 "to see if there is a known problem with the service."; 442 "to see if there is a known problem with the service.";
443 443
444 //mStatusURI = "http://secondlife.com/status/"; 444 //mStatusURI = "http://secondlife.com/status/";
@@ -449,14 +449,14 @@ void LLXMLRPCTransaction::Impl::setStatus(Status status,
449void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code) 449void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code)
450{ 450{
451 std::string message; 451 std::string message;
452 std::string uri = gHippoGridManager->getCurrentGrid()->getSupportUrl(); 452 std::string uri = gHippoGridManager->getCurrentGrid()->getSupportURL();
453 453
454 switch (code) 454 switch (code)
455 { 455 {
456 case CURLE_COULDNT_RESOLVE_HOST: 456 case CURLE_COULDNT_RESOLVE_HOST:
457 message = 457 message =
458 "DNS could not resolve the host name.\n" 458 "DNS could not resolve the host name.\n"
459 "Please verify that you can connect to " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s\n" 459 "Please verify that you can connect to " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s\n"
460 "web site. If you can, but continue to receive this error,\n" 460 "web site. If you can, but continue to receive this error,\n"
461 "please go to the support section and report this problem."; 461 "please go to the support section and report this problem.";
462 break; 462 break;
@@ -465,7 +465,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code)
465 message = 465 message =
466 "The login server couldn't verify itself via SSL.\n" 466 "The login server couldn't verify itself via SSL.\n"
467 "If you continue to receive this error, please go\n" 467 "If you continue to receive this error, please go\n"
468 "to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s web site\n" 468 "to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s web site\n"
469 "and report the problem."; 469 "and report the problem.";
470 break; 470 break;
471 471
@@ -477,7 +477,7 @@ void LLXMLRPCTransaction::Impl::setCurlStatus(CURLcode code)
477 "are set correctly.\n" 477 "are set correctly.\n"
478 "\n" 478 "\n"
479 "If you continue to receive this error, please go\n" 479 "If you continue to receive this error, please go\n"
480 "to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridNick() + "'s web site\n" 480 "to the Support section of " + gHippoGridManager->getCurrentGrid()->getGridName() + "'s web site\n"
481 "and report the problem."; 481 "and report the problem.";
482 break; 482 break;
483 483
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
index 3c26d30..157588d 100644
--- 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
@@ -7,10 +7,11 @@
7 Or use the Grid Manager to add a new one 7 Or use the Grid Manager to add a new one
8 </text> 8 </text>
9 <scroll_list background_visible="true" bottom_delta="30" draw_border="true" 9 <scroll_list background_visible="true" bottom_delta="30" draw_border="true"
10 draw_stripes="false" sort_column="0" 10 draw_stripes="false" sort_column="1"
11 follows="top|left|bottom" height="280" left="10" multi_select="false" 11 follows="top|left|bottom" height="280" left="10" multi_select="false"
12 name="grid_list" width="240"> 12 name="grid_list" width="240">
13 <column label="" name="grid" width="230" /> 13 <column label="" name="grid_nick" width="0" />
14 <column label="" name="grid_name" width="230" />
14 </scroll_list> 15 </scroll_list>
15 <button bottom="5" follows="bottom|right" height="20" label="Cancel" 16 <button bottom="5" follows="bottom|right" height="20" label="Cancel"
16 right="-5" name="btn_cancel" width="85" /> 17 right="-5" name="btn_cancel" width="85" />
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml b/linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml
index f635d59..09638e5 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_grid_manager.xml
@@ -3,95 +3,117 @@
3 can_resize="true" height="400" min_height="400" min_width="600" 3 can_resize="true" height="400" min_height="400" min_width="600"
4 name="floater_login" title="Grid Manager" width="600"> 4 name="floater_login" title="Grid Manager" width="600">
5 5
6 <!-- Grid Selector --> 6 <!-- GRID LIST -->
7
7 <text type="string" length="1" enabled="true" name="grid_selector_label" 8 <text type="string" length="1" enabled="true" name="grid_selector_label"
8 height="16" width="100" left="10" top="-18" 9 height="16" width="100" left="10" top="-18"
9 h_pad="0" v_pad="0" halign="left" 10 h_pad="0" v_pad="0" halign="left"
10 font="SansSerif" 11 font="SansSerif"
11 follows="left|top" bg_visible="false" border_visible="false" mouse_opaque="true" 12 follows="left|bottom" bg_visible="false" border_visible="false" mouse_opaque="true"
12 drop_shadow_visible="true" border_drop_shadow_visible="false"> 13 drop_shadow_visible="true" border_drop_shadow_visible="false">
13 Select a Grid: 14 Select a Grid:
14 </text> 15 </text>
15 16
16 <scroll_list background_visible="true" bottom_delta="65" draw_border="true" 17 <scroll_list background_visible="true" bottom_delta="65" draw_border="true"
17 draw_stripes="false" sort_column="0" 18 draw_stripes="false" sort_column="1"
18 follows="top|left|bottom" height="300" left="10" multi_select="false" 19 follows="top|left|bottom" height="300" left="10" multi_select="false"
19 name="grid_selector" width="170"> 20 name="grid_selector" width="170">
20 <column label="Grid List" name="grid" width="170" /> 21 <column label="Grid List" name="grid_nick" width="0" />
22 <column label="Grid List" name="grid_name" width="170" />
21 </scroll_list> 23 </scroll_list>
22 24
23 <!-- Grid Selector Buttons --> 25 <!-- GRID BUTTONS -->
26
24 <button label="Add New Grid" enabled="true" name="btn_add" 27 <button label="Add New Grid" enabled="true" name="btn_add"
25 height="18" width="150" left="10" bottom_delta="-22" 28 height="18" width="150" left="10" bottom_delta="-22"
26 halign="center" 29 halign="center"
27 follows="left|bottom" scale_image="true" 30 follows="left|bottom" scale_image="true"
28 font="SansSerifSmall" mouse_opaque="true" /> 31 font="SansSerifSmall" mouse_opaque="true" />
29 <button label="Duplicate Grid" enabled="true" name="btn_copy" 32 <button label="Duplicate Grid" enabled="true" name="btn_copy"
30 height="18" width="150" left_delta="0" bottom_delta="-20" 33 height="18" width="150" left_delta="0" bottom_delta="-20"
31 halign="center" 34 halign="center"
32 follows="left|bottom" scale_image="true" 35 follows="left|bottom" scale_image="true"
33 font="SansSerifSmall" mouse_opaque="true" /> 36 font="SansSerifSmall" mouse_opaque="true" />
34 <button label="Delete Grid" enabled="true" name="btn_delete" 37 <button label="Delete Grid" enabled="true" name="btn_delete"
35 height="18" width="150" left_delta="0" bottom_delta="-20" 38 height="18" width="150" left_delta="0" bottom_delta="-20"
36 halign="center" 39 halign="center"
37 follows="left|bottom" scale_image="true" 40 follows="left|bottom" scale_image="true"
38 font="SansSerifSmall" mouse_opaque="true" /> 41 font="SansSerifSmall" mouse_opaque="true" />
39 42
40 <!-- Grid Details --> 43 <!-- GRID NAME AND NICK -->
44
41 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 45 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
42 top="-45" drop_shadow_visible="true" follows="left|top" 46 bottom="345" drop_shadow_visible="true" follows="left|bottom"
43 font="SansSerif" h_pad="0" halign="left" height="16" 47 font="SansSerif" h_pad="0" halign="left" height="16"
44 left="195" mouse_opaque="true" name="gridnick_text" v_pad="0" width="120"> 48 left="195" mouse_opaque="true" name="gridnick_text" v_pad="0" width="120">
49 Grid nick (unique):
50 </text>
51 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
52 follows="left|bottom|right" font="SansSerif" handle_edit_keys_directly="true"
53 height="20" max_height="20" left_delta="100" max_length="40" mouse_opaque="true"
54 name="gridnick" select_all_on_focus_received="true" width="290" label="required" />
55 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
56 bottom_delta="-23" drop_shadow_visible="true" follows="left|bottom"
57 font="SansSerif" h_pad="0" halign="left" height="16"
58 left="195" mouse_opaque="true" name="gridname_text" v_pad="0" width="120">
45 Grid name: 59 Grid name:
46 </text> 60 </text>
47 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="335" 61 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
48 follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" 62 follows="left|bottom|right" font="SansSerif" handle_edit_keys_directly="true"
49 height="20" max_height="20" left_delta="90" max_length="40" mouse_opaque="true" 63 height="20" max_height="20" left_delta="100" max_length="40" mouse_opaque="true"
50 name="gridnick" select_all_on_focus_received="true" width="300" /> 64 name="gridname" select_all_on_focus_received="true" width="290" label="required" />
51
52 65
53 <!-- 66 <!-- NAME AND PASSWORD -->
67
54 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 68 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
55 bottom_delta="-23" drop_shadow_visible="true" follows="left|top" 69 bottom="295" drop_shadow_visible="true" follows="left|bottom"
56 font="SansSerif" h_pad="0" halign="left" height="16" 70 font="SansSerif" h_pad="0" halign="left" height="16"
57 left_delta="-90" mouse_opaque="true" name="first_name_text" v_pad="0" width="100"> 71 left="195" mouse_opaque="true" name="first_name_text" v_pad="0" width="100">
58 First Name: 72 First Name:
59 </text> 73 </text>
60 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 74 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
61 follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" 75 follows="left|bottom|right" font="SansSerif" handle_edit_keys_directly="true"
62 height="20" left_delta="90" max_length="45" mouse_opaque="true" 76 height="20" left_delta="100" max_length="45" mouse_opaque="true"
63 name="first_name" select_all_on_focus_received="true" width="200" /> 77 name="first_name" select_all_on_focus_received="true" width="200" />
64
65 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 78 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
66 bottom_delta="-23" drop_shadow_visible="true" follows="left|top" 79 bottom_delta="-23" drop_shadow_visible="true" follows="left|bottom"
80 font="SansSerif" h_pad="0" halign="left" height="16"
81 left_delta="-100" mouse_opaque="true" name="username_text" v_pad="0" width="100">
82 Username:
83 </text>
84 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
85 follows="left|bottom|right" font="SansSerif" handle_edit_keys_directly="true"
86 height="20" left_delta="100" max_length="45" mouse_opaque="true"
87 name="username" select_all_on_focus_received="true" width="200" />
88 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
89 bottom_delta="0" drop_shadow_visible="true" follows="left|bottom"
67 font="SansSerif" h_pad="0" halign="left" height="16" 90 font="SansSerif" h_pad="0" halign="left" height="16"
68 left_delta="-90" mouse_opaque="true" name="last_name_text" v_pad="0" width="100"> 91 left_delta="-100" mouse_opaque="true" name="last_name_text" v_pad="0" width="100">
69 Last Name: 92 Last Name:
70 </text> 93 </text>
71 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 94 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
72 follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" 95 follows="left|bottom|right" font="SansSerif" handle_edit_keys_directly="true"
73 height="20" left_delta="90" max_length="45" mouse_opaque="true" 96 height="20" left_delta="100" max_length="45" mouse_opaque="true"
74 name="last_name" select_all_on_focus_received="true" width="200" /> 97 name="last_name" select_all_on_focus_received="true" width="200" />
75
76 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 98 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
77 bottom_delta="-23" drop_shadow_visible="true" follows="left|top" 99 bottom_delta="-23" drop_shadow_visible="true" follows="left|bottom"
78 font="SansSerif" h_pad="0" halign="left" height="16" 100 font="SansSerif" h_pad="0" halign="left" height="16"
79 left_delta="-90" mouse_opaque="true" name="avatar_password_text" v_pad="0" width="120"> 101 left_delta="-100" mouse_opaque="true" name="avatar_password_text" v_pad="0" width="120">
80 Password: 102 Password:
81 </text> 103 </text>
82 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 104 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
83 follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" 105 follows="left|bottom|right" font="SansSerif" handle_edit_keys_directly="true"
84 height="20" left_delta="90" max_length="16" mouse_opaque="true" 106 height="20" left_delta="100" max_length="16" mouse_opaque="true"
85 name="avatar_password" select_all_on_focus_received="true" width="200" /> 107 name="avatar_password" select_all_on_focus_received="true" width="200" />
86 108
87 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 109 <!--<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
88 bottom_delta="-22" drop_shadow_visible="true" follows="left|top" 110 bottom_delta="-22" drop_shadow_visible="true" follows="left|bottom"
89 font="SansSerif" h_pad="0" halign="left" height="16" 111 font="SansSerif" h_pad="0" halign="left" height="16"
90 left_delta="-90" mouse_opaque="true" name="start_location_text" v_pad="0" 112 left_delta="-90" mouse_opaque="true" name="start_location_text" v_pad="0"
91 width="95"> 113 width="95">
92 Start Location: 114 Start Location:
93 </text> 115 </text>
94 <combo_box allow_text_entry="true" bottom_delta="0" follows="left|top|right" height="18" 116 <combo_box allow_text_entry="true" bottom_delta="0" follows="left|bottom|right" height="18"
95 left_delta="90" max_chars="128" mouse_opaque="true" 117 left_delta="90" max_chars="128" mouse_opaque="true"
96 name="start_location_combo" width="180"> 118 name="start_location_combo" width="180">
97 <combo_item name="MyHome" value="My Home"> 119 <combo_item name="MyHome" value="My Home">
@@ -105,116 +127,112 @@
105 </combo_item> 127 </combo_item>
106 </combo_box> 128 </combo_box>
107 --> 129 -->
130
131 <!-- LOGIN URI STUFF -->
108 132
109 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 133 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
110 bottom_delta="-30" drop_shadow_visible="true" follows="left|top" 134 bottom_delta="-30" drop_shadow_visible="true" follows="left|bottom"
111 font="SansSerif" h_pad="0" halign="left" height="16" 135 font="SansSerif" h_pad="0" halign="left" height="16"
112 left_delta="-90" mouse_opaque="true" name="loginuri_text" v_pad="0" width="120"> 136 left_delta="-100" mouse_opaque="true" name="loginuri_text" v_pad="0" width="120">
113 Login URI: 137 Login URI:
114 </text> 138 </text>
115 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 139 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
116 follows="left|top|right" font="SansSerif" handle_edit_keys_directly="true" 140 follows="left|bottom|right" font="SansSerif" handle_edit_keys_directly="true"
117 height="20" left_delta="90" max_length="255" mouse_opaque="true" 141 height="20" left_delta="100" max_length="255" mouse_opaque="true"
118 name="loginuri" select_all_on_focus_received="true" width="300" /> 142 name="loginuri" select_all_on_focus_received="true" width="290" label="required" />
119 143
120 <button label="Get Grid Info" enabled="true" name="btn_gridinfo" 144 <button label="Get Grid Info" enabled="true" name="btn_gridinfo"
121 height="18" width="100" bottom_delta="-25" left_delta="0" 145 height="18" width="100" bottom_delta="-25" left_delta="0"
122 halign="center" follows="left|top" scale_image="true" 146 halign="center" follows="left|bottom" scale_image="true"
123 font="SansSerifSmall" mouse_opaque="true" /> 147 font="SansSerifSmall" mouse_opaque="true" />
124 <button bottom_delta="0" follows="left|top" font="SansSerifSmall" halign="center" 148 <button bottom_delta="0" follows="left|bottom" font="SansSerifSmall" halign="center"
125 height="18" label="Clear Info" left_delta="104" 149 height="18" label="Clear Info" left_delta="104"
126 mouse_opaque="true" name="btn_clear" scale_image="true" width="100" /> 150 mouse_opaque="true" name="btn_clear" scale_image="true" width="100" />
127 151
128 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 152 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
129 bottom_delta="-30" drop_shadow_visible="true" follows="left|top" 153 bottom_delta="-33" drop_shadow_visible="true" follows="left|bottom"
130 font="SansSerif" h_pad="0" halign="left" height="16" 154 font="SansSerifSmall" h_pad="0" halign="left" height="16"
131 left="195" mouse_opaque="true" name="loginpage_text" v_pad="0" width="120"> 155 left="205" mouse_opaque="true" name="loginpage_text" v_pad="0" width="120">
132 Grid Info URLs:
133 </text>
134 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
135 bottom_delta="-28" drop_shadow_visible="true" follows="left|top"
136 font="SansSerifSmall" h_pad="0" halign="left" height="16"
137 left="205" mouse_opaque="true" name="loginpage_text" v_pad="0" width="120">
138 Login page: 156 Login page:
139 </text> 157 </text>
140 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 158 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
141 follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" 159 follows="left|bottom|right" font="SansSerifSmall" handle_edit_keys_directly="true"
142 height="20" left_delta="90" max_length="255" mouse_opaque="true" 160 height="20" left_delta="90" max_length="255" mouse_opaque="true"
143 name="loginpage" select_all_on_focus_received="true" width="280" /> 161 name="loginpage" select_all_on_focus_received="true" width="280" />
144 162
145 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 163 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
146 bottom_delta="-22" drop_shadow_visible="true" follows="left|top" 164 bottom_delta="-22" drop_shadow_visible="true" follows="left|bottom"
147 font="SansSerifSmall" h_pad="0" halign="left" height="16" 165 font="SansSerifSmall" h_pad="0" halign="left" height="16"
148 left_delta="-90" mouse_opaque="true" name="helperuri_text" v_pad="0" width="120"> 166 left_delta="-90" mouse_opaque="true" name="helperuri_text" v_pad="0" width="120">
149 Helper URI: 167 Helper URI:
150 </text> 168 </text>
151 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 169 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
152 follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" 170 follows="left|bottom|right" font="SansSerifSmall" handle_edit_keys_directly="true"
153 height="20" left_delta="90" max_length="255" mouse_opaque="true" 171 height="20" left_delta="90" max_length="255" mouse_opaque="true"
154 name="helperuri" select_all_on_focus_received="true" width="280" /> 172 name="helperuri" select_all_on_focus_received="true" width="280" />
155 173
156 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 174 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
157 bottom_delta="-22" drop_shadow_visible="true" follows="left|top" 175 bottom_delta="-22" drop_shadow_visible="true" follows="left|bottom"
158 font="SansSerifSmall" h_pad="0" halign="left" height="16" 176 font="SansSerifSmall" h_pad="0" halign="left" height="16"
159 left_delta="-90" mouse_opaque="true" name="website_text" v_pad="0" width="120"> 177 left_delta="-90" mouse_opaque="true" name="website_text" v_pad="0" width="120">
160 Website: 178 Website:
161 </text> 179 </text>
162 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 180 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
163 follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" 181 follows="left|bottom|right" font="SansSerifSmall" handle_edit_keys_directly="true"
164 height="20" left_delta="90" max_length="255" mouse_opaque="true" 182 height="20" left_delta="90" max_length="255" mouse_opaque="true"
165 name="website" select_all_on_focus_received="true" width="280" /> 183 name="website" select_all_on_focus_received="true" width="280" />
166 184
167 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 185 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
168 bottom_delta="-22" drop_shadow_visible="true" follows="left|top" 186 bottom_delta="-22" drop_shadow_visible="true" follows="left|bottom"
169 font="SansSerifSmall" h_pad="0" halign="left" height="16" 187 font="SansSerifSmall" h_pad="0" halign="left" height="16"
170 left_delta="-90" mouse_opaque="true" name="support_text" v_pad="0" width="120"> 188 left_delta="-90" mouse_opaque="true" name="support_text" v_pad="0" width="120">
171 Support: 189 Support:
172 </text> 190 </text>
173 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 191 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
174 follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" 192 follows="left|bottom|right" font="SansSerifSmall" handle_edit_keys_directly="true"
175 height="20" left_delta="90" max_length="255" mouse_opaque="true" 193 height="20" left_delta="90" max_length="255" mouse_opaque="true"
176 name="support" select_all_on_focus_received="true" width="280" /> 194 name="support" select_all_on_focus_received="true" width="280" />
177 195
178 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 196 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
179 bottom_delta="-22" drop_shadow_visible="true" follows="left|top" 197 bottom_delta="-22" drop_shadow_visible="true" follows="left|bottom"
180 font="SansSerifSmall" h_pad="0" halign="left" height="16" 198 font="SansSerifSmall" h_pad="0" halign="left" height="16"
181 left_delta="-90" mouse_opaque="true" name="register_text" v_pad="0" width="120"> 199 left_delta="-90" mouse_opaque="true" name="register_text" v_pad="0" width="120">
182 Account: 200 Account:
183 </text> 201 </text>
184 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 202 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
185 follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" 203 follows="left|bottom|right" font="SansSerifSmall" handle_edit_keys_directly="true"
186 height="20" left_delta="90" max_length="255" mouse_opaque="true" 204 height="20" left_delta="90" max_length="255" mouse_opaque="true"
187 name="register" select_all_on_focus_received="true" width="280" /> 205 name="register" select_all_on_focus_received="true" width="280" />
188 206
189 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 207 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
190 bottom_delta="-22" drop_shadow_visible="true" follows="left|top" 208 bottom_delta="-22" drop_shadow_visible="true" follows="left|bottom"
191 font="SansSerifSmall" h_pad="0" halign="left" height="16" 209 font="SansSerifSmall" h_pad="0" halign="left" height="16"
192 left_delta="-90" mouse_opaque="true" name="password_text" v_pad="0" width="120"> 210 left_delta="-90" mouse_opaque="true" name="password_text" v_pad="0" width="120">
193 Password: 211 Password:
194 </text> 212 </text>
195 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 213 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
196 follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" 214 follows="left|bottom|right" font="SansSerifSmall" handle_edit_keys_directly="true"
197 height="20" left_delta="90" max_length="255" mouse_opaque="true" 215 height="20" left_delta="90" max_length="255" mouse_opaque="true"
198 name="password" select_all_on_focus_received="true" width="280" /> 216 name="password" select_all_on_focus_received="true" width="280" />
199 217
200 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false" 218 <text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
201 bottom_delta="-22" drop_shadow_visible="true" follows="left|top" 219 bottom_delta="-22" drop_shadow_visible="true" follows="left|bottom"
202 font="SansSerifSmall" h_pad="0" halign="left" height="16" 220 font="SansSerifSmall" h_pad="0" halign="left" height="16"
203 left_delta="-90" mouse_opaque="true" name="websearch_text" v_pad="0" width="120"> 221 left_delta="-90" mouse_opaque="true" name="search_text" v_pad="0" width="120">
204 Web Search: 222 Web Search:
205 </text> 223 </text>
206 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0" 224 <line_editor bevel_style="in" border_style="line" border_thickness="1" bottom_delta="0"
207 follows="left|top|right" font="SansSerifSmall" handle_edit_keys_directly="true" 225 follows="left|bottom|right" font="SansSerifSmall" handle_edit_keys_directly="true"
208 height="20" left_delta="90" max_length="255" mouse_opaque="true" 226 height="20" left_delta="90" max_length="255" mouse_opaque="true"
209 name="search" select_all_on_focus_received="true" width="280" /> 227 name="search" select_all_on_focus_received="true" width="280" />
210 228
211 <view_border bevel_style="none" border_thickness="1" bottom_delta="-10" 229 <view_border bevel_style="none" border_thickness="1" bottom_delta="-10"
212 follows="top|left|right" height="168" left="195" 230 follows="top|left|right" height="168" left="195"
213 name="OptionalPrefsBorder" width="390" /> 231 name="OptionalPrefsBorder" width="390" />
214 232
215 <!-- Combo box for multi avatar grid manager avatar name 233 <!-- Combo box for multi avatar grid manager avatar name
216 <combo_box allow_text_entry="true" bevel_style="in" border_style="line" border_thickness="1" 234 <combo_box allow_text_entry="true" bevel_style="in" border_style="line" border_thickness="1"
217 bottom_delta="0" follows="left|top" font="SansSerif" handle_edit_keys_directly="true" 235 bottom_delta="0" follows="left|bottom" font="SansSerif" handle_edit_keys_directly="true"
218 height="20" left="290" max_length="45" mouse_opaque="true" 236 height="20" left="290" max_length="45" mouse_opaque="true"
219 name="name_combo" select_all_on_focus_received="true" width="185" /> 237 name="name_combo" select_all_on_focus_received="true" width="185" />
220 --> 238 -->
@@ -232,7 +250,7 @@
232--> 250-->
233 251
234 <!-- Checkbox for selecting a global avatar (for when combo box avatar selector works) 252 <!-- Checkbox for selecting a global avatar (for when combo box avatar selector works)
235 <check_box bottom="85" follows="left|top" font="SansSerifSmall" height="16" 253 <check_box bottom="85" follows="left|bottom" font="SansSerifSmall" height="16"
236 initial_value="false" label="Global Avatar" 254 initial_value="false" label="Global Avatar"
237 left_delta="0" mouse_opaque="true" name="global_check" width="138" /> 255 left_delta="0" mouse_opaque="true" name="global_check" width="138" />
238 256
@@ -247,26 +265,19 @@
247 265
248 <!-- Cancel/Connect Buttons --> 266 <!-- Cancel/Connect Buttons -->
249 267
250 <!--
251 <button bottom="-44" follows="right|top" font="SansSerif" halign="center"
252 height="24" label="Set as Default" label_selected="Set as Default"
253 left="470" mouse_opaque="true" name="set_default" scale_image="TRUE"
254 width="110" />
255 -->
256
257 <!-- <button bottom="28" follows="right|bottom" font="SansSerif" halign="center" 268 <!-- <button bottom="28" follows="right|bottom" font="SansSerif" halign="center"
258 height="24" label="Connect" label_selected="Connect" 269 height="24" label="Connect" label_selected="Connect"
259 left="280" mouse_opaque="true" name="connect_btn" scale_image="TRUE" 270 left="280" mouse_opaque="true" name="connect_btn" scale_image="TRUE"
260 width="100" /> --> 271 width="100" /> -->
261 <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" 272 <button bottom="2" follows="right|bottom" font="SansSerif" halign="center"
262 height="24" label="Apply" label_selected="Apply" left="-108" 273 height="24" label="Apply" label_selected="Apply" left="-108"
263 mouse_opaque="true" name="btn_apply" scale_image="TRUE" width="100" /> 274 mouse_opaque="true" name="btn_apply" scale_image="TRUE" width="100" />
264 <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" 275 <button bottom="2" follows="right|bottom" font="SansSerif" halign="center"
265 height="24" label="Cancel" label_selected="Cancel" left_delta="-104" 276 height="24" label="Cancel" label_selected="Cancel" left_delta="-104"
266 mouse_opaque="true" name="btn_cancel" scale_image="TRUE" width="100" /> 277 mouse_opaque="true" name="btn_cancel" scale_image="TRUE" width="100" />
267 <button bottom="2" follows="right|bottom" font="SansSerif" halign="center" 278 <button bottom="2" follows="right|bottom" font="SansSerif" halign="center"
268 height="24" label="OK" label_selected="OK" left_delta="-104" 279 height="24" label="OK" label_selected="OK" left_delta="-104"
269 mouse_opaque="true" name="btn_ok" scale_image="TRUE" width="100" /> 280 mouse_opaque="true" name="btn_ok" scale_image="TRUE" width="100" />
270 <!-- 281 <!--
271 <combo_box allow_text_entry="true" bottom="32" follows="left|bottom" height="18" 282 <combo_box allow_text_entry="true" bottom="32" follows="left|bottom" height="18"
272 left_delta="135" max_chars="40" mouse_opaque="true" 283 left_delta="135" max_chars="40" mouse_opaque="true"
diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
index 4d9f6f9..d9b415e 100644
--- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml
@@ -7156,11 +7156,14 @@ You need to specify a unique grid nickname.
7156 7156
7157<notification 7157<notification
7158 icon="alertmodal.tga" 7158 icon="alertmodal.tga"
7159 name="GridsNoLoginUri" 7159 name="GridInfoDirty"
7160 type="alertmodal"> 7160 type="alertmodal">
7161Cannot save new grid '[NAME]'. 7161You have unsaved changes that will be lost. Continue?
7162 7162 <usetemplate
7163You need to specify a login URI. 7163 ignoretext="When creating new grids"
7164 name="okcancelignore"
7165 notext="Cancel"
7166 yestext="Continue"/>
7164</notification> 7167</notification>
7165 7168
7166<notification 7169<notification
@@ -7173,6 +7176,13 @@ A grid with the same nickname already exists.
7173</notification> 7176</notification>
7174 7177
7175<notification 7178<notification
7179 icon="alertmodal.tga"
7180 name="GridInfoNoLoginUri"
7181 type="alertmodal">
7182 A login URI is required to retrieve the grid info.
7183</notification>
7184
7185<notification
7176 icon="alertmodal.tga" 7186 icon="alertmodal.tga"
7177 name="GridInfoNoLoginUri" 7187 name="GridInfoNoLoginUri"
7178 type="alertmodal"> 7188 type="alertmodal">
@@ -7216,6 +7226,13 @@ If you don't have an account, would you like to create one now?
7216</notification> 7226</notification>
7217 7227
7218<notification 7228<notification
7229 icon="alertmodal.tga"
7230 name="InvalidPassword"
7231 type="alertmodal">
7232You have entered an invalid password! Please try again.
7233</notification>
7234
7235<notification
7219 icon="alert.tga" 7236 icon="alert.tga"
7220 name="ShowLookAtInfo" 7237 name="ShowLookAtInfo"
7221 type="alert"> 7238 type="alert">