Skip to content

Commit 1d71b1d

Browse files
committed
Show prefs dialog at end
1 parent 094ba33 commit 1d71b1d

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

src/Interface/Application/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ SET(Interface_Application_FORMS
104104
Module.ui
105105
ModuleLogWindow.ui
106106
ConnectionStyleWizardPage.ui
107+
OtherSettingsWizardPage.ui
107108
NetworkSearch.ui
108109
NoteEditor.ui
109110
Preferences.ui

src/Interface/Application/MainWindowCollaborators.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,21 @@ namespace Gui {
179179
Q_OBJECT
180180
public:
181181
explicit NewUserWizard(QWidget* parent);
182+
~NewUserWizard();
183+
public Q_SLOTS:
184+
void setShowPrefs(int state);
182185
private Q_SLOTS:
183186
void updatePathLabel(const QString& dir);
187+
void showPrefs();
184188
private:
185189
QWizardPage* createIntroPage();
186190
QWizardPage* createPathSettingPage();
187191
QWizardPage* createLicensePage();
188192
QWizardPage* createConnectionChoicePage();
189193
QWizardPage* createDocPage();
194+
QWizardPage* createOtherSettingsPage();
190195
QLineEdit* pathWidget_;
196+
bool showPrefs_{ false };
191197
};
192198
}
193199
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>OtherSettingsWizardPage</class>
4+
<widget class="QWizardPage" name="OtherSettingsWizardPage">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>270</width>
10+
<height>90</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>WizardPage</string>
15+
</property>
16+
<property name="title">
17+
<string>Other settings</string>
18+
</property>
19+
<layout class="QGridLayout" name="gridLayout">
20+
<item row="0" column="0">
21+
<widget class="QCheckBox" name="saveBeforeExecuteCheckBox_">
22+
<property name="text">
23+
<string>Save network before executing</string>
24+
</property>
25+
</widget>
26+
</item>
27+
<item row="1" column="0">
28+
<widget class="QLabel" name="label">
29+
<property name="text">
30+
<string>For all options, check the preferences screen:</string>
31+
</property>
32+
</widget>
33+
</item>
34+
<item row="2" column="0">
35+
<widget class="QCheckBox" name="loadPreferencesCheckBox_">
36+
<property name="text">
37+
<string>Load Preferences after setup complete</string>
38+
</property>
39+
</widget>
40+
</item>
41+
</layout>
42+
</widget>
43+
<resources/>
44+
<connections/>
45+
</ui>

src/Interface/Application/SCIRunMainWindow.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1503,7 +1503,7 @@ void SCIRunMainWindow::addToDataDirectory(const QString& dir)
15031503

15041504
void SCIRunMainWindow::setDataDirectoryFromGUI()
15051505
{
1506-
auto dir = QFileDialog::getExistingDirectory(this, tr("Choose Data Directory"), ".");
1506+
auto dir = QFileDialog::getExistingDirectory(this, tr("Choose Data Directory"), QString::fromStdString(Core::Preferences::Instance().dataDirectory().parent_path().string()));
15071507
setDataDirectory(dir);
15081508
}
15091509

0 commit comments

Comments
 (0)