Fix forward navigation control on Linux.
[dorian] / mainwindow.cpp
index 4b778ad..8694cd2 100755 (executable)
@@ -43,10 +43,6 @@ MainWindow::MainWindow(QWidget *parent):
     setAttribute(Qt::WA_Maemo5StackedWindow, true);
 #endif
 
-#ifndef Q_OS_SYMBIAN
-    setWindowTitle("Dorian");
-#endif
-
     // Central widget. Must be an intermediate, because the book view widget
     // might be re-parented later
     QFrame *central = new QFrame(this);
@@ -122,7 +118,7 @@ MainWindow::MainWindow(QWidget *parent):
     connect(view, SIGNAL(progress(qreal)), prog, SLOT(setProgress(qreal)));
 
     // Shadow window for full screen reading
-    fullScreenWindow = new FullScreenWindow(this);
+    fullScreenWindow = new FullScreenWindow();
     connect(fullScreenWindow, SIGNAL(restore()), this, SLOT(showRegular()));
 
     // Handle settings changes
@@ -138,6 +134,11 @@ MainWindow::MainWindow(QWidget *parent):
 #endif
 }
 
+MainWindow::~MainWindow()
+{
+    delete fullScreenWindow;
+}
+
 void MainWindow::initialize()
 {
     TRACE;
@@ -199,7 +200,7 @@ void MainWindow::showBig()
     leaveBookView();
     fullScreenWindow->takeBookView(view, prog, prev, next);
 
-#ifdef Q_WS_MAEMO_5
+#if defined(Q_WS_MAEMO_5)
     fullScreenWindow->raise();
 #else
     hide();
@@ -357,6 +358,12 @@ void MainWindow::about()
     Dyalog *aboutDialog = new Dyalog(this, false);
     aboutDialog->setWindowTitle(tr("About Dorian"));
     QString version = Platform::instance()->version();
+#if !defined(Q_WS_MAEMO_5) && !defined(Q_OS_SYMBIAN)
+    QLabel *icon = new QLabel(aboutDialog);
+    QPixmap pixmap(Platform::instance()->icon("dorian"));
+    icon->setPixmap(pixmap);
+    aboutDialog->addWidget(icon);
+#endif
     QLabel *label = new QLabel(aboutDialog);
     label->setTextFormat(Qt::RichText);
     label->setOpenExternalLinks(true);