summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp56
1 files changed, 14 insertions, 42 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b4174191..a0c25389 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -797,21 +797,30 @@ void MainWindow::viewTextSmaller()
void MainWindow::viewFullScreen(bool makeFullScreen)
{
+ setWidgetsVisible(!makeFullScreen);
+ KToggleFullScreenAction::setFullScreen(this, makeFullScreen);
+}
+
+
+void MainWindow::setWidgetsVisible(bool makeVisible)
+{
// state flags
static bool bookmarksToolBarFlag;
static bool sidePanelFlag;
- static bool bookmarksPanelFlag;
+ static bool bookmarksPanelFlag;
- if (makeFullScreen == true)
+ if (!makeVisible)
{
// save current state
bookmarksToolBarFlag = m_bmBar->isHidden();
m_bmBar->hide();
+ m_view->setTabBarHidden(true);
+
sidePanelFlag = sidePanel()->isHidden();
sidePanel()->hide();
- bookmarksPanelFlag = bookmarksPanel()->isHidden();
+ bookmarksPanelFlag = bookmarksPanel()->isHidden();
bookmarksPanel()->hide();
// hide main toolbar
@@ -821,6 +830,7 @@ void MainWindow::viewFullScreen(bool makeFullScreen)
{
// show main toolbar
m_mainBar->show();
+ m_view->setTabBarHidden(false);
// restore previous state
if (!bookmarksToolBarFlag)
@@ -829,9 +839,7 @@ void MainWindow::viewFullScreen(bool makeFullScreen)
sidePanel()->show();
if (!bookmarksPanelFlag)
bookmarksPanel()->show();
- }
-
- KToggleFullScreenAction::setFullScreen(this, makeFullScreen);
+ }
}
@@ -922,42 +930,6 @@ void MainWindow::openNext()
}
-bool MainWindow::queryClose()
-{
- if (m_view->count() > 1)
- {
-
- int answer = KMessageBox::questionYesNoCancel(
- this,
- i18np("Are you sure you want to close the window?\n" \
- "You still have 1 tab open.",
- "Are you sure you want to close the window?\n" \
- "You still have %1 tabs open.",
- m_view->count()),
- i18n("Closing rekonq"),
- KStandardGuiItem::quit(),
- KGuiItem(i18n("C&lose Current Tab"), KIcon("tab-close")),
- KStandardGuiItem::cancel(),
- "confirmClosingMultipleTabs");
-
- switch (answer)
- {
- case KMessageBox::Yes:
- // Quit
- return true;
- break;
- case KMessageBox::No:
- // Close only the current tab
- m_view->closeTab();
- default:
- return false;
- }
- }
-
- return true;
-}
-
-
void MainWindow::keyPressEvent(QKeyEvent *event)
{
// hide findbar