diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-08-26 01:30:59 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-08-30 01:07:26 +0200 |
commit | 196470f75bba5cd86dba587f9f4f3a9905103e93 (patch) | |
tree | 7c3902c47d21d42e9b031889c7d31a9e23b8340e /src/mainwindow.cpp | |
parent | Typo SIGNAL --> SLOT (diff) | |
download | rekonq-196470f75bba5cd86dba587f9f4f3a9905103e93.tar.xz |
First changes to bookmarks system
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 845cdd38..2a733c63 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -66,6 +66,7 @@ #include <KToolBar> #include <KJobUiDelegate> #include <kdeprintdialog.h> +#include <KToggleAction> // Qt Includes #include <QtCore/QTimer> @@ -343,6 +344,11 @@ void MainWindow::setupActions() a = new KAction(KIcon("edit-clear"), i18n("Clear Private Data..."), this); actionCollection()->addAction(QLatin1String("clear_private_data"), a); connect(a, SIGNAL(triggered(bool)), this, SLOT(clearPrivateData())); + + // Bookmarks ToolBar Action + a = new KToggleAction(KIcon("bookmark-toolbar"), i18n("Bookmark ToolBar"), this); + actionCollection()->addAction(QLatin1String("bm_bar"), a); + connect(a, SIGNAL(triggered(bool)), this, SLOT(showBookmarkToolBar(bool))); } @@ -375,6 +381,7 @@ void MainWindow::setupTools() toolsMenu->addSeparator(); + toolsMenu->addAction(actionByName(QLatin1String("bm_bar"))); toolsMenu->addAction(actionByName(QLatin1String("show_history_panel"))); toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::FullScreen))); @@ -1037,3 +1044,12 @@ void MainWindow::slotOpenActionUrl(QAction *action) } } } + + +void MainWindow::showBookmarkToolBar(bool show) +{ + if(show) + toolBar("bmToolBar")->show(); + else + toolBar("bmToolBar")->hide(); +}
\ No newline at end of file |