From 09cb1beb1534a9146c1d7d9b4b7b64f7e76b0f4f Mon Sep 17 00:00:00 2001 From: Nikolay Tischenko Date: Sun, 27 Feb 2011 01:16:44 +0600 Subject: [PATCH] Online help and bugfixes. Version bump --- resources/someplayer_ru.ts | 57 +++++++++++++++++++++++++------------------- someplayer.pro | 2 +- src/aboutform.cpp | 24 +++++++++++++++++++ src/aboutform.h | 4 ++++ src/dbstorage.cpp | 2 +- src/libraryform.cpp | 1 + src/ui/aboutform.ui | 29 ++++++++++++++++++---- 7 files changed, 87 insertions(+), 32 deletions(-) diff --git a/resources/someplayer_ru.ts b/resources/someplayer_ru.ts index fd01b5a..797a6ef 100644 --- a/resources/someplayer_ru.ts +++ b/resources/someplayer_ru.ts @@ -10,8 +10,8 @@ - <b>SomePlayer 1.4.3</b> - <b>SomePlayer 1.4.3</b> + <b>SomePlayer 1.5.0</b> + <b>SomePlayer 1.5.0</b> @@ -27,10 +27,22 @@ By Nikolay Tischenko (somebody)</p><p align="center"><b - <p align="center"><b>Thanks to:</b></p> -<p align="center">MrClon (maemoworld.ru)<br>hxka (maemoworld.ru)<br>jerich0 (maemoworld.ru)<br>lknfox (maemoworld.ru)<br>fab (maemoworld.ru)<br>and other people who tested this player</p> - <p align="center"><b>Автор благодарен:</b></p> -<p align="center">MrClon (maemoworld.ru)<br>hxka (maemoworld.ru)<br>jerich0 (maemoworld.ru)<br>lknfox (maemoworld.ru)<br>fab (maemoworld.ru)<br>и всем другим, кто помогал в разработке и тестировании плеера</p> + <p align="center"> +<b>Thanks to:</b><br> +MrClon (maemoworld.ru)<br />hxka (maemoworld.ru)<br />jerich0 (maemoworld.ru)<br />lknfox (maemoworld.ru)<br />fab (maemoworld.ru)<br />Pantera1989m (github.com)<br />and other people who tested this player and helped in development</p> + <p align="center"> +<b>Автор благодарен:</b><br> +MrClon (maemoworld.ru)<br />hxka (maemoworld.ru)<br />jerich0 (maemoworld.ru)<br />lknfox (maemoworld.ru)<br />fab (maemoworld.ru)<br />Pantera1989m (github.com)<br />и всем кто помогал в разработке и тестировании плеера</p> + + + + Online help + Онлайн справка + + + + Donate + Donate @@ -337,7 +349,7 @@ By Nikolay Tischenko (somebody)</p><p align="center"><b - + Albums by "%1" Альбомы "%1" @@ -357,12 +369,12 @@ By Nikolay Tischenko (somebody)</p><p align="center"><b Треки в плейлисте "%1" - + Playlists Плейлисты - + Search in library Поиск в библиотеке @@ -511,65 +523,60 @@ By Nikolay Tischenko (somebody)</p><p align="center"><b <h3>Название</h3> - - + + 00:00 00:00 - + <b>Artist</b><br/>album <b>Исполнитель</b><br/>альбом - + Clear playlist Очистить плейлист - + Delete Удалить - - + + Add to favorites В избранное - + Enqueue В очередь - + Add to playlists Добавить в плейлисты - + Edit tags Редактировать теги - + Remove from favorites Удалить из избранного - - - Delete track? - Удалить трек? - PlaylistDialog diff --git a/someplayer.pro b/someplayer.pro index 26ec243..f91a66f 100644 --- a/someplayer.pro +++ b/someplayer.pro @@ -4,7 +4,7 @@ # #------------------------------------------------- -QT += core gui phonon sql dbus +QT += core gui phonon sql dbus webkit TARGET = someplayer TEMPLATE = app diff --git a/src/aboutform.cpp b/src/aboutform.cpp index ab1ddf3..2edb7dd 100644 --- a/src/aboutform.cpp +++ b/src/aboutform.cpp @@ -1,6 +1,8 @@ #include "aboutform.h" #include "ui_aboutform.h" #include "config.h" +#include +#include using namespace SomePlayer::Storage; @@ -13,6 +15,8 @@ AboutForm::AboutForm(QWidget *parent) : updateTranslations(); setAttribute(Qt::WA_Maemo5StackedWindow); setWindowFlags(Qt::Window | windowFlags()); + connect(ui->onlineHelpButton, SIGNAL(clicked()), this, SLOT(onlineHelp())); + ui->donateButton->hide(); } AboutForm::~AboutForm() @@ -29,3 +33,23 @@ void AboutForm::updateIcons() { void AboutForm::updateTranslations() { ui->retranslateUi(this); } + +void AboutForm::onlineHelp() { + Config config; + QWebView *view = new QWebView(this); + view->setAttribute(Qt::WA_Maemo5StackedWindow); + view->setWindowFlags(Qt::Window | view->windowFlags()); + QString lang = config.getValue("ui/language").toString(); + QString icons_theme = config.getValue("ui/iconstheme").toString(); + QColor background = palette().color(QPalette::Active, QPalette::Background); + QColor text = palette().color(QPalette::Active, QPalette::Text); + QString paramBg = QString("%1:%2:%3").arg(background.red()).arg(background.blue()).arg(background.green()); + QString paramText = QString("%1:%2:%3").arg(text.red()).arg(text.blue()).arg(text.green()); + QString url = QString("http://someplayer.some-body.ru/help.php?bg=%1&text=%2&lang=%3&iconstheme=%4") + .arg(paramBg).arg(paramText).arg(lang).arg(icons_theme); + view->load(QUrl(url)); + view->show(); +} + +void AboutForm::donate() { +} diff --git a/src/aboutform.h b/src/aboutform.h index 6fe2dc9..9b84946 100644 --- a/src/aboutform.h +++ b/src/aboutform.h @@ -20,6 +20,10 @@ public slots: void updateTranslations(); void updateIcons(); +private slots: + void onlineHelp(); + void donate(); + private: Ui::AboutForm *ui; QString _icons_theme; diff --git a/src/dbstorage.cpp b/src/dbstorage.cpp index 03755dd..171f2ae 100644 --- a/src/dbstorage.cpp +++ b/src/dbstorage.cpp @@ -72,7 +72,7 @@ void DbStorage::_prepare_queries() { "(SELECT tracks.id AS track_id, artist.name AS artist, title, count, source, tracks.album_id, length FROM " "tracks JOIN artist ON tracks.artist_id = artist.id) " "JOIN album ON album_id = album.id " - "WHERE count = 0"); + "WHERE count = 0 LIMIT 0, :max"); _get_recently_added_query = new QSqlQuery(db); _get_recently_added_query->prepare("SELECT track_id as id, title, artist, album.name as album, source, count, length FROM " diff --git a/src/libraryform.cpp b/src/libraryform.cpp index 74352b1..178f7df 100644 --- a/src/libraryform.cpp +++ b/src/libraryform.cpp @@ -281,6 +281,7 @@ void LibraryForm::_process_list_click(QModelIndex index) { case 2: //never played _current_playlist = _lib->getNeverPlayed(); _is_favorites = false; + break; case 3: //recently added _current_playlist = _lib->getRecentlyAdded(); _is_favorites = false; diff --git a/src/ui/aboutform.ui b/src/ui/aboutform.ui index a1adb69..4b636ac 100644 --- a/src/ui/aboutform.ui +++ b/src/ui/aboutform.ui @@ -32,9 +32,9 @@ 0 - 0 + -208 550 - 511 + 547 @@ -100,7 +100,7 @@ - <b>SomePlayer 1.4.3</b> + <b>SomePlayer 1.5.0</b> Qt::AlignCenter @@ -172,14 +172,33 @@ By Nikolay Tischenko (somebody)</p><p align="center"><b - <p align="center"><b>Thanks to:</b></p> -<p align="center">MrClon (maemoworld.ru)<br>hxka (maemoworld.ru)<br>jerich0 (maemoworld.ru)<br>lknfox (maemoworld.ru)<br>fab (maemoworld.ru)<br>and other people who tested this player</p> + <p align="center"> +<b>Thanks to:</b><br> +MrClon (maemoworld.ru)<br />hxka (maemoworld.ru)<br />jerich0 (maemoworld.ru)<br />lknfox (maemoworld.ru)<br />fab (maemoworld.ru)<br />Pantera1989m (github.com)<br />and other people who tested this player and helped in development</p> true + + + + + + Online help + + + + + + + Donate + + + + + -- 1.7.9.5