forked from len0rd/rockbox
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
This commit is contained in:
parent
b4b5ab02cb
commit
0a4b576248
4 changed files with 7 additions and 4 deletions
|
|
@ -45,6 +45,7 @@ const static struct {
|
||||||
{ SystemInfo::ServerConfUrl, "server_conf_url", "" },
|
{ SystemInfo::ServerConfUrl, "server_conf_url", "" },
|
||||||
{ SystemInfo::GenlangUrl, "genlang_url", "" },
|
{ SystemInfo::GenlangUrl, "genlang_url", "" },
|
||||||
{ SystemInfo::ThemesUrl, "themes_url", "" },
|
{ SystemInfo::ThemesUrl, "themes_url", "" },
|
||||||
|
{ SystemInfo::ThemesInfoUrl, "themes_info_url", "" },
|
||||||
{ SystemInfo::RbutilUrl, "rbutil_url", "" },
|
{ SystemInfo::RbutilUrl, "rbutil_url", "" },
|
||||||
{ SystemInfo::BleedingInfo, "bleeding_info", "" },
|
{ SystemInfo::BleedingInfo, "bleeding_info", "" },
|
||||||
{ SystemInfo::CurPlatformName, ":platform:/name", "" },
|
{ SystemInfo::CurPlatformName, ":platform:/name", "" },
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ class SystemInfo : public QObject
|
||||||
ServerConfUrl,
|
ServerConfUrl,
|
||||||
GenlangUrl,
|
GenlangUrl,
|
||||||
ThemesUrl,
|
ThemesUrl,
|
||||||
|
ThemesInfoUrl,
|
||||||
RbutilUrl,
|
RbutilUrl,
|
||||||
BleedingInfo,
|
BleedingInfo,
|
||||||
CurPlatformName,
|
CurPlatformName,
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ font_url=http://download.rockbox.org/daily/fonts/rockbox-fonts.zip
|
||||||
prog_name=rockbox
|
prog_name=rockbox
|
||||||
bootloader_url=http://download.rockbox.org/bootloader
|
bootloader_url=http://download.rockbox.org/bootloader
|
||||||
themes_url=http://themes.rockbox.org/
|
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
|
manual_url=http://download.rockbox.org/daily/manual
|
||||||
doom_url=http://download.rockbox.org/useful/rockdoom.zip
|
doom_url=http://download.rockbox.org/useful/rockdoom.zip
|
||||||
voice_url=http://download.rockbox.org/daily/voices/
|
voice_url=http://download.rockbox.org/daily/voices/
|
||||||
|
|
|
||||||
|
|
@ -63,10 +63,10 @@ void ThemesInstallWindow::downloadInfo()
|
||||||
qDebug() << "[Themes] downloading info to" << themesInfo.fileName();
|
qDebug() << "[Themes] downloading info to" << themesInfo.fileName();
|
||||||
themesInfo.close();
|
themesInfo.close();
|
||||||
|
|
||||||
QUrl url;
|
QString infoUrl = SystemInfo::value(SystemInfo::ThemesInfoUrl).toString();
|
||||||
url = QUrl(SystemInfo::value(SystemInfo::ThemesUrl).toString()
|
infoUrl.replace("%TARGET%",
|
||||||
+ "/rbutilqt.php?target="
|
SystemInfo::value(SystemInfo::CurConfigureModel).toString());
|
||||||
+ SystemInfo::value(SystemInfo::CurConfigureModel).toString());
|
QUrl url = QUrl(infoUrl);
|
||||||
qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems();
|
qDebug() << "[Themes] Info URL:" << url << "Query:" << url.queryItems();
|
||||||
if(RbSettings::value(RbSettings::CacheOffline).toBool())
|
if(RbSettings::value(RbSettings::CacheOffline).toBool())
|
||||||
getter->setCache(true);
|
getter->setCache(true);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue