summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-06-02 21:55:22 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-06-02 21:55:22 +0000
commit0a4b576248a2d2e3c9e44289b6173ffad24c27e2 (patch)
treecbb94547de547dd5735c9c7252ed64de6e98777f /rbutil
parentb4b5ab02cbb70abf5599f0dd6176eb4090fc3f4c (diff)
downloadrockbox-0a4b576248a2d2e3c9e44289b6173ffad24c27e2.tar.gz
rockbox-0a4b576248a2d2e3c9e44289b6173ffad24c27e2.tar.bz2
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.cpp1
-rw-r--r--rbutil/rbutilqt/base/systeminfo.h1
-rw-r--r--rbutil/rbutilqt/rbutil.ini1
-rw-r--r--rbutil/rbutilqt/themesinstallwindow.cpp8
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 {
{ SystemInfo::ServerConfUrl, "server_conf_url", "" },
{ SystemInfo::GenlangUrl, "genlang_url", "" },
{ SystemInfo::ThemesUrl, "themes_url", "" },
+ { SystemInfo::ThemesInfoUrl, "themes_info_url", "" },
{ SystemInfo::RbutilUrl, "rbutil_url", "" },
{ SystemInfo::BleedingInfo, "bleeding_info", "" },
{ 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
ServerConfUrl,
GenlangUrl,
ThemesUrl,
+ ThemesInfoUrl,
RbutilUrl,
BleedingInfo,
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
prog_name=rockbox
bootloader_url=http://download.rockbox.org/bootloader
themes_url=http://themes.rockbox.org/
+themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET%
manual_url=http://download.rockbox.org/daily/manual
doom_url=http://download.rockbox.org/useful/rockdoom.zip
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()
qDebug() << "[Themes] downloading info to" << themesInfo.fileName();
themesInfo.close();
- QUrl url;
- url = QUrl(SystemInfo::value(SystemInfo::ThemesUrl).toString()
- + "/rbutilqt.php?target="
- + SystemInfo::value(SystemInfo::CurConfigureModel).toString());
+ QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString();
+ infoUrl.replace("%TARGET%",
+ SystemInfo::value(SystemInfo::CurConfigureModel).toString());
+ QUrl url = QUrl(infoUrl);
qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems();
if(RbSettings::value(RbSettings::CacheOffline).toBool())
getter->setCache(true);