mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-15 10:54:22 -05:00
fixed startMinized now it works
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1209 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dab5ae98f8
commit
281f4b95f3
@ -35,17 +35,7 @@ GeneralDialog::GeneralDialog(QWidget *parent)
|
|||||||
/* Create RshareSettings object */
|
/* Create RshareSettings object */
|
||||||
_settings = new RshareSettings();
|
_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 */
|
/* Hide platform specific features */
|
||||||
#ifndef Q_WS_WIN
|
#ifndef Q_WS_WIN
|
||||||
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
|
ui.chkRunRetroshareAtSystemStartup->setVisible(false);
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>431</width>
|
<width>413</width>
|
||||||
<height>250</height>
|
<height>267</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize" >
|
<property name="minimumSize" >
|
||||||
@ -552,33 +552,18 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
<string>Misc</string>
|
<string>Startup</string>
|
||||||
</property>
|
|
||||||
<widget class="QCheckBox" name="chkShowOnStartup" >
|
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>40</y>
|
|
||||||
<width>401</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QGridLayout" >
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QCheckBox" name="chkRunRetroshareAtSystemStartup" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Show MainWindow at Startup</string>
|
<string>Start RetroShare when my system starts</string>
|
||||||
</property>
|
|
||||||
<property name="checked" >
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
<widget class="QCheckBox" name="checkStartMinimized" >
|
<widget class="QCheckBox" name="checkStartMinimized" >
|
||||||
<property name="geometry" >
|
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>60</y>
|
|
||||||
<width>401</width>
|
|
||||||
<height>20</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Start minimized</string>
|
<string>Start minimized</string>
|
||||||
</property>
|
</property>
|
||||||
@ -586,19 +571,8 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QCheckBox" name="chkRunRetroshareAtSystemStartup" >
|
</item>
|
||||||
<property name="geometry" >
|
</layout>
|
||||||
<rect>
|
|
||||||
<x>10</x>
|
|
||||||
<y>20</y>
|
|
||||||
<width>411</width>
|
|
||||||
<height>18</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text" >
|
|
||||||
<string>Start RetroShare when my system starts</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0" >
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include <gui/MainWindow.h>
|
#include <gui/MainWindow.h>
|
||||||
#include <gui/StartDialog.h>
|
#include <gui/StartDialog.h>
|
||||||
#include <gui/GenCertDialog.h>
|
#include <gui/GenCertDialog.h>
|
||||||
|
#include <gui/Preferences/GeneralDialog.h>
|
||||||
#include <gui/Preferences/rsharesettings.h>
|
#include <gui/Preferences/rsharesettings.h>
|
||||||
#include <gui/connect/ConfCertDialog.h>
|
#include <gui/connect/ConfCertDialog.h>
|
||||||
|
|
||||||
@ -59,7 +60,7 @@ int main(int argc, char *argv[])
|
|||||||
bool startMinimised = RsConfigStartMinimised(config);
|
bool startMinimised = RsConfigStartMinimised(config);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool startMinimised = false;
|
//bool startMinimized = false;
|
||||||
|
|
||||||
/* Setup The GUI Stuff */
|
/* Setup The GUI Stuff */
|
||||||
Rshare rshare(args, argc, argv,
|
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())) ;
|
QObject::connect(ConfCertDialog::instance(),SIGNAL(configChanged()),w->networkDialog,SLOT(insertConnect())) ;
|
||||||
|
|
||||||
/* only show window, if not startMinimized */
|
/* only show window, if not startMinimized */
|
||||||
if (!startMinimised)
|
RshareSettings *_settings = new RshareSettings();
|
||||||
|
|
||||||
|
if(!_settings->value(QString::fromUtf8("StartMinimized"), false).toBool())
|
||||||
{
|
{
|
||||||
|
|
||||||
w->show();
|
w->show();
|
||||||
|
Loading…
Reference in New Issue
Block a user