diff options
| author | Robert Bieber <robby@bieberphoto.com> | 2010-07-21 07:45:29 +0000 |
|---|---|---|
| committer | Robert Bieber <robby@bieberphoto.com> | 2010-07-21 07:45:29 +0000 |
| commit | 7c52284b294cb33bc2e5d747e2e3c14d8ab937ae (patch) | |
| tree | ba7bbf82a8ca0852deee158068330365f0f97e97 /utils/themeeditor/models/targetdata.cpp | |
| parent | b72f475d44cf83c10c99eaf765b1c55cfdc00bb0 (diff) | |
| download | rockbox-7c52284b294cb33bc2e5d747e2e3c14d8ab937ae.zip rockbox-7c52284b294cb33bc2e5d747e2e3c14d8ab937ae.tar.gz rockbox-7c52284b294cb33bc2e5d747e2e3c14d8ab937ae.tar.bz2 rockbox-7c52284b294cb33bc2e5d747e2e3c14d8ab937ae.tar.xz | |
Theme Editor: Implemented download and decompression of font pack in the preferences dialog. Dialog will also allow the user to set a directory for a custom target database, but the update button doesn't work yet. Also fixed the file filters for open file/open project actions and resized the preferences dialog
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27509 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/themeeditor/models/targetdata.cpp')
| -rw-r--r-- | utils/themeeditor/models/targetdata.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/utils/themeeditor/models/targetdata.cpp b/utils/themeeditor/models/targetdata.cpp index 70d2319..b44f1e6 100644 --- a/utils/themeeditor/models/targetdata.cpp +++ b/utils/themeeditor/models/targetdata.cpp @@ -22,11 +22,17 @@ #include "targetdata.h" #include <QStringList> +#include <QSettings> const QString TargetData::reserved = "{}:#\n"; -TargetData::TargetData(QString file) +TargetData::TargetData() { + QSettings settings; + settings.beginGroup("TargetData"); + QString file = settings.value("targetDbPath", "").toString(); + settings.endGroup(); + if(!QFile::exists(file)) file = ":/targets/targetdb"; @@ -132,7 +138,8 @@ TargetData::TargetData(QString file) /* Checking for the closing '}' and adding the entry */ if(require('}', data, cursor)) { - entries.append(Entry(name, size, depth, rSize, rDepth, fm, record)); + entries.append(Entry(id, name, size, depth, rSize, rDepth, + fm, record)); indices.insert(id, index); index++; } |