aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-11-08 19:15:49 -0700
committerMcCabe Maxsted2009-11-08 19:15:49 -0700
commit6e5592cb1cac05f942462f2b9bf38a11b7440c8a (patch)
tree0c5991f3e13b511efb97bebf00b4964a593c1823 /linden/indra
parentFinally packaged up Mac libraries. (diff)
downloadmeta-impy-6e5592cb1cac05f942462f2b9bf38a11b7440c8a.zip
meta-impy-6e5592cb1cac05f942462f2b9bf38a11b7440c8a.tar.gz
meta-impy-6e5592cb1cac05f942462f2b9bf38a11b7440c8a.tar.bz2
meta-impy-6e5592cb1cac05f942462f2b9bf38a11b7440c8a.tar.xz
Remember the last logged in grid between sessions
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/newview/app_settings/settings.xml12
-rw-r--r--linden/indra/newview/hippoGridManager.cpp6
-rw-r--r--linden/indra/newview/llpanellogin.cpp7
3 files changed, 21 insertions, 4 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml
index 53d84dc..f3508e0 100644
--- a/linden/indra/newview/app_settings/settings.xml
+++ b/linden/indra/newview/app_settings/settings.xml
@@ -4581,7 +4581,17 @@
4581 <key>Value</key> 4581 <key>Value</key>
4582 <string>0.0.0</string> 4582 <string>0.0.0</string>
4583 </map> 4583 </map>
4584 4584 <key>LastSelectedGrid</key>
4585 <map>
4586 <key>Comment</key>
4587 <string>Last grid selected from the grid pulldown</string>
4588 <key>Persist</key>
4589 <integer>1</integer>
4590 <key>Type</key>
4591 <string>String</string>
4592 <key>Value</key>
4593 <string />
4594 </map>
4585 <key>LastSnapshotToEmailHeight</key> 4595 <key>LastSnapshotToEmailHeight</key>
4586 <map> 4596 <map>
4587 <key>Comment</key> 4597 <key>Comment</key>
diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp
index 71e3a95..9ff2d39 100644
--- a/linden/indra/newview/hippoGridManager.cpp
+++ b/linden/indra/newview/hippoGridManager.cpp
@@ -670,8 +670,10 @@ void HippoGridManager::loadFromFile()
670 if (gSavedSettings.getBOOL("CheckForGridUpdates")) 670 if (gSavedSettings.getBOOL("CheckForGridUpdates"))
671 parseUrl("http://imprudenceviewer.org/app/grids/", !mGridInfo.empty()); 671 parseUrl("http://imprudenceviewer.org/app/grids/", !mGridInfo.empty());
672 672
673 setDefaultGrid(gSavedSettings.getString("DefaultGrid")); 673 std::string last_grid = gSavedSettings.getString("LastSelectedGrid");
674 setCurrentGrid(gSavedSettings.getString("DefaultGrid")); 674 if (last_grid.empty()) last_grid = gSavedSettings.getString("DefaultGrid");
675 setDefaultGrid(last_grid);
676 setCurrentGrid(last_grid);
675} 677}
676 678
677 679
diff --git a/linden/indra/newview/llpanellogin.cpp b/linden/indra/newview/llpanellogin.cpp
index 629437d..1a17b20 100644
--- a/linden/indra/newview/llpanellogin.cpp
+++ b/linden/indra/newview/llpanellogin.cpp
@@ -728,7 +728,9 @@ void LLPanelLogin::addServer(const std::string& server)
728 } 728 }
729 else 729 else
730 { 730 {
731 grids->setSimple(defaultGrid); 731 std::string last_grid = gSavedSettings.getString("LastSelectedGrid");
732 if (last_grid.empty()) last_grid = defaultGrid;
733 grids->setSimple(last_grid);
732 } 734 }
733 735
734 //LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo"); 736 //LLComboBox* combo = sInstance->getChild<LLComboBox>("server_combo");
@@ -1185,6 +1187,9 @@ void LLPanelLogin::onSelectServer(LLUICtrl* ctrl, void*)
1185 1187
1186 // grid changed so show new splash screen (possibly) 1188 // grid changed so show new splash screen (possibly)
1187 loadLoginPage(); 1189 loadLoginPage();
1190
1191 // save grid choice to settings
1192 gSavedSettings.setString("LastSelectedGrid", mCurGrid);
1188} 1193}
1189/* 1194/*
1190void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*) 1195void LLPanelLogin::onServerComboLostFocus(LLFocusableElement* fe, void*)