fixed issue of loading the correct instance of RetroShare.conf when switching locations (Patch from AsamK #3423256)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4637 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2011-10-14 21:16:34 +00:00
parent 7a98e83df1
commit 6989a40312
6 changed files with 37 additions and 18 deletions

View file

@ -122,14 +122,7 @@ Rshare::Rshare(QStringList args, int &argc, char **argv, QString dir)
/** Initialize support for language translations. */
//LanguageSupport::initialize();
/** Translate the GUI to the appropriate language. */
setLanguage(_args.value(ARG_LANGUAGE));
/** Set the GUI style appropriately. */
setStyle(_args.value(ARG_GUISTYLE));
/** Set the GUI stylesheet appropriately. */
setSheet(_args.value(ARG_GUISTYLESHEET));
resetLanguageAndStyle();
/* Switch off auto shutdown */
setQuitOnLastWindowClosed ( false );
@ -355,6 +348,18 @@ Rshare::setSheet(QString sheet)
}
void Rshare::resetLanguageAndStyle()
{
/** Translate the GUI to the appropriate language. */
setLanguage(_args.value(ARG_LANGUAGE));
/** Set the GUI style appropriately. */
setStyle(_args.value(ARG_GUISTYLE));
/** Set the GUI stylesheet appropriately. */
setSheet(_args.value(ARG_GUISTYLESHEET));
}
/** Returns the directory RetroShare uses for its data files. */
QString
Rshare::dataDirectory()