summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llpanellogin.cpp44
-rwxr-xr-xindra/newview/llpanellogin.h2
-rwxr-xr-xindra/newview/llstartup.cpp13
-rwxr-xr-xindra/newview/skins/default/xui/en/panel_login.xml2
4 files changed, 45 insertions, 16 deletions
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 0c392d669b..2301494549 100755
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -222,6 +222,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLComboBox* server_choice_combo = getChild<LLComboBox>("server_combo");
server_choice_combo->setCommitCallback(boost::bind(&LLPanelLogin::onSelectServer, this));
+ LLComboBox* favorites_combo = getChild<LLComboBox>("start_location_combo");
+ favorites_combo->setCommitCallback(boost::bind(&LLPanelLogin::onSelectFavorite, this));
+
+ LLLineEditor* location_edit = sInstance->getChild<LLLineEditor>("location_edit");
+ location_edit->setKeystrokeCallback(boost::bind(&LLPanelLogin::onLocationEditChanged, this, _1), NULL);
+
// Load all of the grids, sorted, and then add a bar and the current grid at the top
server_choice_combo->removeall();
@@ -674,8 +680,12 @@ void LLPanelLogin::onUpdateStartSLURL(const LLSLURL& new_start_slurl)
updateServer(); // to change the links and splash screen
}
- //location_combo->setTextEntry(new_start_slurl.getLocationString());
- location_edit->setValue(new_start_slurl.getLocationString());
+ if ( new_start_slurl.getLocationString().length() )
+ {
+ location_edit->setValue(new_start_slurl.getLocationString());
+ LLButton* loc_btn = sInstance->getChild<LLButton>("connect_location_btn");
+ loc_btn->setEnabled(true);
+ }
}
else
{
@@ -979,12 +989,40 @@ void LLPanelLogin::updateServer()
}
}
+void LLPanelLogin::onLocationEditChanged(LLUICtrl* ctrl)
+{
+ LLLineEditor* self = (LLLineEditor*)ctrl;
+
+ if (self )
+ {
+ LLButton* loc_btn = getChild<LLButton>("connect_location_btn");
+
+ unsigned int field_length = self->getText().length();
+ if ( field_length == 0 )
+ {
+ loc_btn->setEnabled(false);
+ }
+ else
+ {
+ loc_btn->setEnabled(true);
+ }
+ }
+}
+
+
+void LLPanelLogin::onSelectFavorite()
+{
+ // enable button when item selected from combo
+ LLButton* fav_btn = getChild<LLButton>("connect_favorite_btn");
+ fav_btn->setEnabled(true);
+}
+
void LLPanelLogin::onSelectServer()
{
// The user twiddled with the grid choice ui.
// apply the selection to the grid setting.
LLPointer<LLCredential> credential;
-
+
LLComboBox* server_combo = getChild<LLComboBox>("server_combo");
LLSD server_combo_val = server_combo->getSelectedValue();
LL_INFOS("AppInit") << "grid "<<server_combo_val.asString()<< LL_ENDL;
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 072924c3f8..bcf689b62f 100755
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -85,6 +85,8 @@ private:
friend class LLPanelLoginListener;
void addFavoritesToStartLocation();
void addUsersWithFavoritesToUsername();
+ void onLocationEditChanged(LLUICtrl* ctrl);
+ void onSelectFavorite();
void onSelectServer();
void onLocationSLURL();
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 67a76460a7..52130c2c83 100755
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1874,19 +1874,6 @@ bool idle_startup()
display_startup();
- // based on the comments, we've successfully logged in so we can delete the 'forced'
- // URL that the updater set in settings.ini (in a mostly paranoid fashion)
- std::string nextLoginLocation = gSavedSettings.getString( "NextLoginLocation" );
- if ( nextLoginLocation.length() )
- {
- // clear it
- gSavedSettings.setString( "NextLoginLocation", "" );
-
- // and make sure it's saved
- gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile") , TRUE );
- LLUIColorTable::instance().saveUserSettings();
- };
-
display_startup();
// JC: Initializing audio requests many sounds for download.
init_audio();
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 6d4085c455..f3fd0ad39b 100755
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -127,6 +127,7 @@
name="connect_favorite_btn"
left_pad="8"
width="80"
+ enabled="false"
height="26"
bottom_delta="0" />
<line_editor
@@ -147,6 +148,7 @@
image_pressed="PushButton_Login_Pressed"
image_hover="PushButton_Login_Over"
label="Log In"
+ enabled="false"
label_color="White"
font="SansSerifMedium"
name="connect_location_btn"