summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp8
-rw-r--r--indra/newview/llpanellogin.cpp30
-rw-r--r--indra/newview/llslurl.h2
-rw-r--r--indra/newview/llstartup.cpp26
-rw-r--r--indra/newview/llviewerwindow.cpp16
5 files changed, 45 insertions, 37 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9535e5f239..9fd486b2ff 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2098,12 +2098,8 @@ bool LLAppViewer::initConfiguration()
}
else if(clp.hasOption("slurl"))
{
- LLStartUp::setStartSLURL(LLSLURL(clp.getOption("surl")[0]));
- if(LLStartUp::getStartSLURL().getType() == LLSLURL::LOCATION)
- {
- LLGridManager::getInstance()->setGridChoice(LLStartUp::getStartSLURL().getGrid());
-
- }
+ LLSLURL start_slurl(clp.getOption("slurl")[0]);
+ LLStartUp::setStartSLURL(start_slurl);
}
const LLControlVariable* skinfolder = gSavedSettings.getControl("SkinCurrent");
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index e5c8393eaa..b620a005d2 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -223,19 +223,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
LLComboBox* combo = getChild<LLComboBox>("start_location_combo");
- if(!LLStartUp::getStartSLURL().isLocation())
+ if(LLStartUp::getStartSLURL().getType() != LLSLURL::LOCATION)
{
- LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation")));
- }
- std::string sim_string = LLStartUp::getStartSLURL().getRegion();
- if (!sim_string.empty())
- {
- // Replace "<Type region name>" with this region name
- combo->remove(2);
- combo->add( sim_string );
- combo->setTextEntry(sim_string);
- combo->setCurrentByIndex( 2 );
+ LLSLURL slurl(gSavedSettings.getString("LoginLocation"));
+ LLStartUp::setStartSLURL(slurl);
}
+ updateLocationCombo(false);
combo->setCommitCallback(onSelectLocation, NULL);
@@ -698,6 +691,8 @@ void LLPanelLogin::updateLocationCombo( bool force_visible )
{
return;
}
+
+ llinfos << "updatelocationcombo " << LLStartUp::getStartSLURL().asString() << llendl;
LLComboBox* combo = sInstance->getChild<LLComboBox>("start_location_combo");
switch(LLStartUp::getStartSLURL().getType())
@@ -744,11 +739,12 @@ void LLPanelLogin::onSelectLocation(LLUICtrl*, void*)
if((slurl.getType() == LLSLURL::LOCATION) &&
(slurl.getGrid() != LLStartUp::getStartSLURL().getGrid()))
{
- LLStartUp::setStartSLURL(slurl);
+
+
// we've changed the grid, so update the grid selection
try
{
- LLGridManager::getInstance()->setGridChoice(slurl.getGrid());
+ LLStartUp::setStartSLURL(slurl);
}
catch (LLInvalidGridName ex)
{
@@ -763,12 +759,12 @@ void LLPanelLogin::onSelectLocation(LLUICtrl*, void*)
}
case 1:
{
- LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST));
+ LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME));
break;
}
default:
{
- LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_HOME));
+ LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST));
break;
}
}
@@ -800,7 +796,6 @@ void LLPanelLogin::getLocation(LLSLURL& slurl)
void LLPanelLogin::setLocation(const LLSLURL& slurl)
{
LLStartUp::setStartSLURL(slurl);
- LLGridManager::getInstance()->setGridChoice(slurl.getGrid());
updateServer();
}
@@ -1174,11 +1169,12 @@ void LLPanelLogin::onSelectServer(LLUICtrl*, void*)
combo = sInstance->getChild<LLComboBox>("start_location_combo");
combo->setCurrentByIndex(1);
- LLStartUp::setStartSLURL(LLSLURL(LLSLURL::SIM_LOCATION_LAST));
+ LLStartUp::setStartSLURL(LLSLURL(gSavedSettings.getString("LoginLocation")));
LLGridManager::getInstance()->setGridChoice(combo_val.asString());
// This new selection will override preset uris
// from the command line.
updateServer();
+ updateLocationCombo(false);
updateLoginPanelLinks();
}
diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h
index 37bdc36fa4..28c23561cf 100644
--- a/indra/newview/llslurl.h
+++ b/indra/newview/llslurl.h
@@ -88,7 +88,7 @@ public:
LLSD getAppPath() const { return mAppPath; }
bool isValid() const { return mType != INVALID; }
- bool isLocation() const { return (mType == LAST_LOCATION) || (mType == HOME_LOCATION) || (mType == LOCATION); }
+ bool isSpatial() const { return (mType == LAST_LOCATION) || (mType == HOME_LOCATION) || (mType == LOCATION); }
bool operator==(const LLSLURL& rhs);
bool operator!=(const LLSLURL&rhs);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 951806846c..6860da1bd2 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -824,10 +824,11 @@ bool idle_startup()
// create necessary directories
// *FIX: these mkdir's should error check
- gDirUtilp->setPerAccountChatLogsDir(userid);
+ gDirUtilp->setLindenUserDir(userid);
LLFile::mkdir(gDirUtilp->getLindenUserDir());
// Set PerAccountSettingsFile to the default value.
+ std::string per_account_settings_file = LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount");
gSavedSettings.setString("PerAccountSettingsFile",
gDirUtilp->getExpandedFilename(LL_PATH_PER_SL_ACCOUNT,
LLAppViewer::instance()->getSettingsFilename("Default", "PerAccount")));
@@ -857,7 +858,8 @@ bool idle_startup()
{
gDirUtilp->setChatLogsDir(gSavedPerAccountSettings.getString("InstantMessageLogPath"));
}
-
+ gDirUtilp->setPerAccountChatLogsDir(userid);
+
LLFile::mkdir(gDirUtilp->getChatLogsDir());
LLFile::mkdir(gDirUtilp->getPerAccountChatLogsDir());
@@ -879,8 +881,6 @@ bool idle_startup()
if (show_connect_box)
{
LLSLURL slurl;
- LLPanelLogin::getLocation(slurl);
- LLStartUp::setStartSLURL(slurl);
LLPanelLogin::closePanel();
}
@@ -2660,8 +2660,22 @@ bool LLStartUp::dispatchURL()
void LLStartUp::setStartSLURL(const LLSLURL& slurl)
{
sStartSLURL = slurl;
- gSavedSettings.setBOOL("LoginLastLocation",
- !(slurl.getType() == LLSLURL::HOME_LOCATION));
+ switch(slurl.getType())
+ {
+ case LLSLURL::HOME_LOCATION:
+ {
+ gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_HOME);
+ break;
+ }
+ case LLSLURL::LAST_LOCATION:
+ {
+ gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_LAST);
+ break;
+ }
+ default:
+ LLGridManager::getInstance()->setGridChoice(slurl.getGrid());
+ break;
+ }
}
bool login_alert_done(const LLSD& notification, const LLSD& response)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 5d2550b9a7..dcc2a6f4a5 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -829,13 +829,15 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi
if (slurl_dnd_enabled)
{
- LLSLURL dropped_slurl(data);
- if(dropped_slurl.isLocation())
- if (drop)
- {
- LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), NULL, true );
- return LLWindowCallbacks::DND_MOVE;
- };
+ LLSLURL dropped_slurl(data);
+ if(dropped_slurl.isSpatial())
+ {
+ if (drop)
+ {
+ LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), NULL, true );
+ return LLWindowCallbacks::DND_MOVE;
+ }
+ }
}
if (prim_media_dnd_enabled)