diff --git a/src/lib/app/browserwindow.cpp b/src/lib/app/browserwindow.cpp
index 0467d0407..2ac775375 100644
--- a/src/lib/app/browserwindow.cpp
+++ b/src/lib/app/browserwindow.cpp
@@ -754,6 +754,7 @@ void BrowserWindow::toggleShowBookmarksToolbar()
setUpdatesEnabled(true);
Settings().setValue("Browser-View-Settings/showBookmarksToolbar", m_bookmarksToolbar->isVisible());
+ Settings().setValue("Browser-View-Settings/instantBookmarksToolbar", false);
}
void BrowserWindow::toggleShowNavigationToolbar()
@@ -897,7 +898,7 @@ void BrowserWindow::createToolbarsMenu(QMenu* menu)
action = menu->addAction(tr("&Bookmarks Toolbar"), this, SLOT(toggleShowBookmarksToolbar()));
action->setCheckable(true);
- action->setChecked(m_bookmarksToolbar->isVisible());
+ action->setChecked(Settings().value("Browser-View-Settings/showBookmarksToolbar").toBool());
menu->addSeparator();
diff --git a/src/lib/navigation/locationbar.cpp b/src/lib/navigation/locationbar.cpp
index f76a394a2..ac8403dd3 100644
--- a/src/lib/navigation/locationbar.cpp
+++ b/src/lib/navigation/locationbar.cpp
@@ -24,6 +24,7 @@
#include "bookmarksicon.h"
#include "bookmarks.h"
#include "bookmarkitem.h"
+#include "bookmarkstoolbar.h"
#include "siteicon.h"
#include "goicon.h"
#include "downicon.h"
@@ -403,6 +404,10 @@ void LocationBar::focusInEvent(QFocusEvent* event)
clearTextFormat();
LineEdit::focusInEvent(event);
+
+ if (Settings().value("Browser-View-Settings/instantBookmarksToolbar").toBool()) {
+ m_window->bookmarksToolbar()->show();
+ }
}
void LocationBar::focusOutEvent(QFocusEvent* event)
@@ -422,6 +427,10 @@ void LocationBar::focusOutEvent(QFocusEvent* event)
}
refreshTextFormat();
+
+ if (Settings().value("Browser-View-Settings/instantBookmarksToolbar").toBool()) {
+ m_window->bookmarksToolbar()->hide();
+ }
}
void LocationBar::dropEvent(QDropEvent* event)
diff --git a/src/lib/preferences/preferences.cpp b/src/lib/preferences/preferences.cpp
index 3679ba4e3..a87617976 100644
--- a/src/lib/preferences/preferences.cpp
+++ b/src/lib/preferences/preferences.cpp
@@ -214,7 +214,13 @@ Preferences::Preferences(BrowserWindow* window)
//APPEREANCE
settings.beginGroup("Browser-View-Settings");
ui->showStatusbar->setChecked(settings.value("showStatusBar", false).toBool());
+ // NOTE: instantBookmarksToolbar and showBookmarksToolbar cannot be both enabled at the same time
+ ui->instantBookmarksToolbar->setChecked(settings.value("instantBookmarksToolbar", false).toBool());
ui->showBookmarksToolbar->setChecked(settings.value("showBookmarksToolbar", true).toBool());
+ ui->instantBookmarksToolbar->setDisabled(settings.value("showBookmarksToolbar", true).toBool());
+ ui->showBookmarksToolbar->setDisabled(settings.value("instantBookmarksToolbar").toBool());
+ connect(ui->instantBookmarksToolbar, SIGNAL(toggled(bool)), ui->showBookmarksToolbar, SLOT(setDisabled(bool)));
+ connect(ui->showBookmarksToolbar, SIGNAL(toggled(bool)), ui->instantBookmarksToolbar, SLOT(setDisabled(bool)));
ui->showNavigationToolbar->setChecked(settings.value("showNavigationToolbar", true).toBool());
ui->showHome->setChecked(settings.value("showHomeButton", true).toBool());
ui->showBackForward->setChecked(settings.value("showBackForwardButtons", true).toBool());
@@ -853,6 +859,7 @@ void Preferences::saveSettings()
//WINDOW
settings.beginGroup("Browser-View-Settings");
settings.setValue("showStatusBar", ui->showStatusbar->isChecked());
+ settings.setValue("instantBookmarksToolbar", ui->instantBookmarksToolbar->isChecked());
settings.setValue("showBookmarksToolbar", ui->showBookmarksToolbar->isChecked());
settings.setValue("showNavigationToolbar", ui->showNavigationToolbar->isChecked());
settings.setValue("showHomeButton", ui->showHome->isChecked());
diff --git a/src/lib/preferences/preferences.ui b/src/lib/preferences/preferences.ui
index b3640db4b..494b80f8b 100644
--- a/src/lib/preferences/preferences.ui
+++ b/src/lib/preferences/preferences.ui
@@ -591,6 +591,13 @@
+ -
+
+
+ Enable instant Bookmarks ToolBar
+
+
+
-