summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/rbutilqt.cpp
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/rbutilqt.cpp
parentb8223d908bb96486f4e49463cc906246f4cdb7cd (diff)
downloadrockbox-b7547e58680c32879392e424bdd70d1719d384b9.tar.gz
rockbox-b7547e58680c32879392e424bdd70d1719d384b9.tar.bz2
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/rbutilqt.cpp')
-rw-r--r--rbutil/rbutilqt/rbutilqt.cpp27
1 files changed, 16 insertions, 11 deletions
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>")