diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-06-02 21:55:22 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-06-02 21:55:22 +0000 |
commit | 0a4b576248a2d2e3c9e44289b6173ffad24c27e2 (patch) | |
tree | cbb94547de547dd5735c9c7252ed64de6e98777f /rbutil | |
parent | b4b5ab02cbb70abf5599f0dd6176eb4090fc3f4c (diff) | |
download | rockbox-0a4b576248a2d2e3c9e44289b6173ffad24c27e2.tar.gz rockbox-0a4b576248a2d2e3c9e44289b6173ffad24c27e2.zip |
Move constructing the themes info download link to rbutil.ini.
Instead of constructing the download link with fixed script name put a template
into the system info file. That way changing the download link doesn't require
changing the code anymore.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26495 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/base/systeminfo.cpp | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/systeminfo.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutil.ini | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/themesinstallwindow.cpp | 8 |
4 files changed, 7 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/systeminfo.cpp b/rbutil/rbutilqt/base/systeminfo.cpp index 72a62ac2fb..7c3114a591 100644 --- a/rbutil/rbutilqt/base/systeminfo.cpp +++ b/rbutil/rbutilqt/base/systeminfo.cpp | |||
@@ -45,6 +45,7 @@ const static struct { | |||
45 | { SystemInfo::ServerConfUrl, "server_conf_url", "" }, | 45 | { SystemInfo::ServerConfUrl, "server_conf_url", "" }, |
46 | { SystemInfo::GenlangUrl, "genlang_url", "" }, | 46 | { SystemInfo::GenlangUrl, "genlang_url", "" }, |
47 | { SystemInfo::ThemesUrl, "themes_url", "" }, | 47 | { SystemInfo::ThemesUrl, "themes_url", "" }, |
48 | { SystemInfo::ThemesInfoUrl, "themes_info_url", "" }, | ||
48 | { SystemInfo::RbutilUrl, "rbutil_url", "" }, | 49 | { SystemInfo::RbutilUrl, "rbutil_url", "" }, |
49 | { SystemInfo::BleedingInfo, "bleeding_info", "" }, | 50 | { SystemInfo::BleedingInfo, "bleeding_info", "" }, |
50 | { SystemInfo::CurPlatformName, ":platform:/name", "" }, | 51 | { SystemInfo::CurPlatformName, ":platform:/name", "" }, |
diff --git a/rbutil/rbutilqt/base/systeminfo.h b/rbutil/rbutilqt/base/systeminfo.h index fb5fa9e1ac..f79f34d5be 100644 --- a/rbutil/rbutilqt/base/systeminfo.h +++ b/rbutil/rbutilqt/base/systeminfo.h | |||
@@ -49,6 +49,7 @@ class SystemInfo : public QObject | |||
49 | ServerConfUrl, | 49 | ServerConfUrl, |
50 | GenlangUrl, | 50 | GenlangUrl, |
51 | ThemesUrl, | 51 | ThemesUrl, |
52 | ThemesInfoUrl, | ||
52 | RbutilUrl, | 53 | RbutilUrl, |
53 | BleedingInfo, | 54 | BleedingInfo, |
54 | CurPlatformName, | 55 | CurPlatformName, |
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini index 0acbba7cc9..bcef5d7d49 100644 --- a/rbutil/rbutilqt/rbutil.ini +++ b/rbutil/rbutilqt/rbutil.ini | |||
@@ -9,6 +9,7 @@ font_url=http://download.rockbox.org/daily/fonts/rockbox-fonts.zip | |||
9 | prog_name=rockbox | 9 | prog_name=rockbox |
10 | bootloader_url=http://download.rockbox.org/bootloader | 10 | bootloader_url=http://download.rockbox.org/bootloader |
11 | themes_url=http://themes.rockbox.org/ | 11 | themes_url=http://themes.rockbox.org/ |
12 | themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET% | ||
12 | manual_url=http://download.rockbox.org/daily/manual | 13 | manual_url=http://download.rockbox.org/daily/manual |
13 | doom_url=http://download.rockbox.org/useful/rockdoom.zip | 14 | doom_url=http://download.rockbox.org/useful/rockdoom.zip |
14 | voice_url=http://download.rockbox.org/daily/voices/ | 15 | voice_url=http://download.rockbox.org/daily/voices/ |
diff --git a/rbutil/rbutilqt/themesinstallwindow.cpp b/rbutil/rbutilqt/themesinstallwindow.cpp index 0f7ecef065..9a2c126ae8 100644 --- a/rbutil/rbutilqt/themesinstallwindow.cpp +++ b/rbutil/rbutilqt/themesinstallwindow.cpp | |||
@@ -63,10 +63,10 @@ void ThemesInstallWindow::downloadInfo() | |||
63 | qDebug() << "[Themes] downloading info to" << themesInfo.fileName(); | 63 | qDebug() << "[Themes] downloading info to" << themesInfo.fileName(); |
64 | themesInfo.close(); | 64 | themesInfo.close(); |
65 | 65 | ||
66 | QUrl url; | 66 | QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString(); |
67 | url = QUrl(SystemInfo::value(SystemInfo::ThemesUrl).toString() | 67 | infoUrl.replace("%TARGET%", |
68 | + "/rbutilqt.php?target=" | 68 | SystemInfo::value(SystemInfo::CurConfigureModel).toString()); |
69 | + SystemInfo::value(SystemInfo::CurConfigureModel).toString()); | 69 | QUrl url = QUrl(infoUrl); |
70 | qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems(); | 70 | qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems(); |
71 | if(RbSettings::value(RbSettings::CacheOffline).toBool()) | 71 | if(RbSettings::value(RbSettings::CacheOffline).toBool()) |
72 | getter->setCache(true); | 72 | getter->setCache(true); |