summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2011-10-28 20:21:41 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2011-10-28 20:21:41 +0000
commitb7547e58680c32879392e424bdd70d1719d384b9 (patch)
tree40fa3d976eb5aa548e3f64bf0450f311fc1c302f /rbutil/rbutilqt
parentb8223d908bb96486f4e49463cc906246f4cdb7cd (diff)
downloadrockbox-b7547e58680c32879392e424bdd70d1719d384b9.tar.gz
rockbox-b7547e58680c32879392e424bdd70d1719d384b9.zip
Fix manual URL in Rockbox Utility (FS#12346)
Targets with special case URL for the manual (i.e. targets that share the manual with another target, f.e. h100 series) have been forgotten during the target renaming. Update those names and convert the manual URL handling to be template based. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30848 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r--rbutil/rbutilqt/rbutil.ini14
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp27
2 files changed, 23 insertions, 18 deletions
diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini
index edec2f6037..58c8510d1c 100644
--- a/rbutil/rbutilqt/rbutil.ini
+++ b/rbutil/rbutilqt/rbutil.ini
@@ -26,7 +26,7 @@ release_font_url=http://download.rockbox.org/release/%RELEASEVER%/rockbox-fonts-
daily_font_url=http://download.rockbox.org/daily/fonts/rockbox-fonts.zip
; other
-manual_url=http://download.rockbox.org/daily/manual
+manual_url=http://download.rockbox.org/daily/manual/%MANUALBASENAME%.%EXTENSION%
doom_url=http://download.rockbox.org/useful/rockdoom.zip
rbutil_url=http://download.rockbox.org/rbutil/
@@ -109,7 +109,7 @@ name="Jukebox Recorder 6 / 10 / 15 / 20 (with 8MiB memory)"
buildserver_modelname=archosrecorder8mb
bootloadermethod=none
bootloadername=
-manualname=rockbox-recorder
+manualname=recorder
brand=Archos
configure_modelname=archosrecorder
encoder=lame
@@ -139,7 +139,7 @@ name="Jukebox Recorder FM (with 8MiB memory)"
buildserver_modelname=archosfmrecorder8mb
bootloadermethod=none
bootloadername=
-manualname=rockbox-fmrecorder
+manualname=archosfmrecorder
brand=Archos
configure_modelname=archosfmrecorder
encoder=lame
@@ -170,7 +170,7 @@ buildserver_modelname=iriverh100
bootloadermethod=hex
bootloadername=/iriver/bootloader-h100.bin
bootloaderfile=/ihp_100.hex
-manualname=rockbox-h100
+manualname=iriverh100
brand=Iriver
usbid=0x10063001
configure_modelname=iriverh100
@@ -182,7 +182,7 @@ buildserver_modelname=iriverh120
bootloadermethod=hex
bootloadername=/iriver/bootloader-h120.bin
bootloaderfile=/ihp_120.hex
-manualname=rockbox-h100
+manualname=iriverh100
brand=Iriver
usbid=0x10063002
configure_modelname=iriverh120
@@ -194,7 +194,7 @@ buildserver_modelname=iriverh300
bootloadermethod=hex
bootloadername=/iriver/bootloader-h300.bin
bootloaderfile=/H300.hex
-manualname=rockbox-h300
+manualname=iriverh300
brand=Iriver
usbid=0x10063003
configure_modelname=iriverh300
@@ -322,7 +322,7 @@ name="Ipod Mini (2nd gen)"
buildserver_modelname=ipodmini2g
bootloadermethod=ipod
bootloadername=/ipod/bootloader-ipodmini2g.ipod
-manualname=rockbox-ipodmini1g
+manualname=ipodmini1g
brand=Apple
configure_modelname=ipodmini2g
encoder=rbspeex
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp
index 70b7e5fa47..ab86a16581 100644
--- a/rbutil/rbutilqt/rbutilqt.cpp
+++ b/rbutil/rbutilqt/rbutilqt.cpp
@@ -418,17 +418,22 @@ void RbUtilQt::updateManual()
{
if(RbSettings::value(RbSettings::Platform) != "")
{
- QString manual= SystemInfo::value(SystemInfo::CurManual).toString();
-
- if(manual == "")
- manual = "rockbox-"
- + SystemInfo::value(SystemInfo::CurBuildserverModel).toString();
- QString pdfmanual;
- pdfmanual = SystemInfo::value(SystemInfo::ManualUrl).toString()
- + "/" + manual + ".pdf";
- QString htmlmanual;
- htmlmanual = SystemInfo::value(SystemInfo::ManualUrl).toString()
- + "/" + manual + "/rockbox-build.html";
+ QString manual = SystemInfo::value(SystemInfo::CurManual).toString();
+ QString buildservermodel = SystemInfo::value(SystemInfo::CurBuildserverModel).toString();
+ QString pdfmanual = SystemInfo::value(SystemInfo::ManualUrl).toString();
+ QString htmlmanual = pdfmanual;
+
+ pdfmanual.replace("%EXTENSION%", "pdf");
+ htmlmanual.replace("%EXTENSION%", "html");
+ if(manual.isEmpty()) {
+ pdfmanual.replace("%MANUALBASENAME%", "rockbox-" + buildservermodel);
+ htmlmanual.replace("%MANUALBASENAME%", "rockbox-" + buildservermodel + "/rockbox-build");
+ }
+ else {
+ pdfmanual.replace("%MANUALBASENAME%", "rockbox-" + manual);
+ htmlmanual.replace("%MANUALBASENAME%", "rockbox-" + manual + "/rockbox-build");
+ }
+
ui.labelPdfManual->setText(tr("<a href='%1'>PDF Manual</a>")
.arg(pdfmanual));
ui.labelHtmlManual->setText(tr("<a href='%1'>HTML Manual (opens in browser)</a>")