diff options
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r-- | rbutil/rbutilqt/rbutil.ini | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/themesinstallwindow.cpp | 17 |
2 files changed, 18 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini index 8fe6395d7c..9e9c872fdd 100644 --- a/rbutil/rbutilqt/rbutil.ini +++ b/rbutil/rbutilqt/rbutil.ini | |||
@@ -9,7 +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 | themes_info_url=http://themes.rockbox.org/rbutilqt.php?target=%TARGET%&release=%RELEASE%&revision=%REVISION%&rbutilver=%RBUTILVER% |
13 | manual_url=http://download.rockbox.org/daily/manual | 13 | manual_url=http://download.rockbox.org/daily/manual |
14 | doom_url=http://download.rockbox.org/useful/rockdoom.zip | 14 | doom_url=http://download.rockbox.org/useful/rockdoom.zip |
15 | 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 9a2c126ae8..935c703193 100644 --- a/rbutil/rbutilqt/themesinstallwindow.cpp +++ b/rbutil/rbutilqt/themesinstallwindow.cpp | |||
@@ -26,6 +26,8 @@ | |||
26 | #include "utils.h" | 26 | #include "utils.h" |
27 | #include "rbsettings.h" | 27 | #include "rbsettings.h" |
28 | #include "systeminfo.h" | 28 | #include "systeminfo.h" |
29 | #include "rockboxinfo.h" | ||
30 | #include "version.h" | ||
29 | 31 | ||
30 | ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent) | 32 | ThemesInstallWindow::ThemesInstallWindow(QWidget *parent) : QDialog(parent) |
31 | { | 33 | { |
@@ -58,6 +60,18 @@ void ThemesInstallWindow::downloadInfo() | |||
58 | { | 60 | { |
59 | // try to get the current build information | 61 | // try to get the current build information |
60 | getter = new HttpGet(this); | 62 | getter = new HttpGet(this); |
63 | RockboxInfo installInfo | ||
64 | = RockboxInfo(RbSettings::value(RbSettings::Mountpoint).toString()); | ||
65 | QString revision; | ||
66 | QString release; | ||
67 | // installInfo.version() holds either the revision (as r<revision>-<date>) | ||
68 | // or the release version number. | ||
69 | if(installInfo.version().startsWith("r")) { | ||
70 | revision = installInfo.version().remove("r").replace(QRegExp("-.+$"), ""); | ||
71 | } | ||
72 | else { | ||
73 | release = installInfo.version(); | ||
74 | } | ||
61 | 75 | ||
62 | themesInfo.open(); | 76 | themesInfo.open(); |
63 | qDebug() << "[Themes] downloading info to" << themesInfo.fileName(); | 77 | qDebug() << "[Themes] downloading info to" << themesInfo.fileName(); |
@@ -66,6 +80,9 @@ void ThemesInstallWindow::downloadInfo() | |||
66 | QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString(); | 80 | QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString(); |
67 | infoUrl.replace("%TARGET%", | 81 | infoUrl.replace("%TARGET%", |
68 | SystemInfo::value(SystemInfo::CurConfigureModel).toString()); | 82 | SystemInfo::value(SystemInfo::CurConfigureModel).toString()); |
83 | infoUrl.replace("%REVISION%", revision); | ||
84 | infoUrl.replace("%RELEASE%", release); | ||
85 | infoUrl.replace("%RBUTILVER%", VERSION); | ||
69 | QUrl url = QUrl(infoUrl); | 86 | QUrl url = QUrl(infoUrl); |
70 | qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems(); | 87 | qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems(); |
71 | if(RbSettings::value(RbSettings::CacheOffline).toBool()) | 88 | if(RbSettings::value(RbSettings::CacheOffline).toBool()) |