summaryrefslogtreecommitdiff
path: root/src/tabwindow/tabbar.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-10-08 19:41:55 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commit43b0121f717dda8a1f179fb585a3c78e3552430c (patch)
tree60b7132e4440685d7e905fae8afc7df447993748 /src/tabwindow/tabbar.cpp
parentSaving the "pinned" state in the sessionmanager (diff)
downloadrekonq-43b0121f717dda8a1f179fb585a3c78e3552430c.tar.xz
Restoring pinned tabs, yeah!!!! :D
Diffstat (limited to 'src/tabwindow/tabbar.cpp')
-rw-r--r--src/tabwindow/tabbar.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/tabwindow/tabbar.cpp b/src/tabwindow/tabbar.cpp
index 7e493fec..feb3fd8d 100644
--- a/src/tabwindow/tabbar.cpp
+++ b/src/tabwindow/tabbar.cpp
@@ -34,6 +34,7 @@
#include "webwindow.h"
#include "iconmanager.h"
+#include "sessionmanager.h"
#include <KAcceleratorManager>
#include <KAction>
@@ -511,7 +512,7 @@ void TabBar::pinTab()
tabButton(index, QTabBar::RightSide)->hide();
setTabText(index, QString());
- // workaround: "fix" the icon
+ // workaround: "fix" the icon (or at least, try to...)
QLabel *label = qobject_cast<QLabel* >(tabButton(index, QTabBar::LeftSide));
if (!label)
label = new QLabel(this);
@@ -522,6 +523,7 @@ void TabBar::pinTab()
KIcon ic = IconManager::self()->iconForUrl(w->webWindow(index)->url());
label->setPixmap(ic.pixmap(16, 16));
+ SessionManager::self()->saveSession();
}
@@ -554,7 +556,7 @@ void TabBar::unpinTab()
tabButton(index, QTabBar::RightSide)->show();
setTabText(index, w->webWindow(index)->title());
- // workaround: "fix" the icon
+ // workaround: "fix" the icon (or at least, try to...)
QLabel *label = qobject_cast<QLabel* >(tabButton(index, QTabBar::LeftSide));
if (!label)
label = new QLabel(this);
@@ -564,4 +566,6 @@ void TabBar::unpinTab()
KIcon ic = IconManager::self()->iconForUrl(w->webWindow(index)->url());
label->setPixmap(ic.pixmap(16, 16));
+
+ SessionManager::self()->saveSession();
}