forked from len0rd/rockbox
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
This commit is contained in:
parent
ced4080bc3
commit
eb52a45a0c
4 changed files with 43 additions and 3 deletions
|
@ -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"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue