diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-07-18 00:39:40 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-18 00:39:40 +0000 |
| commit | eb52a45a0c1f42386dbc0e148e81972ae3878b71 (patch) | |
| tree | 28e33cf907e90ab9e3868fe2c1528a65b5d80adb /utils/themeeditor/gui/editorwindow.cpp | |
| parent | ced4080bc3a4de9788da135add5b2a150a7f94d6 (diff) | |
| download | rockbox-eb52a45a0c1f42386dbc0e148e81972ae3878b71.zip rockbox-eb52a45a0c1f42386dbc0e148e81972ae3878b71.tar.gz rockbox-eb52a45a0c1f42386dbc0e148e81972ae3878b71.tar.bz2 rockbox-eb52a45a0c1f42386dbc0e148e81972ae3878b71.tar.xz | |
Theme Editor: If a pr project specifies a valid #target value, its settings are now loaded into the device configuration panel when the theme is loaded
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27476 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/gui/editorwindow.cpp')
| -rw-r--r-- | utils/themeeditor/gui/editorwindow.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/utils/themeeditor/gui/editorwindow.cpp b/utils/themeeditor/gui/editorwindow.cpp index b5eea63..57de723 100644 --- a/utils/themeeditor/gui/editorwindow.cpp +++ b/utils/themeeditor/gui/editorwindow.cpp @@ -728,6 +728,28 @@ void EditorWindow::loadProjectFile(QString fileName) project = new ProjectModel(fileName, this); ui->projectTree->setModel(project); + /* Setting target info if necessary */ + TargetData targets; + QString target = project->getSetting("#target", ""); + if(target != "" && targets.index(target) >= 0) + { + int index = targets.index(target); + + QRect screen = targets.screenSize(index); + deviceConfig->setData("screenwidth", screen.width()); + deviceConfig->setData("screenheight", screen.height()); + + if(targets.remoteDepth(index) != TargetData::None) + { + QRect remote = targets.remoteSize(index); + deviceConfig->setData("remotewidth", remote.width()); + deviceConfig->setData("remoteheight", remote.height()); + } + + deviceConfig->setData("tp", targets.fm(index)); + deviceConfig->setData("Rp", targets.canRecord(index)); + } + if(project->getSetting("#screenwidth") != "") deviceConfig->setData("screenwidth", project->getSetting("#screenwidth")); |