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.tar.gz rockbox-7c52284b294cb33bc2e5d747e2e3c14d8ab937ae.zip |
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 70d231988b..b44f1e67b3 100644 --- a/utils/themeeditor/models/targetdata.cpp +++ b/utils/themeeditor/models/targetdata.cpp | |||
@@ -22,11 +22,17 @@ | |||
22 | #include "targetdata.h" | 22 | #include "targetdata.h" |
23 | 23 | ||
24 | #include <QStringList> | 24 | #include <QStringList> |
25 | #include <QSettings> | ||
25 | 26 | ||
26 | const QString TargetData::reserved = "{}:#\n"; | 27 | const QString TargetData::reserved = "{}:#\n"; |
27 | 28 | ||
28 | TargetData::TargetData(QString file) | 29 | TargetData::TargetData() |
29 | { | 30 | { |
31 | QSettings settings; | ||
32 | settings.beginGroup("TargetData"); | ||
33 | QString file = settings.value("targetDbPath", "").toString(); | ||
34 | settings.endGroup(); | ||
35 | |||
30 | if(!QFile::exists(file)) | 36 | if(!QFile::exists(file)) |
31 | file = ":/targets/targetdb"; | 37 | file = ":/targets/targetdb"; |
32 | 38 | ||
@@ -132,7 +138,8 @@ TargetData::TargetData(QString file) | |||
132 | /* Checking for the closing '}' and adding the entry */ | 138 | /* Checking for the closing '}' and adding the entry */ |
133 | if(require('}', data, cursor)) | 139 | if(require('}', data, cursor)) |
134 | { | 140 | { |
135 | entries.append(Entry(name, size, depth, rSize, rDepth, fm, record)); | 141 | entries.append(Entry(id, name, size, depth, rSize, rDepth, |
142 | fm, record)); | ||
136 | indices.insert(id, index); | 143 | indices.insert(id, index); |
137 | index++; | 144 | index++; |
138 | } | 145 | } |