Added settings for start Quick Start Wizard at first time start.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1984 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-01-08 16:32:10 +00:00
parent 5b526e9574
commit 2ad7d02fa3
4 changed files with 27 additions and 2 deletions

View File

@ -113,6 +113,13 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
/* Create RshareSettings object */ /* Create RshareSettings object */
_settings = new RshareSettings(); _settings = new RshareSettings();
if (!_settings->value(QString::fromUtf8("FirstRun"), false).toBool())
{
_settings->setValue(QString::fromUtf8("FirstRun"), false);
QuickStartWizard *qstartWizard = new QuickStartWizard(this);
qstartWizard->exec();
}
setWindowTitle(tr("RetroShare %1 a secure decentralised commmunication platform").arg(retroshareVersion())); setWindowTitle(tr("RetroShare %1 a secure decentralised commmunication platform").arg(retroshareVersion()));
// Setting icons // Setting icons

View File

@ -60,6 +60,8 @@ GeneralPage::save(QString &errmsg)
_settings->setValue(QString::fromUtf8("ClosetoTray"), closetoTray()); _settings->setValue(QString::fromUtf8("ClosetoTray"), closetoTray());
_settings->setValue(QString::fromUtf8("FirstRun"), firstRun());
_settings->setRunRetroshareOnBoot( _settings->setRunRetroshareOnBoot(
ui.chkRunRetroshareAtSystemStartup->isChecked()); ui.chkRunRetroshareAtSystemStartup->isChecked());
@ -79,6 +81,9 @@ GeneralPage::load()
ui.checkClosetoTray->setChecked(_settings->value(QString::fromUtf8("ClosetoTray"), false).toBool()); ui.checkClosetoTray->setChecked(_settings->value(QString::fromUtf8("ClosetoTray"), false).toBool());
ui.checkBoxWizard->setChecked(_settings->value(QString::fromUtf8("FirstRun"), false).toBool());
} }
bool GeneralPage::quit() const { bool GeneralPage::quit() const {
@ -96,6 +101,11 @@ bool GeneralPage::closetoTray() const {
return ui.checkClosetoTray->isChecked(); return ui.checkClosetoTray->isChecked();
} }
bool GeneralPage::firstRun() const {
if(ui.checkBoxWizard->isChecked()) return true;
return ui.checkBoxWizard->isChecked();
}
/** Called when the "show on startup" checkbox is toggled. */ /** Called when the "show on startup" checkbox is toggled. */
void void
GeneralPage::toggleShowOnStartup(bool checked) GeneralPage::toggleShowOnStartup(bool checked)

View File

@ -50,6 +50,7 @@ public:
bool startMinimized() const; bool startMinimized() const;
bool closetoTray() const; bool closetoTray() const;
bool quit() const; bool quit() const;
bool firstRun() const;
private slots: private slots:

View File

@ -538,14 +538,14 @@
<string>Misc</string> <string>Misc</string>
</property> </property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="1" column="0">
<widget class="QCheckBox" name="checkQuit"> <widget class="QCheckBox" name="checkQuit">
<property name="text"> <property name="text">
<string>Do not show the Quit RetroShare MessageBox</string> <string>Do not show the Quit RetroShare MessageBox</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="2" column="0">
<widget class="QCheckBox" name="checkClosetoTray"> <widget class="QCheckBox" name="checkClosetoTray">
<property name="text"> <property name="text">
<string>Do not Minimize to Tray Icon</string> <string>Do not Minimize to Tray Icon</string>
@ -555,6 +555,13 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0">
<widget class="QCheckBox" name="checkBoxWizard">
<property name="text">
<string>Do not run Quick Start Wizard on RetroShare start</string>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>