diff options
-rw-r--r-- | rbutil/rbutilqt/base/rbsettings.cpp | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/rbsettings.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/changelog.txt | 17 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/changelog.cpp | 70 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/changelog.h | 40 | ||||
-rw-r--r-- | rbutil/rbutilqt/gui/changelogfrm.ui | 60 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 14 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.h | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pri | 3 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.qrc | 1 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqtfrm.ui | 8 |
11 files changed, 215 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/base/rbsettings.cpp b/rbutil/rbutilqt/base/rbsettings.cpp index 4d3901fce3..a2f801844b 100644 --- a/rbutil/rbutilqt/base/rbsettings.cpp +++ b/rbutil/rbutilqt/base/rbsettings.cpp | |||
@@ -31,6 +31,7 @@ const static struct { | |||
31 | const char* def; | 31 | const char* def; |
32 | } UserSettingsList[] = { | 32 | } UserSettingsList[] = { |
33 | { RbSettings::RbutilVersion, "rbutil_version", "" }, | 33 | { RbSettings::RbutilVersion, "rbutil_version", "" }, |
34 | { RbSettings::ShowChangelog, "show_changelog", "false" }, | ||
34 | { RbSettings::CurrentPlatform, "platform", "" }, | 35 | { RbSettings::CurrentPlatform, "platform", "" }, |
35 | { RbSettings::Mountpoint, "mountpoint", "" }, | 36 | { RbSettings::Mountpoint, "mountpoint", "" }, |
36 | { RbSettings::CachePath, "cachepath", "" }, | 37 | { RbSettings::CachePath, "cachepath", "" }, |
diff --git a/rbutil/rbutilqt/base/rbsettings.h b/rbutil/rbutilqt/base/rbsettings.h index 7255def5f0..7406aab1ad 100644 --- a/rbutil/rbutilqt/base/rbsettings.h +++ b/rbutil/rbutilqt/base/rbsettings.h | |||
@@ -31,6 +31,7 @@ class RbSettings : public QObject | |||
31 | //! All user settings | 31 | //! All user settings |
32 | enum UserSettings { | 32 | enum UserSettings { |
33 | RbutilVersion, | 33 | RbutilVersion, |
34 | ShowChangelog, | ||
34 | CurrentPlatform, | 35 | CurrentPlatform, |
35 | Mountpoint, | 36 | Mountpoint, |
36 | CachePath, | 37 | CachePath, |
diff --git a/rbutil/rbutilqt/changelog.txt b/rbutil/rbutilqt/changelog.txt new file mode 100644 index 0000000000..35c5322dc9 --- /dev/null +++ b/rbutil/rbutilqt/changelog.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | # Rockbox Utility changelog. | ||
2 | # This file is parsed by Rockbox Utility. Format: | ||
3 | # - Lines starting with # are comments and ignored. | ||
4 | # - A version starts with the string "Version" followed by the number. | ||
5 | # - After the version individual entries follow. Those start with a *. | ||
6 | # - After the entries an empty line has to follow. | ||
7 | # - After that the next version can start. | ||
8 | |||
9 | Version 1.4 | ||
10 | * Rework player detection functionality to provide better results. | ||
11 | * Limit mountpoints ("Select your device in the filesystem") in configuration dialog to usable ones. | ||
12 | * Change encoder volume configuration to allow more sensible values. | ||
13 | * Save proxy password differently in configuration file (better solution for FS#12166). | ||
14 | * Add support for building Rockbox Utility with Qt5. | ||
15 | * Add Changelog window. | ||
16 | |||
17 | |||
diff --git a/rbutil/rbutilqt/gui/changelog.cpp b/rbutil/rbutilqt/gui/changelog.cpp new file mode 100644 index 0000000000..d8361023b1 --- /dev/null +++ b/rbutil/rbutilqt/gui/changelog.cpp | |||
@@ -0,0 +1,70 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2013 by Dominik Riebeling | ||
10 | * | ||
11 | * All files in this archive are subject to the GNU General Public License. | ||
12 | * See the file COPYING in the source tree root for full license agreement. | ||
13 | * | ||
14 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
15 | * KIND, either express or implied. | ||
16 | * | ||
17 | ****************************************************************************/ | ||
18 | |||
19 | #include "changelog.h" | ||
20 | #include "rbsettings.h" | ||
21 | #include "ui_changelogfrm.h" | ||
22 | |||
23 | Changelog::Changelog(QWidget *parent) : QDialog(parent) | ||
24 | { | ||
25 | ui.setupUi(this); | ||
26 | ui.browserChangelog->setOpenExternalLinks(true); | ||
27 | ui.browserChangelog->setHtml(parseChangelogFile(":/docs/changelog.txt")); | ||
28 | ui.browserChangelog->moveCursor(QTextCursor::Start, QTextCursor::MoveAnchor); | ||
29 | ui.checkBoxShowAlways->setChecked(RbSettings::value(RbSettings::ShowChangelog).toBool()); | ||
30 | connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept())); | ||
31 | } | ||
32 | |||
33 | |||
34 | void Changelog::accept(void) | ||
35 | { | ||
36 | RbSettings::setValue(RbSettings::ShowChangelog, ui.checkBoxShowAlways->isChecked()); | ||
37 | this->hide(); | ||
38 | this->deleteLater(); | ||
39 | } | ||
40 | |||
41 | |||
42 | QString Changelog::parseChangelogFile(QString filename) | ||
43 | { | ||
44 | QFile changelog(filename); | ||
45 | changelog.open(QIODevice::ReadOnly); | ||
46 | QTextStream c(&changelog); | ||
47 | QString text; | ||
48 | while(!c.atEnd()) { | ||
49 | QString line = c.readLine(); | ||
50 | if(line.startsWith("#")) | ||
51 | continue; | ||
52 | if(line.startsWith("Version")) { | ||
53 | text.append(QString("<h4>Rockbox Utility %1</h4>").arg(line.remove("Version"))); | ||
54 | line = c.readLine(); | ||
55 | text.append("<ul>"); | ||
56 | while(line.startsWith("*")) { | ||
57 | QString t = line.remove(QRegExp("^\\*")); | ||
58 | t.replace(QRegExp("FS#(\\d+)"), | ||
59 | "<a href='http://www.rockbox.org/tracker/task/\\1'>FS#\\1</a>"); | ||
60 | text.append(QString("<li>%1</li>").arg(t)); | ||
61 | line = c.readLine(); | ||
62 | if(line.startsWith("#")) | ||
63 | line = c.readLine(); | ||
64 | } | ||
65 | text.append("</ul>"); | ||
66 | } | ||
67 | } | ||
68 | changelog.close(); | ||
69 | return text; | ||
70 | } | ||
diff --git a/rbutil/rbutilqt/gui/changelog.h b/rbutil/rbutilqt/gui/changelog.h new file mode 100644 index 0000000000..103a3bc9fb --- /dev/null +++ b/rbutil/rbutilqt/gui/changelog.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * | ||
9 | * Copyright (C) 2013 by Dominik Riebeling | ||
10 | * | ||
11 | * All files in this archive are subject to the GNU General Public License. | ||
12 | * See the file COPYING in the source tree root for full license agreement. | ||
13 | * | ||
14 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
15 | * KIND, either express or implied. | ||
16 | * | ||
17 | ****************************************************************************/ | ||
18 | |||
19 | #ifndef CHANGELOG_H | ||
20 | #define CHANGELOG_H | ||
21 | |||
22 | #include <QDialog> | ||
23 | #include "ui_changelogfrm.h" | ||
24 | |||
25 | class Changelog : public QDialog | ||
26 | { | ||
27 | Q_OBJECT | ||
28 | public: | ||
29 | Changelog(QWidget *parent = 0); | ||
30 | |||
31 | public slots: | ||
32 | void accept(void); | ||
33 | |||
34 | private: | ||
35 | QString parseChangelogFile(QString filename); | ||
36 | Ui::Changelog ui; | ||
37 | |||
38 | }; | ||
39 | |||
40 | #endif | ||
diff --git a/rbutil/rbutilqt/gui/changelogfrm.ui b/rbutil/rbutilqt/gui/changelogfrm.ui new file mode 100644 index 0000000000..83763d84d9 --- /dev/null +++ b/rbutil/rbutilqt/gui/changelogfrm.ui | |||
@@ -0,0 +1,60 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <ui version="4.0"> | ||
3 | <class>Changelog</class> | ||
4 | <widget class="QDialog" name="Changelog"> | ||
5 | <property name="windowModality"> | ||
6 | <enum>Qt::WindowModal</enum> | ||
7 | </property> | ||
8 | <property name="geometry"> | ||
9 | <rect> | ||
10 | <x>0</x> | ||
11 | <y>0</y> | ||
12 | <width>400</width> | ||
13 | <height>300</height> | ||
14 | </rect> | ||
15 | </property> | ||
16 | <property name="windowTitle"> | ||
17 | <string>Changelog</string> | ||
18 | </property> | ||
19 | <layout class="QGridLayout" name="gridLayout"> | ||
20 | <item row="0" column="0" colspan="3"> | ||
21 | <widget class="QTextBrowser" name="browserChangelog"/> | ||
22 | </item> | ||
23 | <item row="1" column="1"> | ||
24 | <spacer name="horizontalSpacer"> | ||
25 | <property name="orientation"> | ||
26 | <enum>Qt::Horizontal</enum> | ||
27 | </property> | ||
28 | <property name="sizeHint" stdset="0"> | ||
29 | <size> | ||
30 | <width>40</width> | ||
31 | <height>20</height> | ||
32 | </size> | ||
33 | </property> | ||
34 | </spacer> | ||
35 | </item> | ||
36 | <item row="1" column="0"> | ||
37 | <widget class="QCheckBox" name="checkBoxShowAlways"> | ||
38 | <property name="text"> | ||
39 | <string>Show on startup</string> | ||
40 | </property> | ||
41 | </widget> | ||
42 | </item> | ||
43 | <item row="1" column="2"> | ||
44 | <widget class="QPushButton" name="buttonOk"> | ||
45 | <property name="text"> | ||
46 | <string>&Ok</string> | ||
47 | </property> | ||
48 | <property name="icon"> | ||
49 | <iconset resource="../rbutilqt.qrc"> | ||
50 | <normaloff>:/icons/go-next.png</normaloff>:/icons/go-next.png</iconset> | ||
51 | </property> | ||
52 | </widget> | ||
53 | </item> | ||
54 | </layout> | ||
55 | </widget> | ||
56 | <resources> | ||
57 | <include location="../rbutilqt.qrc"/> | ||
58 | </resources> | ||
59 | <connections/> | ||
60 | </ui> | ||
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index 6703b08791..f83020050a 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "infowidget.h" | 42 | #include "infowidget.h" |
43 | #include "selectiveinstallwidget.h" | 43 | #include "selectiveinstallwidget.h" |
44 | #include "backupdialog.h" | 44 | #include "backupdialog.h" |
45 | #include "changelog.h" | ||
45 | 46 | ||
46 | #include "progressloggerinterface.h" | 47 | #include "progressloggerinterface.h" |
47 | 48 | ||
@@ -166,6 +167,7 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) | |||
166 | connect(ui.actionUninstall_Rockbox, SIGNAL(triggered()), this, SLOT(uninstall())); | 167 | connect(ui.actionUninstall_Rockbox, SIGNAL(triggered()), this, SLOT(uninstall())); |
167 | connect(ui.action_System_Info, SIGNAL(triggered()), this, SLOT(sysinfo())); | 168 | connect(ui.action_System_Info, SIGNAL(triggered()), this, SLOT(sysinfo())); |
168 | connect(ui.action_Trace, SIGNAL(triggered()), this, SLOT(trace())); | 169 | connect(ui.action_Trace, SIGNAL(triggered()), this, SLOT(trace())); |
170 | connect(ui.actionShow_Changelog, SIGNAL(triggered()), this, SLOT(changelog())); | ||
169 | 171 | ||
170 | #if !defined(STATIC) | 172 | #if !defined(STATIC) |
171 | ui.actionInstall_Rockbox_Utility_on_player->setEnabled(false); | 173 | ui.actionInstall_Rockbox_Utility_on_player->setEnabled(false); |
@@ -204,6 +206,14 @@ void RbUtilQt::sysinfo(void) | |||
204 | sysinfo.exec(); | 206 | sysinfo.exec(); |
205 | } | 207 | } |
206 | 208 | ||
209 | void RbUtilQt::changelog(void) | ||
210 | { | ||
211 | |||
212 | Changelog cl(this); | ||
213 | cl.exec(); | ||
214 | } | ||
215 | |||
216 | |||
207 | void RbUtilQt::updateTabs(int count) | 217 | void RbUtilQt::updateTabs(int count) |
208 | { | 218 | { |
209 | if(count == ui.tabWidget->indexOf(info->parentWidget())) | 219 | if(count == ui.tabWidget->indexOf(info->parentWidget())) |
@@ -317,6 +327,10 @@ void RbUtilQt::updateSettings() | |||
317 | HttpGet::setGlobalCache(c.isEmpty() ? QDir::tempPath() : c); | 327 | HttpGet::setGlobalCache(c.isEmpty() ? QDir::tempPath() : c); |
318 | HttpGet::setGlobalProxy(proxy()); | 328 | HttpGet::setGlobalProxy(proxy()); |
319 | 329 | ||
330 | if(RbSettings::value(RbSettings::RbutilVersion) != PUREVERSION | ||
331 | || RbSettings::value(RbSettings::ShowChangelog).toBool()) { | ||
332 | changelog(); | ||
333 | } | ||
320 | if(RbSettings::value(RbSettings::RbutilVersion) != PUREVERSION) { | 334 | if(RbSettings::value(RbSettings::RbutilVersion) != PUREVERSION) { |
321 | QApplication::processEvents(); | 335 | QApplication::processEvents(); |
322 | QMessageBox::information(this, tr("New installation"), | 336 | QMessageBox::information(this, tr("New installation"), |
diff --git a/rbutil/rbutilqt/rbutilqt.h b/rbutil/rbutilqt/rbutilqt.h index 350aca1956..cfbef8b1fc 100644 --- a/rbutil/rbutilqt/rbutilqt.h +++ b/rbutil/rbutilqt/rbutilqt.h | |||
@@ -78,6 +78,7 @@ class RbUtilQt : public QMainWindow | |||
78 | void about(void); | 78 | void about(void); |
79 | void help(void); | 79 | void help(void); |
80 | void sysinfo(void); | 80 | void sysinfo(void); |
81 | void changelog(void); | ||
81 | void trace(void); | 82 | void trace(void); |
82 | void eject(void); | 83 | void eject(void); |
83 | void configDialog(void); | 84 | void configDialog(void); |
diff --git a/rbutil/rbutilqt/rbutilqt.pri b/rbutil/rbutilqt/rbutilqt.pri index 13f7ebc042..8ec961a50f 100644 --- a/rbutil/rbutilqt/rbutilqt.pri +++ b/rbutil/rbutilqt/rbutilqt.pri | |||
@@ -79,6 +79,7 @@ SOURCES += \ | |||
79 | gui/comboboxviewdelegate.cpp \ | 79 | gui/comboboxviewdelegate.cpp \ |
80 | gui/selectiveinstallwidget.cpp \ | 80 | gui/selectiveinstallwidget.cpp \ |
81 | gui/backupdialog.cpp \ | 81 | gui/backupdialog.cpp \ |
82 | gui/changelog.cpp | ||
82 | 83 | ||
83 | 84 | ||
84 | HEADERS += \ | 85 | HEADERS += \ |
@@ -156,6 +157,7 @@ HEADERS += \ | |||
156 | gui/comboboxviewdelegate.h \ | 157 | gui/comboboxviewdelegate.h \ |
157 | gui/selectiveinstallwidget.h \ | 158 | gui/selectiveinstallwidget.h \ |
158 | gui/backupdialog.h \ | 159 | gui/backupdialog.h \ |
160 | gui/changelog.h | ||
159 | 161 | ||
160 | 162 | ||
161 | FORMS += \ | 163 | FORMS += \ |
@@ -174,6 +176,7 @@ FORMS += \ | |||
174 | systracefrm.ui \ | 176 | systracefrm.ui \ |
175 | gui/selectiveinstallwidgetfrm.ui \ | 177 | gui/selectiveinstallwidgetfrm.ui \ |
176 | gui/backupdialogfrm.ui \ | 178 | gui/backupdialogfrm.ui \ |
179 | gui/changelogfrm.ui | ||
177 | 180 | ||
178 | 181 | ||
179 | TRANSLATIONS += \ | 182 | TRANSLATIONS += \ |
diff --git a/rbutil/rbutilqt/rbutilqt.qrc b/rbutil/rbutilqt/rbutilqt.qrc index 9358383bdd..b38fa95b4d 100644 --- a/rbutil/rbutilqt/rbutilqt.qrc +++ b/rbutil/rbutilqt/rbutilqt.qrc | |||
@@ -3,6 +3,7 @@ | |||
3 | <file>../../docs/CREDITS</file> | 3 | <file>../../docs/CREDITS</file> |
4 | <file>../../docs/gpl-2.0.html</file> | 4 | <file>../../docs/gpl-2.0.html</file> |
5 | <file alias="docs/COPYING.SPEEX">../../lib/rbcodec/codecs/libspeex/COPYING</file> | 5 | <file alias="docs/COPYING.SPEEX">../../lib/rbcodec/codecs/libspeex/COPYING</file> |
6 | <file alias="docs/changelog.txt">changelog.txt</file> | ||
6 | </qresource> | 7 | </qresource> |
7 | <qresource> | 8 | <qresource> |
8 | <file alias="builtin/VOICE_PAUSE.wav">../../tools/VOICE_PAUSE.wav</file> | 9 | <file alias="builtin/VOICE_PAUSE.wav">../../tools/VOICE_PAUSE.wav</file> |
diff --git a/rbutil/rbutilqt/rbutilqtfrm.ui b/rbutil/rbutilqt/rbutilqtfrm.ui index 65348dabfb..9960ca3dcf 100644 --- a/rbutil/rbutilqt/rbutilqtfrm.ui +++ b/rbutil/rbutilqt/rbutilqtfrm.ui | |||
@@ -411,7 +411,7 @@ | |||
411 | <x>0</x> | 411 | <x>0</x> |
412 | <y>0</y> | 412 | <y>0</y> |
413 | <width>650</width> | 413 | <width>650</width> |
414 | <height>21</height> | 414 | <height>23</height> |
415 | </rect> | 415 | </rect> |
416 | </property> | 416 | </property> |
417 | <widget class="QMenu" name="menu_File"> | 417 | <widget class="QMenu" name="menu_File"> |
@@ -437,6 +437,7 @@ | |||
437 | <addaction name="action_About"/> | 437 | <addaction name="action_About"/> |
438 | <addaction name="actionAbout_Qt"/> | 438 | <addaction name="actionAbout_Qt"/> |
439 | <addaction name="separator"/> | 439 | <addaction name="separator"/> |
440 | <addaction name="actionShow_Changelog"/> | ||
440 | <addaction name="menu_Troubleshoot"/> | 441 | <addaction name="menu_Troubleshoot"/> |
441 | <addaction name="action_Help"/> | 442 | <addaction name="action_Help"/> |
442 | </widget> | 443 | </widget> |
@@ -657,6 +658,11 @@ | |||
657 | <string>&Installation</string> | 658 | <string>&Installation</string> |
658 | </property> | 659 | </property> |
659 | </action> | 660 | </action> |
661 | <action name="actionShow_Changelog"> | ||
662 | <property name="text"> | ||
663 | <string>Show &Changelog</string> | ||
664 | </property> | ||
665 | </action> | ||
660 | </widget> | 666 | </widget> |
661 | <tabstops> | 667 | <tabstops> |
662 | <tabstop>tabWidget</tabstop> | 668 | <tabstop>tabWidget</tabstop> |