summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYusuf Tezcan <yatezcan@gmail.com>2011-12-29 09:24:59 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-12-29 09:24:59 +0100
commitfa38864b0087bb2de2696f0b395789636437c21b (patch)
treeb26d5cfa9e2dd63af87389ed3a0de4251e7db337
parentSession Management clean up (diff)
downloadrekonq-fa38864b0087bb2de2696f0b395789636437c21b.tar.xz
Correctly hide preview selector bar when its preview is deleted in
the new tab page CCMAIL: yatezcan@gmail.com REVIEW:103470 REVIEWED-BY: adjam
-rw-r--r--src/newtabpage.cpp5
-rw-r--r--src/webtab.cpp5
-rw-r--r--src/webtab.h2
3 files changed, 12 insertions, 0 deletions
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index 09d15af6..9a908b24 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -40,6 +40,7 @@
#include "historymodels.h"
#include "mainview.h"
#include "mainwindow.h"
+#include "previewselectorbar.h"
#include "websnap.h"
#include "webpage.h"
#include "webtab.h"
@@ -337,6 +338,10 @@ void NewTabPage::removePreview(int index)
QStringList names = ReKonfig::previewNames();
QStringList urls = ReKonfig::previewUrls();
+ if (urls.at(index).isEmpty()
+ || names.at(index).isEmpty())
+ rApp->mainWindow()->currentTab()->hideSelectorBar();
+
urls.removeAt(index);
names.removeAt(index);
diff --git a/src/webtab.cpp b/src/webtab.cpp
index bded411c..0dd2ac44 100644
--- a/src/webtab.cpp
+++ b/src/webtab.cpp
@@ -226,6 +226,11 @@ void WebTab::showRSSInfo(const QPoint &pos)
widget->showAt(pos);
}
+void WebTab::hideSelectorBar()
+{
+ m_previewSelectorBar.data()->animatedHide();
+}
+
void WebTab::setPart(KParts::ReadOnlyPart *p, const KUrl &u)
{
diff --git a/src/webtab.h b/src/webtab.h
index fefdaf66..4e13cef9 100644
--- a/src/webtab.h
+++ b/src/webtab.h
@@ -79,6 +79,8 @@ public:
KUrl url();
void createPreviewSelectorBar(int index);
+ void hideSelectorBar();
+
bool hasRSSInfo();
bool isPageLoading();