diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/bookmarks.cpp | 2 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 16 | ||||
| -rw-r--r-- | src/mainwindow.h | 2 | 
3 files changed, 19 insertions, 1 deletions
| diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp index 94f93f9b..fae94b35 100644 --- a/src/bookmarks.cpp +++ b/src/bookmarks.cpp @@ -186,7 +186,7 @@ BookmarkProvider::~BookmarkProvider()  void BookmarkProvider::setupToolBar()  { -    m_bookmarkToolBar = new KToolBar(m_parent); +    m_bookmarkToolBar = new KToolBar("bmToolBar", m_parent, Qt::TopToolBarArea);      m_bookmarkToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);      m_bookmarkToolBar->setIconDimensions(16);      m_bookmarkToolBar->setAcceptDrops(true); 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 diff --git a/src/mainwindow.h b/src/mainwindow.h index ded44790..fc0af47d 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -143,6 +143,8 @@ private slots:      void slotAboutToShowBackMenu();      void slotOpenActionUrl(QAction *action); +    void showBookmarkToolBar(bool); +  private:      MainView *m_view;      FindBar *m_findBar; | 
