X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=mainwindow.cpp;h=21194523b96fac76723ad0b37ab3dead38c5cbca;hb=30e85d759793aa2b367e4bacd730b733112a1a7b;hp=54c892bba6c8e322f63df38927bffba063f3e823;hpb=6c8d9bb19213aee37517232ef889409200e53ac1;p=dorian diff --git a/mainwindow.cpp b/mainwindow.cpp index 54c892b..2119452 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -42,7 +42,10 @@ MainWindow::MainWindow(QWidget *parent): #ifdef Q_WS_MAEMO_5 setAttribute(Qt::WA_Maemo5StackedWindow, true); #endif + +#ifndef Q_OS_SYMBIAN setWindowTitle("Dorian"); +#endif // Central widget. Must be an intermediate, because the book view widget // can be re-parented later @@ -54,7 +57,6 @@ MainWindow::MainWindow(QWidget *parent): // Book view view = new BookView(this); - view->show(); // Tool bar actions @@ -107,7 +109,8 @@ MainWindow::MainWindow(QWidget *parent): // Load library, upgrade it if needed libraryProgress = new ProgressDialog(tr("Upgrading library"), this); Library *library = Library::instance(); - connect(library, SIGNAL(beginUpgrade(int)), this, SLOT(onBeginUpgrade(int))); + connect(library, SIGNAL(beginUpgrade(int)), + this, SLOT(onBeginUpgrade(int))); connect(library, SIGNAL(upgrading(const QString &)), this, SLOT(onUpgrading(const QString &))); connect(library, SIGNAL(endUpgrade()), this, SLOT(onEndUpgrade())); @@ -131,9 +134,6 @@ MainWindow::MainWindow(QWidget *parent): connect(next, SIGNAL(triggered()), this, SLOT(goToNextPage())); connect(prev, SIGNAL(triggered()), this, SLOT(goToPreviousPage())); - // Adopt view, show window - showRegular(); - #ifdef DORIAN_TEST_MODEL (void)new ModelTest(Library::instance(), this); #endif @@ -168,6 +168,9 @@ void MainWindow::initialize() library->setNowReading(sorted.mapToSource(sorted.index(0, 0))); } } + + // Show in regular (non full-screen) mode + showRegular(); } void MainWindow::onCurrentBookChanged() @@ -186,6 +189,7 @@ void MainWindow::showRegular() fullScreenWindow->hide(); show(); + #if defined(Q_OS_SYMBIAN) activateWindow(); #endif @@ -199,11 +203,9 @@ void MainWindow::showBig() leaveBookView(); fullScreenWindow->takeBookView(view, prog, prev, next); -// #ifdef Q_OS_SYMBIAN + fullScreenWindow->showFullScreen(); hide(); -// #endif - fullScreenWindow->showFullScreen(); #ifdef Q_OS_SYMBIAN fullScreenWindow->activateWindow(); #endif @@ -253,13 +255,6 @@ void MainWindow::showBookmarks() } } -void MainWindow::closeEvent(QCloseEvent *event) -{ - TRACE; - view->setLastBookmark(); - AdopterWindow::closeEvent(event); -} - void MainWindow::onSettingsChanged(const QString &key) { #if defined(Q_WS_MAEMO_5)