X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=mainwindow.cpp;h=f4ebc2a7d7641044dcd76030e2d67cb5332e8cae;hb=f022d4d369f0721e0036268c0869adcda52d1061;hp=583928ef92219d98030d3363420d6f7ec957e015;hpb=ac72b9ea7af92a9936a8e023a1923cdf94558d54;p=dorian diff --git a/mainwindow.cpp b/mainwindow.cpp index 583928e..f4ebc2a 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -81,7 +81,7 @@ MainWindow::MainWindow(QWidget *parent): rotateAction = addToolBarAction(this, SLOT(rotate()), "rotate", tr("Rotate"), true); - // addToolBarSpace(); + addToolBarSpace(); fullScreenAction = addToolBarAction(this, SLOT(showBig()), "view-fullscreen", tr("Full screen"), true); @@ -182,24 +182,30 @@ void MainWindow::showRegular() { TRACE; - // Re-parent children + view->setLastBookmark(); fullScreenWindow->leaveBookView(); takeBookView(view, prog, prev, next); fullScreenWindow->hide(); show(); + view->restoreLastBookmark(); } void MainWindow::showBig() { TRACE; - // Re-parent children + view->setLastBookmark(); leaveBookView(); fullScreenWindow->takeBookView(view, prog, prev, next); +#ifdef Q_WS_MAEMO_5 + fullScreenWindow->raise(); +#else hide(); +#endif fullScreenWindow->showFullScreen(); + view->restoreLastBookmark(); } void MainWindow::setCurrentBook(const QModelIndex ¤t) @@ -225,12 +231,13 @@ void MainWindow::rotate() QString current = Settings::instance()->value("orientation", Platform::instance()->defaultOrientation()).toString(); QString target = (current == "landscape")? "portrait": "landscape"; + view->setLastBookmark(); Settings::instance()->setValue("orientation", target); } void MainWindow::showDevTools() { - (new DevTools())->exec(); + (new DevTools(this))->exec(); } void MainWindow::showBookmarks() @@ -252,7 +259,6 @@ void MainWindow::onSettingsChanged(const QString &key) qDebug() << "Key" << key; if (key == "orientation") { - view->setLastBookmark(); QString value = Settings::instance()->value(key, Platform::instance()->defaultOrientation()).toString(); qDebug() << "Value: orientation" << value;