diff options
author | David E. Narváez <david.narvaez@computer.org> | 2013-01-08 00:58:26 -0500 |
---|---|---|
committer | David E. Narváez <david.narvaez@computer.org> | 2013-01-08 00:58:26 -0500 |
commit | 74af89ec5b993c431ade44cc8615d95ec77b60b9 (patch) | |
tree | 99520fc021f6909dbe28709d52350991e4e0b6ae | |
parent | Rekonq Migration to Nepomuk2 (diff) | |
download | rekonq-74af89ec5b993c431ade44cc8615d95ec77b60b9.tar.xz |
Restore Tab Windows when Restoring the Session
Modified the restore method so that it returns true in case something is
actually restored, and then use that return value to call the
restoreTabWindow method of the session manager
REVIEW: 108077
-rw-r--r-- | src/main.cpp | 9 | ||||
-rw-r--r-- | src/tabwindow/rekonqwindow.cpp | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp index 7f6fcd9e..c7adff7f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ // Local Includes #include "application.h" +#include "sessionmanager.h" #include "tabwindow.h" #include "urlresolver.h" @@ -224,10 +225,12 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv) QCoreApplication::setApplicationVersion(REKONQ_VERSION); if (app.isSessionRestored()) - { for (int i = 1; TabWindow::canBeRestored(i); i++) - app.newTabWindow()->restore(i); - } + { + TabWindow * newTabWindow = app.newTabWindow(false); + if (newTabWindow->restore(i)) + SessionManager::self()->restoreTabWindow(newTabWindow); + } return app.exec(); } diff --git a/src/tabwindow/rekonqwindow.cpp b/src/tabwindow/rekonqwindow.cpp index afebf79c..1717403c 100644 --- a/src/tabwindow/rekonqwindow.cpp +++ b/src/tabwindow/rekonqwindow.cpp @@ -348,7 +348,7 @@ bool RekonqWindow::restore(int number, bool show) { if (show) RekonqWindow::show(); - return false; + return true; } return false; } |