summaryrefslogtreecommitdiff
path: root/src/tabwindow
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-03-13 18:57:24 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-03-13 18:57:24 +0100
commitd387448a61c3c220484b3cc08aac04058c35a645 (patch)
tree0827a2ae92dcee48e0e4f1012f05b3fdb78ed91b /src/tabwindow
parentSupport Activities (diff)
downloadrekonq-d387448a61c3c220484b3cc08aac04058c35a645.tar.xz
Restore activity daemon support
BUG: 315694
Diffstat (limited to 'src/tabwindow')
-rw-r--r--src/tabwindow/tabwidget.cpp20
-rw-r--r--src/tabwindow/tabwidget.h2
2 files changed, 21 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;
}
diff --git a/src/tabwindow/tabwidget.h b/src/tabwindow/tabwidget.h
index 2718904c..a6b36e33 100644
--- a/src/tabwindow/tabwidget.h
+++ b/src/tabwindow/tabwidget.h
@@ -144,6 +144,8 @@ private:
bool _isPrivateBrowsing;
KActionCollection *_ac;
+
+ int _lastCurrentTabIndex;
};
#endif // TAB_WIDGET