diff --git a/retroshare-gui/src/gui/Preferences/GeneralDialog.cpp b/retroshare-gui/src/gui/Preferences/GeneralDialog.cpp index 6eba15039..d357ae1fd 100644 --- a/retroshare-gui/src/gui/Preferences/GeneralDialog.cpp +++ b/retroshare-gui/src/gui/Preferences/GeneralDialog.cpp @@ -1,7 +1,7 @@ /**************************************************************** - * This file is distributed under the following license: - * - * Copyright (c) 2006-2007, crypton + * This file is distributed under the following license: + * + * Copyright (c) 2006-2007, crypton * Copyright (c) 2006, Matt Edman, Justin Hipple * * This program is free software; you can redistribute it and/or @@ -35,17 +35,7 @@ GeneralDialog::GeneralDialog(QWidget *parent) /* Create RshareSettings object */ _settings = new RshareSettings(); - if (QSystemTrayIcon::isSystemTrayAvailable()){ - /* Check if we are supposed to show our main window on startup */ - ui.chkShowOnStartup->setChecked(_settings->showMainWindowAtStart()); - if (ui.chkShowOnStartup->isChecked()) - show(); - } else { - /* Don't let people hide the main window, since that's all they have. */ - ui.chkShowOnStartup->hide(); - show(); - } /* Hide platform specific features */ #ifndef Q_WS_WIN ui.chkRunRetroshareAtSystemStartup->setVisible(false); diff --git a/retroshare-gui/src/gui/Preferences/GeneralDialog.ui b/retroshare-gui/src/gui/Preferences/GeneralDialog.ui index b5051d04d..6c159e01d 100644 --- a/retroshare-gui/src/gui/Preferences/GeneralDialog.ui +++ b/retroshare-gui/src/gui/Preferences/GeneralDialog.ui @@ -5,8 +5,8 @@ 0 0 - 431 - 250 + 413 + 267 @@ -552,53 +552,27 @@ - Misc + Startup - - - - 10 - 40 - 401 - 20 - - - - Show MainWindow at Startup - - - false - - - - - - 10 - 60 - 401 - 20 - - - - Start minimized - - - true - - - - - - 10 - 20 - 411 - 18 - - - - Start RetroShare when my system starts - - + + + + + Start RetroShare when my system starts + + + + + + + Start minimized + + + true + + + + diff --git a/retroshare-gui/src/main.cpp b/retroshare-gui/src/main.cpp index 0de9f1405..bad075120 100644 --- a/retroshare-gui/src/main.cpp +++ b/retroshare-gui/src/main.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -59,7 +60,7 @@ int main(int argc, char *argv[]) bool startMinimised = RsConfigStartMinimised(config); */ - bool startMinimised = false; + //bool startMinimized = false; /* Setup The GUI Stuff */ Rshare rshare(args, argc, argv, @@ -176,7 +177,9 @@ int main(int argc, char *argv[]) QObject::connect(ConfCertDialog::instance(),SIGNAL(configChanged()),w->networkDialog,SLOT(insertConnect())) ; /* only show window, if not startMinimized */ - if (!startMinimised) + RshareSettings *_settings = new RshareSettings(); + + if(!_settings->value(QString::fromUtf8("StartMinimized"), false).toBool()) { w->show();