diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-22 11:19:41 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-11-22 14:43:01 +0100 |
commit | ba2bbd60bd3d8a9fa204b17686c33dfb0337b07c (patch) | |
tree | 1c2865adab8e956fe65180e56d87f8380754ba7a /rbutil | |
parent | 5f36aed4bfd5e78a9edc322b8dae2c1e10ff733d (diff) |
rbutil: Move Manual installation to main tab.
The manual tab didn't show the manual, so it's clearer to have that as
part of the main tab.
Also fixes the wrong manual getting downloaded for releases.
Change-Id: I5d4a287102af037f94f0de8464e025d9ff5f76ed
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/base/rbsettings.cpp | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/rbsettings.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/serverinfo.cpp | 20 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/serverinfo.h | 3 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/systeminfo.cpp | 20 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/manualwidget.cpp | 107 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/manualwidget.h | 42 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/manualwidgetfrm.ui | 116 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/selectiveinstallwidget.cpp | 64 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/selectiveinstallwidget.h | 7 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui | 167 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutil.ini | 6 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 8 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.h | 2 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pri | 3 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqtfrm.ui | 60 |
16 files changed, 201 insertions, 426 deletions
diff --git a/rbutil/rbutilqt/base/rbsettings.cpp b/rbutil/rbutilqt/base/rbsettings.cpp index 5baa53bee0..adb222f80e 100644 --- a/rbutil/rbutilqt/base/rbsettings.cpp +++ b/rbutil/rbutilqt/base/rbsettings.cpp @@ -48,6 +48,7 @@ const static struct { { RbSettings::InstallThemes, "install_themes", "false" }, { RbSettings::InstallGamefiles, "install_gamefiles", "true" }, { RbSettings::InstallVoice, "install_voice", "false" }, + { RbSettings::InstallManual, "install_manual", "false" }, #if defined(Q_OS_WIN32) { RbSettings::Tts, "tts", "sapi" }, #elif defined(Q_OS_MACX) diff --git a/rbutil/rbutilqt/base/rbsettings.h b/rbutil/rbutilqt/base/rbsettings.h index a25eabbcee..0060879fee 100644 --- a/rbutil/rbutilqt/base/rbsettings.h +++ b/rbutil/rbutilqt/base/rbsettings.h @@ -47,6 +47,7 @@ class RbSettings : public QObject InstallThemes, InstallGamefiles, InstallVoice, + InstallManual, Tts, UseTtsCorrections, TalkFolders, diff --git a/rbutil/rbutilqt/base/serverinfo.cpp b/rbutil/rbutilqt/base/serverinfo.cpp index 2f73d96beb..8b6707540e 100644 --- a/rbutil/rbutilqt/base/serverinfo.cpp +++ b/rbutil/rbutilqt/base/serverinfo.cpp @@ -42,9 +42,6 @@ const static struct { { ServerInfo::RelCandidateVersion, "release-candidate/:platform:", "" }, { ServerInfo::RelCandidateUrl, "release-candidate/:platform:", "" }, { ServerInfo::CurStatus, "status/:platform:", "-1" }, - { ServerInfo::ManualPdfUrl, "", "" }, - { ServerInfo::ManualHtmlUrl, "", "" }, - { ServerInfo::ManualZipUrl, "", "" }, { ServerInfo::BleedingRevision, "bleeding/rev", "" }, { ServerInfo::BleedingDate, "bleeding/timestamp", "" }, { ServerInfo::CurDevelUrl, "", "" }, @@ -111,23 +108,6 @@ QVariant ServerInfo::platformValue(enum ServerInfos info, QString platform) SystemInfo::BuildCurrent).toString() .replace("%MODEL%", platform); break; - case ManualPdfUrl: - case ManualZipUrl: - case ManualHtmlUrl: - { - QString url = SystemInfo::value(SystemInfo::ManualUrl).toString(); - QString modelman = SystemInfo::platformValue( - SystemInfo::Manual, platform).toString(); - url.replace("%MODEL%", modelman.isEmpty() ? platform : modelman); - if(info == ManualPdfUrl) - url.replace("%FORMAT%", ".pdf"); - else if(info == ManualZipUrl) - url.replace("%FORMAT%", "-html.zip"); - else if(info == ManualHtmlUrl) - url.replace("%FORMAT%", "/rockbox-build.html"); - value = url; - } - break; case BleedingDate: // TODO: get rid of this, it's location specific. value = QDateTime::fromString(value.toString(), diff --git a/rbutil/rbutilqt/base/serverinfo.h b/rbutil/rbutilqt/base/serverinfo.h index 9affcb6032..7b7e52beb7 100644 --- a/rbutil/rbutilqt/base/serverinfo.h +++ b/rbutil/rbutilqt/base/serverinfo.h @@ -41,9 +41,6 @@ class ServerInfo : public QObject CurStatus, CurReleaseUrl, CurDevelUrl, - ManualPdfUrl, - ManualHtmlUrl, - ManualZipUrl, BleedingRevision, BleedingDate, RelCandidateVersion, diff --git a/rbutil/rbutilqt/base/systeminfo.cpp b/rbutil/rbutilqt/base/systeminfo.cpp index 2ad3c7a7d4..b0837438cb 100644 --- a/rbutil/rbutilqt/base/systeminfo.cpp +++ b/rbutil/rbutilqt/base/systeminfo.cpp @@ -51,18 +51,18 @@ const static struct { const char* name; const char* def; } PlatformInfosList[] = { - { SystemInfo::PlatformName, ":platform:/name", "" }, - { SystemInfo::Manual, ":platform:/manualname","rockbox-:platform:" }, - { SystemInfo::BootloaderMethod, ":platform:/bootloadermethod", "none" }, - { SystemInfo::BootloaderName, ":platform:/bootloadername", "" }, - { SystemInfo::BootloaderFile, ":platform:/bootloaderfile", "" }, - { SystemInfo::BootloaderFilter, ":platform:/bootloaderfilter", "" }, - { SystemInfo::Encoder, ":platform:/encoder", "" }, - { SystemInfo::Brand, ":platform:/brand", "" }, - { SystemInfo::Name, ":platform:/name", "" }, + { SystemInfo::PlatformName, ":platform:/name", "" }, + { SystemInfo::Manual, ":platform:/manualname", ":platform:" }, + { SystemInfo::BootloaderMethod, ":platform:/bootloadermethod", "none" }, + { SystemInfo::BootloaderName, ":platform:/bootloadername", "" }, + { SystemInfo::BootloaderFile, ":platform:/bootloaderfile", "" }, + { SystemInfo::BootloaderFilter, ":platform:/bootloaderfilter", "" }, + { SystemInfo::Encoder, ":platform:/encoder", "" }, + { SystemInfo::Brand, ":platform:/brand", "" }, + { SystemInfo::Name, ":platform:/name", "" }, { SystemInfo::BuildserverModel, ":platform:/buildserver_modelname", "" }, { SystemInfo::ConfigureModel, ":platform:/configure_modelname", "" }, - { SystemInfo::PlayerPicture, ":platform:/playerpic", "" }, + { SystemInfo::PlayerPicture, ":platform:/playerpic", "" }, }; //! pointer to setting object to nullptr diff --git a/rbutil/rbutilqt/gui/manualwidget.cpp b/rbutil/rbutilqt/gui/manualwidget.cpp deleted file mode 100644 index c10288df10..0000000000 --- a/rbutil/rbutilqt/gui/manualwidget.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * Copyright (C) 2012 by Dominik Riebeling - * - * All files in this archive are subject to the GNU General Public License. - * See the file COPYING in the source tree root for full license agreement. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#include <QWidget> -#include <QMessageBox> -#include <QDebug> -#include "manualwidget.h" -#include "rbutilqt.h" -#include "rbsettings.h" -#include "serverinfo.h" -#include "systeminfo.h" -#include "Logger.h" - -ManualWidget::ManualWidget(QWidget *parent) : QWidget(parent) -{ - ui.setupUi(this); - ui.radioPdf->setChecked(true); - m_platform = RbSettings::value(RbSettings::Platform).toString(); - connect(ui.buttonDownloadManual, SIGNAL(clicked()), this, SLOT(downloadManual())); -} - - -void ManualWidget::updateManual() -{ - LOG_INFO() << "updating manual URLs"; - m_platform = RbSettings::value(RbSettings::Platform).toString(); - if(!m_platform.isEmpty()) - { - ui.labelPdfManual->setText(tr("<a href='%1'>PDF Manual</a>") - .arg(ServerInfo::instance()->platformValue(ServerInfo::ManualPdfUrl, m_platform).toString())); - ui.labelHtmlManual->setText(tr("<a href='%1'>HTML Manual (opens in browser)</a>") - .arg(ServerInfo::instance()->platformValue(ServerInfo::ManualHtmlUrl, m_platform).toString())); - } - else { - ui.labelPdfManual->setText(tr("Select a device for a link to the correct manual")); - ui.labelHtmlManual->setText(tr("<a href='%1'>Manual Overview</a>") - .arg("http://www.rockbox.org/manual.shtml")); - } -} - - -void ManualWidget::downloadManual(void) -{ - if(RbUtilQt::chkConfig(this)) { - return; - } - if(QMessageBox::question(this, tr("Confirm download"), - tr("Do you really want to download the manual? The manual will be saved " - "to the root folder of your player."), - QMessageBox::Yes | QMessageBox::No) != QMessageBox::Yes) { - return; - } - QString manual = ServerInfo::instance()->platformValue(ServerInfo::ManualPdfUrl).toString(); - - ProgressLoggerGui* logger = new ProgressLoggerGui(this); - logger->show(); - ZipInstaller *installer = new ZipInstaller(this); - installer->setMountPoint(RbSettings::value(RbSettings::Mountpoint).toString()); - if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) - installer->setCache(true); - - if(ui.radioPdf->isChecked()) { - installer->setUrl(ServerInfo::instance()->platformValue( - ServerInfo::ManualPdfUrl, m_platform).toString()); - installer->setLogSection("Manual (PDF)"); - } - else { - installer->setUrl(ServerInfo::instance()->platformValue( - ServerInfo::ManualZipUrl, m_platform).toString()); - installer->setLogSection("Manual (HTML)"); - } - installer->setLogVersion(); - installer->setUnzip(false); - - connect(installer, SIGNAL(logItem(QString, int)), logger, SLOT(addItem(QString, int))); - connect(installer, SIGNAL(logProgress(int, int)), logger, SLOT(setProgress(int, int))); - connect(installer, SIGNAL(done(bool)), logger, SLOT(setFinished())); - connect(logger, SIGNAL(aborted()), installer, SLOT(abort())); - installer->install(); -} - - -void ManualWidget::changeEvent(QEvent *e) -{ - if(e->type() == QEvent::LanguageChange) { - ui.retranslateUi(this); - updateManual(); - } else { - QWidget::changeEvent(e); - } -} - diff --git a/rbutil/rbutilqt/gui/manualwidget.h b/rbutil/rbutilqt/gui/manualwidget.h deleted file mode 100644 index d6095d3e14..0000000000 --- a/rbutil/rbutilqt/gui/manualwidget.h +++ /dev/null @@ -1,42 +0,0 @@ -/*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ - * - * Copyright (C) 2012 by Dominik Riebeling - * - * All files in this archive are subject to the GNU General Public License. - * See the file COPYING in the source tree root for full license agreement. - * - * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY - * KIND, either express or implied. - * - ****************************************************************************/ - -#ifndef MANUALWIDGET_H -#define MANUALWIDGET_H - -#include <QWidget> -#include "ui_manualwidgetfrm.h" - -class ManualWidget : public QWidget -{ - Q_OBJECT - public: - ManualWidget(QWidget *parent = nullptr); - - public slots: - void downloadManual(void); - void updateManual(); - - private: - void changeEvent(QEvent*); - Ui::ManualWidgetFrm ui; - QString m_platform; -}; - -#endif - diff --git a/rbutil/rbutilqt/gui/manualwidgetfrm.ui b/rbutil/rbutilqt/gui/manualwidgetfrm.ui deleted file mode 100644 index add26736c9..0000000000 --- a/rbutil/rbutilqt/gui/manualwidgetfrm.ui +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>ManualWidgetFrm</class> - <widget class="QWidget" name="ManualWidgetFrm"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>543</width> - <height>255</height> - </rect> - </property> - <property name="windowTitle"> - <string>Manual</string> - </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="0" column="0"> - <widget class="QGroupBox" name="groupBox_2"> - <property name="title"> - <string>Read the manual</string> - </property> - <layout class="QGridLayout"> - <item row="0" column="0"> - <widget class="QLabel" name="labelPdfManual"> - <property name="text"> - <string>PDF manual</string> - </property> - <property name="openExternalLinks"> - <bool>true</bool> - </property> - <property name="textInteractionFlags"> - <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="labelHtmlManual"> - <property name="text"> - <string>HTML manual</string> - </property> - <property name="openExternalLinks"> - <bool>true</bool> - </property> - <property name="textInteractionFlags"> - <set>Qt::LinksAccessibleByKeyboard|Qt::LinksAccessibleByMouse</set> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="1" column="0"> - <widget class="QGroupBox" name="groupBox"> - <property name="title"> - <string>Download the manual</string> - </property> - <layout class="QGridLayout" name="_2"> - <item row="0" column="0"> - <layout class="QVBoxLayout" name="_3"> - <item> - <widget class="QRadioButton" name="radioPdf"> - <property name="text"> - <string>&PDF version</string> - </property> - </widget> - </item> - <item> - <widget class="QRadioButton" name="radioHtmlzip"> - <property name="text"> - <string>&HTML version (zip file)</string> - </property> - </widget> - </item> - </layout> - </item> - <item row="0" column="1"> - <spacer> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="0" column="2"> - <widget class="QPushButton" name="buttonDownloadManual"> - <property name="text"> - <string>Down&load</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item row="2" column="0"> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <resources/> - <connections/> -</ui> diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp index 88b085e9b3..50017e65d4 100644 --- a/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp +++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.cpp @@ -40,6 +40,11 @@ SelectiveInstallWidget::SelectiveInstallWidget(QWidget* parent) : QWidget(parent ui.themesCheckbox->setChecked(RbSettings::value(RbSettings::InstallThemes).toBool()); ui.gamefileCheckbox->setChecked(RbSettings::value(RbSettings::InstallGamefiles).toBool()); ui.voiceCheckbox->setChecked(RbSettings::value(RbSettings::InstallVoice).toBool()); + ui.manualCheckbox->setChecked(RbSettings::value(RbSettings::InstallManual).toBool()); + + ui.manualCombobox->addItem("PDF", "pdf"); + ui.manualCombobox->addItem("HTML (zip)", "zip"); + ui.manualCombobox->addItem("HTML", "html"); // check if Rockbox is installed by looking after rockbox-info.txt. // If installed uncheck bootloader installation. @@ -201,6 +206,7 @@ void SelectiveInstallWidget::saveSettings(void) RbSettings::setValue(RbSettings::InstallThemes, ui.themesCheckbox->isChecked()); RbSettings::setValue(RbSettings::InstallGamefiles, ui.gamefileCheckbox->isChecked()); RbSettings::setValue(RbSettings::InstallVoice, ui.voiceCheckbox->isChecked()); + RbSettings::setValue(RbSettings::InstallManual, ui.manualCheckbox->isChecked()); RbSettings::setValue(RbSettings::VoiceLanguage, ui.voiceCombobox->currentData().toString()); } @@ -244,7 +250,7 @@ void SelectiveInstallWidget::continueInstall(bool error) if(error) { LOG_ERROR() << "Last part returned error."; m_logger->setFinished(); - m_installStage = 7; + m_installStage = 9; } m_installStage++; switch(m_installStage) { @@ -255,11 +261,12 @@ void SelectiveInstallWidget::continueInstall(bool error) case 4: installThemes(); break; case 5: installGamefiles(); break; case 6: installVoicefile(); break; - case 7: installBootloaderPost(); break; + case 7: installManual(); break; + case 8: installBootloaderPost(); break; default: break; } - if(m_installStage > 6) { + if(m_installStage > 8) { LOG_INFO() << "All install stages done."; m_logger->setFinished(); if(m_blmethod != "none") { @@ -548,6 +555,57 @@ void SelectiveInstallWidget::installVoicefile(void) } } +void SelectiveInstallWidget::installManual(void) +{ + if(ui.manualCheckbox->isChecked() && ui.manualCheckbox->isEnabled()) { + LOG_INFO() << "installing Manual"; + QString mantype = ui.manualCombobox->currentData().toString(); + + RockboxInfo installInfo(m_mountpoint); + QString manualurl; + QString logversion; + QString relversion = installInfo.release(); + if(m_buildtype != SystemInfo::BuildRelease) { + // release is empty for non-release versions (i.e. daily / current) + logversion = installInfo.release(); + } + + manualurl = SystemInfo::value(SystemInfo::ManualUrl, m_buildtype).toString(); + manualurl.replace("%RELVERSION%", m_versions[m_buildtype]); + QString model = SystemInfo::platformValue(SystemInfo::Manual, m_target).toString(); + if(model.isEmpty()) + model = m_target; + manualurl.replace("%MODEL%", model); + + if(mantype == "pdf") + manualurl.replace("%FORMAT%", ".pdf"); + else + manualurl.replace("%FORMAT%", "-html.zip"); + + // create new zip installer + if(m_zipinstaller != nullptr) m_zipinstaller->deleteLater(); + m_zipinstaller = new ZipInstaller(this); + m_zipinstaller->setUrl(manualurl); + m_zipinstaller->setLogSection("Manual Voice (" + mantype + ")"); + m_zipinstaller->setLogVersion(logversion); + m_zipinstaller->setMountPoint(m_mountpoint); + if(!RbSettings::value(RbSettings::CacheDisabled).toBool()) + m_zipinstaller->setCache(true); + // if type is html extract it. + m_zipinstaller->setUnzip(mantype == "html"); + + connect(m_zipinstaller, SIGNAL(done(bool)), this, SLOT(continueInstall(bool))); + connect(m_zipinstaller, SIGNAL(logItem(QString, int)), m_logger, SLOT(addItem(QString, int))); + connect(m_zipinstaller, SIGNAL(logProgress(int, int)), m_logger, SLOT(setProgress(int, int))); + connect(m_logger, SIGNAL(aborted()), m_zipinstaller, SLOT(abort())); + m_zipinstaller->install(); + } + else { + LOG_INFO() << "Manual install disabled."; + emit installSkipped(false); + } +} + void SelectiveInstallWidget::customizeThemes(void) { if(m_themesinstaller == nullptr) diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidget.h b/rbutil/rbutilqt/gui/selectiveinstallwidget.h index 38cce78a46..7a969a9e89 100644 --- a/rbutil/rbutilqt/gui/selectiveinstallwidget.h +++ b/rbutil/rbutilqt/gui/selectiveinstallwidget.h @@ -39,15 +39,18 @@ class SelectiveInstallWidget : public QWidget private slots: void continueInstall(bool); + void customizeThemes(void); + void selectedVersionChanged(int); + + private: void installBootloader(void); void installRockbox(void); void installFonts(void); void installVoicefile(void); + void installManual(void); void installThemes(void); void installGamefiles(void); void installBootloaderPost(void); - void customizeThemes(void); - void selectedVersionChanged(int); signals: void installSkipped(bool); diff --git a/rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui b/rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui index a5bb023f2e..06f2af92b8 100644 --- a/rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui +++ b/rbutil/rbutilqt/gui/selectiveinstallwidgetfrm.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>663</width> - <height>399</height> + <height>409</height> </rect> </property> <property name="sizePolicy"> @@ -54,6 +54,20 @@ <string>Rockbox components to install</string> </property> <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="0"> + <widget class="QCheckBox" name="bootloaderCheckbox"> + <property name="text"> + <string>&Bootloader</string> + </property> + <property name="icon"> + <iconset resource="../rbutilqt.qrc"> + <normaloff>:/icons/preferences-system.svg</normaloff>:/icons/preferences-system.svg</iconset> + </property> + <property name="checked"> + <bool>true</bool> + </property> + </widget> + </item> <item row="1" column="0"> <widget class="QCheckBox" name="rockboxCheckbox"> <property name="text"> @@ -68,8 +82,8 @@ </property> </widget> </item> - <item row="0" column="1"> - <widget class="QLabel" name="bootloaderLabel"> + <item row="3" column="2"> + <widget class="QLabel" name="themesLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <horstretch>0</horstretch> @@ -77,7 +91,7 @@ </sizepolicy> </property> <property name="text"> - <string>The bootloader is required for starting Rockbox. Only necessary for first time install.</string> + <string>Themes allow adjusting the user interface of Rockbox. Use "Customize" to select themes.</string> </property> <property name="wordWrap"> <bool>true</bool> @@ -95,33 +109,6 @@ </property> </widget> </item> - <item row="3" column="3"> - <widget class="QPushButton" name="themesCustomize"> - <property name="text"> - <string>Customize</string> - </property> - <property name="icon"> - <iconset resource="../rbutilqt.qrc"> - <normaloff>:/icons/preferences-system.svg</normaloff>:/icons/preferences-system.svg</iconset> - </property> - </widget> - </item> - <item row="1" column="2"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Minimum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>1</width> - <height>1</height> - </size> - </property> - </spacer> - </item> <item row="2" column="0"> <widget class="QCheckBox" name="fontsCheckbox"> <property name="text"> @@ -136,19 +123,8 @@ </property> </widget> </item> - <item row="6" column="0"> - <widget class="QCheckBox" name="gamefileCheckbox"> - <property name="text"> - <string>Game Files</string> - </property> - <property name="icon"> - <iconset resource="../rbutilqt.qrc"> - <normaloff>:/icons/input-gaming.svg</normaloff>:/icons/input-gaming.svg</iconset> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QLabel" name="themesLabel"> + <item row="0" column="2"> + <widget class="QLabel" name="bootloaderLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <horstretch>0</horstretch> @@ -156,15 +132,15 @@ </sizepolicy> </property> <property name="text"> - <string>Themes allow adjusting the user interface of Rockbox. Use "Customize" to select themes.</string> + <string>The bootloader is required for starting Rockbox. Only necessary for first time install.</string> </property> <property name="wordWrap"> <bool>true</bool> </property> </widget> </item> - <item row="2" column="1"> - <widget class="QLabel" name="fontsLabel"> + <item row="6" column="2"> + <widget class="QLabel" name="gameLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <horstretch>0</horstretch> @@ -172,31 +148,26 @@ </sizepolicy> </property> <property name="text"> - <string>Additional fonts for the User Interface.</string> + <string>Some game plugins require additional files.</string> </property> <property name="wordWrap"> <bool>true</bool> </property> </widget> </item> - <item row="6" column="1"> - <widget class="QLabel" name="gameLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> + <item row="3" column="4"> + <widget class="QPushButton" name="themesCustomize"> <property name="text"> - <string>Some game plugins require additional files.</string> + <string>Customize</string> </property> - <property name="wordWrap"> - <bool>true</bool> + <property name="icon"> + <iconset resource="../rbutilqt.qrc"> + <normaloff>:/icons/preferences-system.svg</normaloff>:/icons/preferences-system.svg</iconset> </property> </widget> </item> - <item row="1" column="1"> - <widget class="QLabel" name="rockboxLabel"> + <item row="2" column="2"> + <widget class="QLabel" name="fontsLabel"> <property name="sizePolicy"> <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <horstretch>0</horstretch> @@ -204,24 +175,55 @@ </sizepolicy> </property> <property name="text"> - <string>The main Rockbox firmware.</string> + <string>Additional fonts for the User Interface.</string> </property> <property name="wordWrap"> <bool>true</bool> </property> </widget> </item> - <item row="0" column="0"> - <widget class="QCheckBox" name="bootloaderCheckbox"> + <item row="7" column="2"> + <widget class="QLabel" name="voiceLabel"> <property name="text"> - <string>&Bootloader</string> + <string>Install prerendered voice file.</string> + </property> + </widget> + </item> + <item row="6" column="0"> + <widget class="QCheckBox" name="gamefileCheckbox"> + <property name="text"> + <string>Game Files</string> </property> <property name="icon"> <iconset resource="../rbutilqt.qrc"> - <normaloff>:/icons/preferences-system.svg</normaloff>:/icons/preferences-system.svg</iconset> + <normaloff>:/icons/input-gaming.svg</normaloff>:/icons/input-gaming.svg</iconset> </property> - <property name="checked"> - <bool>true</bool> + </widget> + </item> + <item row="1" column="3"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Minimum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>1</width> + <height>1</height> + </size> + </property> + </spacer> + </item> + <item row="8" column="0"> + <widget class="QCheckBox" name="manualCheckbox"> + <property name="text"> + <string>&Manual</string> + </property> + <property name="icon"> + <iconset resource="../rbutilqt.qrc"> + <normaloff>:/icons/edit-find.svg</normaloff>:/icons/edit-find.svg</iconset> </property> </widget> </item> @@ -236,15 +238,34 @@ </property> </widget> </item> - <item row="7" column="1"> - <widget class="QLabel" name="voiceLabel"> + <item row="7" column="4"> + <widget class="QComboBox" name="voiceCombobox"/> + </item> + <item row="1" column="2"> + <widget class="QLabel" name="rockboxLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> - <string>Install prerendered voice file.</string> + <string>The main Rockbox firmware.</string> + </property> + <property name="wordWrap"> + <bool>true</bool> </property> </widget> </item> - <item row="7" column="3"> - <widget class="QComboBox" name="voiceCombobox"/> + <item row="8" column="2"> + <widget class="QLabel" name="manualLabel"> + <property name="text"> + <string>Save a copy of the manual on the player.</string> + </property> + </widget> + </item> + <item row="8" column="4"> + <widget class="QComboBox" name="manualCombobox"/> </item> </layout> </widget> diff --git a/rbutil/rbutilqt/rbutil.ini b/rbutil/rbutilqt/rbutil.ini index f92d746614..0b5122ebc9 100644 --- a/rbutil/rbutilqt/rbutil.ini +++ b/rbutil/rbutilqt/rbutil.ini @@ -24,13 +24,13 @@ download_url=http://download.rockbox.org/bootloader build_url=https://download.rockbox.org/release/%RELVERSION%/rockbox-%MODEL%-%RELVERSION%.zip voice_url=https://download.rockbox.org/release/%RELVERSION%/%MODEL%-%RELVERSION%-%LANGUAGE%.zip font_url=https://download.rockbox.org/release/%RELVERSION%/rockbox-fonts-%RELVERSION%.zip -manual_url=https://download.rockbox.org/release/%RELVERSION%/rockbox-%MODEL%%FORMAT% +manual_url=https://download.rockbox.org/release/%RELVERSION%/rockbox-%MODEL%-%RELVERSION%%FORMAT% [release-candidate] build_url=https://download.rockbox.org/release-candidate/%RELVERSION%/rockbox-%MODEL%-%RELVERSION%.zip -voice_url=https://download.rockbox.org/release-candidate/%RELVERSION%/%MODEL%-%RELVERSION%-english.zip +voice_url=https://download.rockbox.org/release-candidate/%RELVERSION%/%MODEL%-%RELVERSION%-%LANGUAGE%.zip font_url=https://download.rockbox.org/release-candidate/%RELVERSION%/rockbox-fonts-%RELVERSION%.zip -manual_url=https://download.rockbox.org/release-candidate/%RELVERSION%/rockbox-%MODEL%%FORMAT% +manual_url=https://download.rockbox.org/release-candidate/%RELVERSION%/rockbox-%MODEL%-%RELVERSION%%FORMAT% [development] build_url=http://build.rockbox.org/data/rockbox-%MODEL%.zip diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index d996eddfe1..a250e4f252 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -38,7 +38,6 @@ #include "serverinfo.h" #include "systeminfo.h" #include "ziputil.h" -#include "manualwidget.h" #include "infowidget.h" #include "selectiveinstallwidget.h" #include "backupdialog.h" @@ -136,12 +135,6 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) m_gotInfo = false; m_auto = false; - // insert ManualWidget() widget in manual tab - QGridLayout *mantablayout = new QGridLayout(this); - ui.manual->setLayout(mantablayout); - manual = new ManualWidget(this); - mantablayout->addWidget(manual); - // selective "install" tab. QGridLayout *selectivetablayout = new QGridLayout(this); ui.selective->setLayout(selectivetablayout); @@ -358,7 +351,6 @@ void RbUtilQt::updateSettings() { LOG_INFO() << "updating current settings"; updateDevice(); - manual->updateManual(); QString c = RbSettings::value(RbSettings::CachePath).toString(); HttpGet::setGlobalCache(c.isEmpty() ? QDir::tempPath() : c); HttpGet::setGlobalProxy(proxy()); diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h index 91486e9a2d..41000b80f9 100644 --- a/rbutil/rbutilqt/rbutilqt.h +++ b/rbutil/rbutilqt/rbutilqt.h @@ -32,7 +32,6 @@ #include "zipinstaller.h" #include "progressloggergui.h" #include "bootloaderinstallbase.h" -#include "manualwidget.h" #include "infowidget.h" #include "selectiveinstallwidget.h" #include "backupdialog.h" @@ -47,7 +46,6 @@ class RbUtilQt : public QMainWindow static bool chkConfig(QWidget *parent = nullptr); private: - ManualWidget *manual; InfoWidget *info; SelectiveInstallWidget* selectiveinstallwidget; BackupDialog *backupdialog; diff --git a/rbutil/rbutilqt/rbutilqt.pri b/rbutil/rbutilqt/rbutilqt.pri index f622d1a0de..c8f60052c4 100644 --- a/rbutil/rbutilqt/rbutilqt.pri +++ b/rbutil/rbutilqt/rbutilqt.pri @@ -17,7 +17,6 @@ # common files SOURCES += \ - gui/manualwidget.cpp \ gui/infowidget.cpp \ rbutilqt.cpp \ main.cpp \ @@ -86,7 +85,6 @@ SOURCES += \ HEADERS += \ - gui/manualwidget.h \ gui/infowidget.h \ rbutilqt.h \ base/httpget.h \ @@ -178,7 +176,6 @@ HEADERS += \ FORMS += \ - gui/manualwidgetfrm.ui \ gui/infowidgetfrm.ui \ rbutilqtfrm.ui \ aboutbox.ui \ diff --git a/rbutil/rbutilqt/rbutilqtfrm.ui b/rbutil/rbutilqt/rbutilqtfrm.ui index 5fac1c6821..f0b18ea87a 100644 --- a/rbutil/rbutilqt/rbutilqtfrm.ui +++ b/rbutil/rbutilqt/rbutilqtfrm.ui @@ -19,6 +19,31 @@ </property> <widget class="QWidget" name="centralwidget"> <layout class="QGridLayout" name="gridLayout_3"> + <item row="0" column="0"> + <widget class="QLabel" name="logoLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="baseSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="text"> + <string comment="Welcome to Rockbox Utility, the installation and housekeeping tool for Rockbox."/> + </property> + <property name="pixmap"> + <pixmap resource="rbutilqt.qrc">:/icons/rblogo.png</pixmap> + </property> + <property name="scaledContents"> + <bool>false</bool> + </property> + </widget> + </item> <item row="0" column="1"> <widget class="QGroupBox" name="groupBoxDevice"> <property name="sizePolicy"> @@ -125,31 +150,6 @@ </layout> </widget> </item> - <item row="0" column="0"> - <widget class="QLabel" name="logoLabel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="baseSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="text"> - <string comment="Welcome to Rockbox Utility, the installation and housekeeping tool for Rockbox."/> - </property> - <property name="pixmap"> - <pixmap resource="rbutilqt.qrc">:/icons/rblogo.png</pixmap> - </property> - <property name="scaledContents"> - <bool>false</bool> - </property> - </widget> - </item> <item row="1" column="0" colspan="2"> <widget class="QTabWidget" name="tabWidget"> <property name="currentIndex"> @@ -388,14 +388,6 @@ </item> </layout> </widget> - <widget class="QWidget" name="manual"> - <attribute name="title"> - <string>&Manual</string> - </attribute> - <attribute name="toolTip"> - <string>View and download the manual</string> - </attribute> - </widget> <widget class="QWidget" name="info"> <attribute name="title"> <string>Inf&o</string> @@ -411,7 +403,7 @@ <x>0</x> <y>0</y> <width>650</width> - <height>23</height> + <height>22</height> </rect> </property> <widget class="QMenu" name="menu_File"> |