Add confirmation after download on Symbian.
authorAkos Polster <akos@pipacs.com>
Fri, 5 Nov 2010 00:48:50 +0000 (01:48 +0100)
committerAkos Polster <akos@pipacs.com>
Fri, 5 Nov 2010 00:48:50 +0000 (01:48 +0100)
bookview.cpp
dorian.pro
librarydialog.cpp
mainwindow.cpp
pkg/changelog
pkg/version.txt
platform.cpp
platform.h
searchresultsdialog.cpp

index 05c5be9..45bdd2a 100644 (file)
@@ -284,7 +284,7 @@ void BookView::paintEvent(QPaintEvent *e)
 void BookView::mousePressEvent(QMouseEvent *e)
 {
     QWebView::mousePressEvent(e);
-#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
+#if defined(Q_WS_MAEMO_5)
     // Start monitoring kinetic scroll
     if (scrollerMonitor) {
         killTimer(scrollerMonitor);
@@ -440,10 +440,6 @@ void BookView::timerEvent(QTimerEvent *e)
             scrollerMonitor = -1;
         }
     }
-#elif defined(Q_OS_SYMBIAN)
-    if (e->timerId() == scrollerMonitor) {
-        if (charm && charm->)
-    }
 #endif
     QWebView::timerEvent(e);
 }
index 85e591e..7c4f1eb 100644 (file)
@@ -131,10 +131,18 @@ win32 {
 }
 
 symbian {
-    ICON = $$PWD/pkg/symbian/book.svg
+    TARGET = Dorian
     TARGET.UID3 = 0xEA633557
     TARGET.CAPABILITY = NetworkServices ReadUserData WriteUserData
     TARGET.EPOCHEAPSIZE = 0x080000 0x4000000
+    ICON = $$PWD/pkg/symbian/book.svg
+    packageheader = "$${LITERAL_HASH}{\"Dorian\"}, (0xEA633557), 0, 3, 4"
+    vendorinfo = \
+        "%{\"Nokia Betalabs \"}" \
+        ":\"Nokia Betalabs \""
+    my_deployment.pkg_prerules = packageheader vendorinfo
+    DEPLOYMENT += my_deployment
+
     INCLUDEPATH += $(QTDIR)/src/3rdparty/zlib
     HEADERS += widgets/flickcharm.h
     SOURCES += widgets/flickcharm.cpp
index 3fdfe16..416e05a 100644 (file)
@@ -1,10 +1,6 @@
 #include <QDir>
 #include <QtGui>
 
-#ifdef Q_WS_MAEMO_5
-#include <QtMaemo5/QMaemo5InformationBox>
-#endif
-
 #include "librarydialog.h"
 #include "library.h"
 #include "sortedlibrary.h"
@@ -87,14 +83,7 @@ void LibraryDialog::onAdd()
     // Add book to library
     QModelIndex index = library->find(path);
     if (index.isValid()) {
-#ifdef Q_WS_MAEMO_5
-        QMaemo5InformationBox::information(this,
-            tr("This book is already in the library"),
-            QMaemo5InformationBox::DefaultTimeout);
-#else
-        (void)QMessageBox::information(this, tr("Dorian"),
-            tr("This book is already in the library"), QMessageBox::Ok);
-#endif // Q_WS_MAEMO_5
+        Platform::information(tr("This book is already in the library"), this);
         setSelected(index);
     }
     else {
@@ -228,11 +217,7 @@ void LibraryDialog::onAddFromFolderDone(int added)
 
     progress->reset();
     qDebug() << "LibraryDialog::onRefreshDone:" << msg;
-#ifdef Q_WS_MAEMO_5
-    QMaemo5InformationBox::information(this, msg);
-#else
-    QMessageBox::information(this, tr("Done adding books"), msg);
-#endif
+    Platform::information(msg, this);
 }
 
 void LibraryDialog::onAddFromFolder(const QString &path)
index 278e578..31c952c 100755 (executable)
@@ -1,7 +1,6 @@
 #include <QtGui>
 
 #ifdef Q_WS_MAEMO_5
-#   include <QtMaemo5/QMaemo5InformationBox>
 #   include <QtDBus>
 #   include <QtGui/QX11Info>
 #   include <X11/Xlib.h>
@@ -377,13 +376,7 @@ void MainWindow::onAddBookmark(const QString &note)
 {
     TRACE;
     view->addBookmark(note);
-#ifdef Q_WS_MAEMO_5
-    QMaemo5InformationBox::information(this,
-        tr("Bookmarked current position"), QMaemo5InformationBox::DefaultTimeout);
-#else
-    (void)QMessageBox::information(this, tr("Dorian"),
-        tr("Bookmarked current position"), QMessageBox::Ok);
-#endif // Q_WS_MAEMO_5}
+    Platform::information(tr("Bookmarked current position"), this);
 }
 
 void MainWindow::onGoToBookmark(int index)
index 62d2d03..579d365 100644 (file)
@@ -1,3 +1,9 @@
+dorian (0.3.4-1) unstable; urgency=low
+
+  * On Symbian, display confirmation after downloading a book
+
+ -- Akos Polster <akos@pipacs.com>  Fri,  5 Nov 2010 02:00:00 +0100
+
 dorian (0.3.3-1) unstable; urgency=low
 
   * Fix font scaling on Symbian
index 02ed9ef..eb9ce88 100644 (file)
@@ -1 +1 @@
-"0.3.3"
+"0.3.4"
index f96cdda..dff134c 100644 (file)
@@ -25,6 +25,12 @@ static const char *DORIAN_VERSION =
 #include "pkg/version.txt"
 ;
 
+#ifdef Q_WS_MAEMO_5
+#   include <QtMaemo5/QMaemo5InformationBox>
+#else
+#   include <QMessageBox>
+#endif
+
 QString Platform::dbPath()
 {
     QString base(QDir::home().absoluteFilePath(DORIAN_BASE));
@@ -73,3 +79,14 @@ QString Platform::defaultFont()
     return QString("Times New Roman");
 #endif
 }
+
+void Platform::information(const QString &label, QWidget *parent)
+{
+#ifdef Q_WS_MAEMO_5
+    QMaemo5InformationBox::information(parent, label,
+                                       QMaemo5InformationBox::DefaultTimeout);
+#else
+    (void)QMessageBox::information(parent, QObject::tr("Dorian"), label,
+                                   QMessageBox::Ok);
+#endif
+}
index 1144a5f..daec6f3 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <QString>
 
+class QWidget;
+
 /** Platform abstractions. */
 class Platform
 {
@@ -13,6 +15,7 @@ public:
     static QString version();
     static QString downloadDir();
     static QString defaultFont();
+    static void information(const QString &label, QWidget *parent = 0);
 };
 
 #endif // PLATFORM_H
index 88958f6..f52af1f 100644 (file)
@@ -5,10 +5,6 @@
 #include <QDir>
 #include <QFile>
 
-#ifdef Q_WS_MAEMO_5
-#include <QtMaemo5/QMaemo5InformationBox>
-#endif
-
 #include "listview.h"
 #include "searchresultsdialog.h"
 #include "searchresultinfodialog.h"
@@ -106,10 +102,7 @@ void SearchResultsDialog::onEndDownload(int status, const Search::Result &result
         if (-1 != row) {
             list->model()->removeRow(row);
         }
-#ifdef Q_WS_MAEMO_5
-        QMaemo5InformationBox::information(this,
-            tr("Downloaded \"%1\"\nand added to the library").arg(result.title),
-            QMaemo5InformationBox::DefaultTimeout);
-#endif
+        Platform::information(tr("Downloaded \"%1\"\nand added to the library").
+                              arg(result.title), this);
     }
 }