1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Riebeling
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
25 int main( int argc
, char ** argv
) {
26 QApplication
app( argc
, argv
);
28 QString absolutePath
= QFileInfo(qApp
->arguments().at(0)).absolutePath() + "/";
29 // portable installation:
30 // check for a configuration file in the program folder.
32 if(QFileInfo(absolutePath
+ "RockboxUtility.ini").isFile())
33 user
= new QSettings(absolutePath
+ "RockboxUtility.ini", QSettings::IniFormat
, 0);
34 else user
= new QSettings(QSettings::IniFormat
, QSettings::UserScope
, "rockbox.org", "RockboxUtility");
36 QTranslator translator
;
37 if(user
->value("defaults/lang").toString() != "")
39 if(user
->value("defaults/lang", "").toString() != "") {
40 if(!translator
.load(user
->value("defaults/lang").toString(), absolutePath
))
41 translator
.load(user
->value("defaults/lang").toString(), ":/lang");
44 app
.installTranslator(&translator
);
49 // app.connect( &app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()) );