Online help and bugfixes. Version bump 1.5.0
authorNikolay Tischenko <niktischenko@gmail.com>
Sat, 26 Feb 2011 19:16:44 +0000 (01:16 +0600)
committerNikolay Tischenko <niktischenko@gmail.com>
Sat, 26 Feb 2011 19:16:44 +0000 (01:16 +0600)
resources/someplayer_ru.ts
someplayer.pro
src/aboutform.cpp
src/aboutform.h
src/dbstorage.cpp
src/libraryform.cpp
src/ui/aboutform.ui

index fd01b5a..797a6ef 100644 (file)
@@ -10,8 +10,8 @@
     </message>
     <message>
         <location filename="../src/ui/aboutform.ui" line="103"/>
-        <source>&lt;b&gt;SomePlayer 1.4.3&lt;/b&gt; </source>
-        <translation>&lt;b&gt;SomePlayer 1.4.3&lt;/b&gt; </translation>
+        <source>&lt;b&gt;SomePlayer 1.5.0&lt;/b&gt; </source>
+        <translation>&lt;b&gt;SomePlayer 1.5.0&lt;/b&gt;</translation>
     </message>
     <message>
         <location filename="../src/ui/aboutform.ui" line="128"/>
@@ -27,10 +27,22 @@ By Nikolay Tischenko (somebody)&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;b
     </message>
     <message>
         <location filename="../src/ui/aboutform.ui" line="175"/>
-        <source>&lt;p align=&quot;center&quot;&gt;&lt;b&gt;Thanks to:&lt;/b&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot;&gt;MrClon (maemoworld.ru)&lt;br&gt;hxka (maemoworld.ru)&lt;br&gt;jerich0 (maemoworld.ru)&lt;br&gt;lknfox (maemoworld.ru)&lt;br&gt;fab (maemoworld.ru)&lt;br&gt;and other people who tested this player&lt;/p&gt;</source>
-        <translation>&lt;p align=&quot;center&quot;&gt;&lt;b&gt;Автор благодарен:&lt;/b&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot;&gt;MrClon (maemoworld.ru)&lt;br&gt;hxka (maemoworld.ru)&lt;br&gt;jerich0 (maemoworld.ru)&lt;br&gt;lknfox (maemoworld.ru)&lt;br&gt;fab (maemoworld.ru)&lt;br&gt;и всем другим, кто помогал в разработке и тестировании плеера&lt;/p&gt;</translation>
+        <source>&lt;p align=&quot;center&quot;&gt;
+&lt;b&gt;Thanks to:&lt;/b&gt;&lt;br&gt;
+MrClon (maemoworld.ru)&lt;br /&gt;hxka (maemoworld.ru)&lt;br /&gt;jerich0 (maemoworld.ru)&lt;br /&gt;lknfox (maemoworld.ru)&lt;br /&gt;fab (maemoworld.ru)&lt;br /&gt;Pantera1989m (github.com)&lt;br /&gt;and other people who tested this player and helped in development&lt;/p&gt;</source>
+        <translation>&lt;p align=&quot;center&quot;&gt;
+&lt;b&gt;Автор благодарен:&lt;/b&gt;&lt;br&gt;
+MrClon (maemoworld.ru)&lt;br /&gt;hxka (maemoworld.ru)&lt;br /&gt;jerich0 (maemoworld.ru)&lt;br /&gt;lknfox (maemoworld.ru)&lt;br /&gt;fab (maemoworld.ru)&lt;br /&gt;Pantera1989m (github.com)&lt;br /&gt;и всем кто помогал в разработке и тестировании плеера&lt;/p&gt;</translation>
+    </message>
+    <message>
+        <location filename="../src/ui/aboutform.ui" line="189"/>
+        <source>Online help</source>
+        <translation>Онлайн справка</translation>
+    </message>
+    <message>
+        <location filename="../src/ui/aboutform.ui" line="196"/>
+        <source>Donate</source>
+        <translation>Donate</translation>
     </message>
 </context>
 <context>
@@ -337,7 +349,7 @@ By Nikolay Tischenko (somebody)&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;b
     </message>
     <message>
         <location filename="../src/libraryform.cpp" line="226"/>
-        <location filename="../src/libraryform.cpp" line="414"/>
+        <location filename="../src/libraryform.cpp" line="415"/>
         <source>Albums by &quot;%1&quot;</source>
         <translation>Альбомы &quot;%1&quot;</translation>
     </message>
@@ -357,12 +369,12 @@ By Nikolay Tischenko (somebody)&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;b
         <translation>Треки в плейлисте &quot;%1&quot;</translation>
     </message>
     <message>
-        <location filename="../src/libraryform.cpp" line="438"/>
+        <location filename="../src/libraryform.cpp" line="439"/>
         <source>Playlists</source>
         <translation>Плейлисты</translation>
     </message>
     <message>
-        <location filename="../src/libraryform.cpp" line="816"/>
+        <location filename="../src/libraryform.cpp" line="817"/>
         <source>Search in library</source>
         <translation>Поиск в библиотеке</translation>
     </message>
@@ -511,65 +523,60 @@ By Nikolay Tischenko (somebody)&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;b
         <translation>&lt;h3&gt;Название&lt;/h3&gt;</translation>
     </message>
     <message>
-        <location filename="../src/ui/playerform.ui" line="535"/>
-        <location filename="../src/ui/playerform.ui" line="555"/>
+        <location filename="../src/ui/playerform.ui" line="538"/>
+        <location filename="../src/ui/playerform.ui" line="558"/>
         <source>00:00</source>
         <translation>00:00</translation>
     </message>
     <message>
-        <location filename="../src/ui/playerform.ui" line="631"/>
+        <location filename="../src/ui/playerform.ui" line="634"/>
         <source>&lt;b&gt;Artist&lt;/b&gt;&lt;br/&gt;album</source>
         <translation>&lt;b&gt;Исполнитель&lt;/b&gt;&lt;br/&gt;альбом</translation>
     </message>
     <message>
         <location filename="../src/playerform.cpp" line="91"/>
-        <location filename="../src/playerform.cpp" line="762"/>
+        <location filename="../src/playerform.cpp" line="771"/>
         <source>Clear playlist</source>
         <translation>Очистить плейлист</translation>
     </message>
     <message>
         <location filename="../src/playerform.cpp" line="92"/>
-        <location filename="../src/playerform.cpp" line="763"/>
+        <location filename="../src/playerform.cpp" line="772"/>
         <source>Delete</source>
         <translation>Удалить</translation>
     </message>
     <message>
         <location filename="../src/playerform.cpp" line="93"/>
         <location filename="../src/playerform.cpp" line="239"/>
-        <location filename="../src/playerform.cpp" line="314"/>
-        <location filename="../src/playerform.cpp" line="764"/>
+        <location filename="../src/playerform.cpp" line="279"/>
+        <location filename="../src/playerform.cpp" line="773"/>
         <source>Add to favorites</source>
         <translation>В избранное</translation>
     </message>
     <message>
         <location filename="../src/playerform.cpp" line="94"/>
-        <location filename="../src/playerform.cpp" line="765"/>
+        <location filename="../src/playerform.cpp" line="774"/>
         <source>Enqueue</source>
         <translation>В очередь</translation>
     </message>
     <message>
         <location filename="../src/playerform.cpp" line="95"/>
-        <location filename="../src/playerform.cpp" line="766"/>
+        <location filename="../src/playerform.cpp" line="775"/>
         <source>Add to playlists</source>
         <translation>Добавить в плейлисты</translation>
     </message>
     <message>
         <location filename="../src/playerform.cpp" line="96"/>
-        <location filename="../src/playerform.cpp" line="767"/>
+        <location filename="../src/playerform.cpp" line="776"/>
         <source>Edit tags</source>
         <translation>Редактировать теги</translation>
     </message>
     <message>
         <location filename="../src/playerform.cpp" line="239"/>
-        <location filename="../src/playerform.cpp" line="314"/>
+        <location filename="../src/playerform.cpp" line="279"/>
         <source>Remove from favorites</source>
         <translation>Удалить из избранного</translation>
     </message>
-    <message>
-        <location filename="../src/playerform.cpp" line="275"/>
-        <source>Delete track?</source>
-        <translation>Удалить трек?</translation>
-    </message>
 </context>
 <context>
     <name>PlaylistDialog</name>
index 26ec243..f91a66f 100644 (file)
@@ -4,7 +4,7 @@
 #
 #-------------------------------------------------
 
-QT       += core gui phonon sql dbus
+QT       += core gui phonon sql dbus webkit
 
 TARGET = someplayer
 TEMPLATE = app
index ab1ddf3..2edb7dd 100644 (file)
@@ -1,6 +1,8 @@
 #include "aboutform.h"
 #include "ui_aboutform.h"
 #include "config.h"
+#include <QWebView>
+#include <QDebug>
 
 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() {
+}
index 6fe2dc9..9b84946 100644 (file)
@@ -20,6 +20,10 @@ public slots:
        void updateTranslations();
        void updateIcons();
 
+private slots:
+       void onlineHelp();
+       void donate();
+
 private:
        Ui::AboutForm *ui;
        QString _icons_theme;
index 03755dd..171f2ae 100644 (file)
@@ -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 "
index 74352b1..178f7df 100644 (file)
@@ -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;
index a1adb69..4b636ac 100644 (file)
@@ -32,9 +32,9 @@
       <property name="geometry">
        <rect>
         <x>0</x>
-        <y>0</y>
+        <y>-208</y>
         <width>550</width>
-        <height>511</height>
+        <height>547</height>
        </rect>
       </property>
       <layout class="QVBoxLayout" name="verticalLayout">
          <item row="1" column="0" colspan="3">
           <widget class="QLabel" name="nameLabel">
            <property name="text">
-            <string>&lt;b&gt;SomePlayer 1.4.3&lt;/b&gt; </string>
+            <string>&lt;b&gt;SomePlayer 1.5.0&lt;/b&gt; </string>
            </property>
            <property name="alignment">
             <set>Qt::AlignCenter</set>
@@ -172,14 +172,33 @@ By Nikolay Tischenko (somebody)&lt;/p&gt;&lt;p align=&quot;center&quot;&gt;&lt;b
        <item>
         <widget class="QLabel" name="thanksToLabel">
          <property name="text">
-          <string>&lt;p align=&quot;center&quot;&gt;&lt;b&gt;Thanks to:&lt;/b&gt;&lt;/p&gt;
-&lt;p align=&quot;center&quot;&gt;MrClon (maemoworld.ru)&lt;br&gt;hxka (maemoworld.ru)&lt;br&gt;jerich0 (maemoworld.ru)&lt;br&gt;lknfox (maemoworld.ru)&lt;br&gt;fab (maemoworld.ru)&lt;br&gt;and other people who tested this player&lt;/p&gt;</string>
+          <string>&lt;p align=&quot;center&quot;&gt;
+&lt;b&gt;Thanks to:&lt;/b&gt;&lt;br&gt;
+MrClon (maemoworld.ru)&lt;br /&gt;hxka (maemoworld.ru)&lt;br /&gt;jerich0 (maemoworld.ru)&lt;br /&gt;lknfox (maemoworld.ru)&lt;br /&gt;fab (maemoworld.ru)&lt;br /&gt;Pantera1989m (github.com)&lt;br /&gt;and other people who tested this player and helped in development&lt;/p&gt;</string>
          </property>
          <property name="wordWrap">
           <bool>true</bool>
          </property>
         </widget>
        </item>
+       <item>
+        <layout class="QHBoxLayout" name="horizontalLayout">
+         <item>
+          <widget class="QPushButton" name="onlineHelpButton">
+           <property name="text">
+            <string>Online help</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="donateButton">
+           <property name="text">
+            <string>Donate</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
       </layout>
      </widget>
     </widget>