summaryrefslogtreecommitdiff
path: root/utils/themeeditor/gui
diff options
context:
space:
mode:
Diffstat (limited to 'utils/themeeditor/gui')
-rw-r--r--utils/themeeditor/gui/editorwindow.cpp1
-rw-r--r--utils/themeeditor/gui/newprojectdialog.cpp43
-rw-r--r--utils/themeeditor/gui/newprojectdialog.h1
3 files changed, 44 insertions, 1 deletions
diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp
index 043c08badd..b5eea633f9 100644
--- a/utils/themeeditor/gui/editorwindow.cpp
+++ b/utils/themeeditor/gui/editorwindow.cpp
@@ -332,6 +332,7 @@ void EditorWindow::newProject()
332 332
333 /* Generating the config file */ 333 /* Generating the config file */
334 QString config = tr("# Config file for ") + info.name + "\n"; 334 QString config = tr("# Config file for ") + info.name + "\n";
335 config.append("#target: " + info.target + "\n\n");
335 QString wpsBase = "/.rockbox/wps/"; 336 QString wpsBase = "/.rockbox/wps/";
336 if(info.sbs) 337 if(info.sbs)
337 config.append("sbs: " + wpsBase + info.name + ".sbs\n"); 338 config.append("sbs: " + wpsBase + info.name + ".sbs\n");
diff --git a/utils/themeeditor/gui/newprojectdialog.cpp b/utils/themeeditor/gui/newprojectdialog.cpp
index 0df3250c5b..2e9cbd609c 100644
--- a/utils/themeeditor/gui/newprojectdialog.cpp
+++ b/utils/themeeditor/gui/newprojectdialog.cpp
@@ -49,10 +49,13 @@ NewProjectDialog::NewProjectDialog(QWidget *parent) :
49 { 49 {
50 ui->targetBox->insertItem(i, QIcon(), targets.name(i), targets.id(i)); 50 ui->targetBox->insertItem(i, QIcon(), targets.name(i), targets.id(i));
51 } 51 }
52 targetChange(0);
52 53
53 /* Connecting the browse button */ 54 /* Connecting the browse button and target box */
54 QObject::connect(ui->browseButton, SIGNAL(clicked()), 55 QObject::connect(ui->browseButton, SIGNAL(clicked()),
55 this, SLOT(browse())); 56 this, SLOT(browse()));
57 QObject::connect(ui->targetBox, SIGNAL(currentIndexChanged(int)),
58 this, SLOT(targetChange(int)));
56} 59}
57 60
58NewProjectDialog::~NewProjectDialog() 61NewProjectDialog::~NewProjectDialog()
@@ -114,3 +117,41 @@ void NewProjectDialog::browse()
114 ui->locationBox->text()); 117 ui->locationBox->text());
115 ui->locationBox->setText(path); 118 ui->locationBox->setText(path);
116} 119}
120
121void NewProjectDialog::targetChange(int target)
122{
123 TargetData targets;
124
125 if(targets.fm(target))
126 {
127 ui->fmsBox->setEnabled(true);
128 ui->rfmsBox->setEnabled(true);
129 }
130 else
131 {
132 ui->fmsBox->setChecked(false);
133 ui->rfmsBox->setChecked(false);
134
135 ui->fmsBox->setEnabled(false);
136 ui->rfmsBox->setEnabled(false);
137 }
138
139 if(targets.remoteDepth(target) == TargetData::None)
140 {
141 ui->rwpsBox->setChecked(false);
142 ui->rsbsBox->setChecked(false);
143 ui->rfmsBox->setChecked(false);
144
145 ui->rsbsBox->setEnabled(false);
146 ui->rwpsBox->setEnabled(false);
147 ui->rfmsBox->setEnabled(false);
148 }
149 else
150 {
151 ui->rsbsBox->setEnabled(true);
152 ui->rwpsBox->setEnabled(true);
153 if(targets.fm(target))
154 ui->rfmsBox->setEnabled(true);
155 }
156
157}
diff --git a/utils/themeeditor/gui/newprojectdialog.h b/utils/themeeditor/gui/newprojectdialog.h
index 6a54a133bc..7d1a710a1d 100644
--- a/utils/themeeditor/gui/newprojectdialog.h
+++ b/utils/themeeditor/gui/newprojectdialog.h
@@ -88,6 +88,7 @@ public slots:
88 88
89private slots: 89private slots:
90 void browse(); 90 void browse();
91 void targetChange(int target);
91 92
92private: 93private:
93 Ui::NewProjectDialog *ui; 94 Ui::NewProjectDialog *ui;