reworked settings

now there is only one global object for loading and saving settings

RshareSettings *Settings;

the class RSettings can be used too, but it is not prefered, because the default settings has no affect

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2964 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-05-20 21:53:27 +00:00
parent e68e6b54ef
commit 6baf56285b
39 changed files with 336 additions and 390 deletions

View file

@ -53,7 +53,10 @@ int main(int argc, char *argv[])
/* RetroShare Core Objects */
RsInit::InitRsConfig();
bool okStart = RsInit::InitRetroShare(argc, argv);
/* create global settings object */
RshareSettings::Create ();
/*
Function RsConfigMinimised is not available in SVN, so I commented it out.
bool startMinimised = RsConfigStartMinimised(config);
@ -163,9 +166,7 @@ int main(int argc, char *argv[])
{
/* only show window, if not startMinimized */
RshareSettings _settings;
if(!_settings.value(QString::fromUtf8("StartMinimized"), false).toBool())
if(!Settings->value(QString::fromUtf8("StartMinimized"), false).toBool())
{
w->show();
@ -179,13 +180,11 @@ int main(int argc, char *argv[])
/* dive into the endless loop */
// return ret;
int ti = rshare.exec();
delete w ;
int ti = rshare.exec();
delete w ;
Settings->sync();
delete Settings;
return ti ;
}