FIRE-11357: Convert deprecated conversation logging bool to the new S32 for it when performing a settings restore

master
Cinders 2013-08-17 17:08:46 -06:00
parent a12d3c4f95
commit 7ff86206b5
5 changed files with 60 additions and 2 deletions

View File

@ -20944,6 +20944,19 @@ Change of this parameter will affect the layout of buttons in notification toast
<string>String</string>
<key>Value</key>
<string />
</map>
</map>
<key>FSFirstRunAfterSettingsRestore</key>
<map>
<key>Comment</key>
<string>Specifies that you have not run the viewer since you performed a settings restore</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
<key>Backup</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@ -329,6 +329,22 @@
They are not used in current viewer anymore. But they can't be removed to avoid
influence on previous versions of the viewer in case of settings are not used or default value
should be changed. See EXT-6661. -->
<key>LogInstantMessages</key>
<map>
<key>Comment</key>
<string>(DEPRECATED) Only used for restoring settings!!! Use KeepConversationLogTranscripts</string>
<key>Persist</key>
<integer>1</integer>
<key>HideFromEditor</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>1</integer>
<key>Backup</key>
<integer>0</integer>
</map>
<!-- 1.23 settings -->
<key>LogChat</key>

View File

@ -2778,6 +2778,15 @@ bool LLAppViewer::initConfiguration()
// Note that the "FirstRunThisInstall" settings is currently unused.
gSavedSettings.setBOOL("FirstRunThisInstall", FALSE);
}
// <FS:CR> Compatibility with old backups
// Put gSavedSettings here, gSavedPerAccountSettings in llstartup.cpp
// *TODO: Should we keep these around forever or just three release cycles?
if (gSavedSettings.getBOOL("FSFirstRunAfterSettingsRestore"))
{
// Nothing happened...
}
// </FS:CR>
//WS: Set the usersessionsettingsfile to the account_SessionSettingsFile file. This allows settings_per_accounts to be per session.
if(!gSavedSettings.getString("SessionSettingsFile").empty())

View File

@ -3698,6 +3698,9 @@ void FSPanelPreferenceBackup:: doRestoreSettings(const LLSD& notification,const
}
}
}
// <FS:CR> Set this true so we can update newer settings with their deprecated counterparts on next launch
gSavedSettings.setBOOL("FSFirstRunAfterSettingsRestore", TRUE);
// Tell the user we have finished restoring settings and the viewer must shut down
LLNotificationsUtil::add("RestoreFinished",LLSD(),LLSD(),boost::bind(&FSPanelPreferenceBackup::onQuitConfirmed,this,_1,_2));
}

View File

@ -2228,8 +2228,25 @@ LLWorld::getInstance()->addRegion(gFirstSimHandle, gFirstSim, first_sim_size_x,
LLFloaterReg::toggleInstanceOrBringToFront("im_container");
}
display_startup();
// <FS:CR> Compatibility with old backups
// Put gSavedPerAccountSettings here, put gSavedSettings in llappviewer.cpp
// *TODO: Should we keep these around forever or just three release cycles?
if (gSavedSettings.getBOOL("FSFirstRunAfterSettingsRestore"))
{
// Post-chui merge logging change
if (gSavedPerAccountSettings.getBOOL("LogInstantMessages"))
gSavedPerAccountSettings.setS32("KeepConversationLogTranscript", 2);
else
gSavedPerAccountSettings.setS32("KeepConversationLogTranscript", 0);
//ok, we're done, set it back to false.
gSavedSettings.setBOOL("FSFirstRunAfterSettingsRestore", FALSE);
}
display_startup();
// </FS:CR>
if (gSavedSettings.getBOOL("HelpFloaterOpen"))
{