diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2013-03-13 18:57:24 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2013-03-13 18:57:24 +0100 |
commit | d387448a61c3c220484b3cc08aac04058c35a645 (patch) | |
tree | 0827a2ae92dcee48e0e4f1012f05b3fdb78ed91b /src/tabwindow/tabwidget.cpp | |
parent | Support Activities (diff) | |
download | rekonq-d387448a61c3c220484b3cc08aac04058c35a645.tar.xz |
Restore activity daemon support
BUG: 315694
Diffstat (limited to 'src/tabwindow/tabwidget.cpp')
-rw-r--r-- | src/tabwindow/tabwidget.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/tabwindow/tabwidget.cpp b/src/tabwindow/tabwidget.cpp index bdc7a47a..9494fad4 100644 --- a/src/tabwindow/tabwidget.cpp +++ b/src/tabwindow/tabwidget.cpp @@ -35,9 +35,11 @@ #include "application.h" #include "rekonqwindow.h" +#include "tabbar.h" + #include "webpage.h" +#include "webtab.h" #include "webwindow.h" -#include "tabbar.h" #include "tabhistory.h" @@ -78,6 +80,7 @@ TabWidget::TabWidget(bool withTab, bool PrivateBrowsingMode, QWidget *parent) , _openedTabsCounter(0) , _isPrivateBrowsing(PrivateBrowsingMode) , _ac(new KActionCollection(this)) + , _lastCurrentTabIndex(-1) { init(); @@ -98,6 +101,7 @@ TabWidget::TabWidget(WebPage *pg, QWidget *parent) , _openedTabsCounter(0) , _isPrivateBrowsing(false) , _ac(new KActionCollection(this)) + , _lastCurrentTabIndex(-1) { init(); @@ -394,6 +398,8 @@ void TabWidget::pageCreated(WebPage *page) void TabWidget::currentChanged(int newIndex) { + _lastCurrentTabIndex = newIndex; + _openedTabsCounter = 0; tabBar()->setTabHighlighted(newIndex, false); @@ -403,6 +409,8 @@ void TabWidget::currentChanged(int newIndex) if (!tab) return; + tab->tabView()->focusIn(); + QString t = tab->title(); (t.isEmpty() || t == QL1S("rekonq")) @@ -410,6 +418,16 @@ void TabWidget::currentChanged(int newIndex) : setWindowTitle(t + QL1S(" - rekonq")); tab->checkFocus(); + + // ---------------------------------------------------- + + WebWindow *oldTab = webWindow(_lastCurrentTabIndex); + if (!oldTab) + return; + + oldTab->tabView()->focusOut(); + + _lastCurrentTabIndex = newIndex; } |