summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index b27b7c81..55cc7a69 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -161,6 +161,7 @@ MainWindow::MainWindow()
MainWindow::~MainWindow()
{
Application::bookmarkProvider()->removeToolBar(m_bmBar);
+ Application::bookmarkProvider()->removeBookmarkPanel(m_bookmarksPanel);
Application::instance()->removeMainWindow(this);
delete m_view;
@@ -195,15 +196,20 @@ void MainWindow::setupToolbars()
m_mainBar->addAction(actionByName(KStandardAction::name(KStandardAction::Forward)));
m_mainBar->addSeparator();
m_mainBar->addAction(actionByName( QL1S("stop_reload") ));
- m_mainBar->addAction(actionByName(KStandardAction::name(KStandardAction::Home)));
+// m_mainBar->addAction(actionByName(KStandardAction::name(KStandardAction::Home)));
// location bar
KAction *urlBarAction = new KAction(this);
urlBarAction->setDefaultWidget(m_view->widgetBar());
m_mainBar->addAction(urlBarAction);
- m_mainBar->addAction(actionByName( QL1S("bookmarksActionMenu") ));
+// m_mainBar->addAction(actionByName( QL1S("bookmarksActionMenu") ));
+ connect(actionByName(QL1S("bookmarksActionMenu")), SIGNAL(triggered()),
+ qobject_cast<QToolButton*>(m_mainBar->widgetForAction(actionByName(QL1S("bookmarksActionMenu")))), SLOT(showMenu()));
+
m_mainBar->addAction(actionByName( QL1S("rekonq_tools") ));
+ connect(actionByName(QL1S("rekonq_tools")), SIGNAL(triggered()),
+ qobject_cast<QToolButton*>(m_mainBar->widgetForAction(actionByName(QL1S("rekonq_tools")))), SLOT(showMenu()));
m_mainBar->show(); // this just to fix reopening rekonq after fullscreen close
@@ -217,7 +223,6 @@ void MainWindow::setupToolbars()
m_bmBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_bmBar->setIconDimensions(16);
- m_bmBar->hide();
KToolBar::setToolBarsEditable(false);
KToolBar::setToolBarsLocked(true);
@@ -447,6 +452,8 @@ void MainWindow::setupActions()
KActionMenu *bmMenu = Application::bookmarkProvider()->bookmarkActionMenu(this);
bmMenu->setIcon(KIcon("bookmarks"));
bmMenu->setDelayed(false);
+ bmMenu->setShortcutConfigurable(true);
+ bmMenu->setShortcut( KShortcut(Qt::ALT + Qt::Key_B) );
actionCollection()->addAction(QL1S("bookmarksActionMenu"), bmMenu);
@@ -464,7 +471,9 @@ void MainWindow::setupTools()
kDebug() << "setup tools...";
KActionMenu *toolsMenu = new KActionMenu(KIcon("configure"), i18n("&Tools"), this);
toolsMenu->setDelayed(false);
-
+ toolsMenu->setShortcutConfigurable(true);
+ toolsMenu->setShortcut( KShortcut(Qt::ALT + Qt::Key_T) );
+
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Open)));
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::SaveAs)));
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Print)));
@@ -566,6 +575,8 @@ void MainWindow::setupPanels()
addDockWidget(Qt::LeftDockWidgetArea, m_bookmarksPanel);
+ Application::bookmarkProvider()->registerBookmarkPanel(m_bookmarksPanel);
+
// setup bookmarks panel action
a = (KAction *) m_bookmarksPanel->toggleViewAction();
a->setShortcut(KShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_B));
@@ -1195,7 +1206,7 @@ void MainWindow::clearPrivateData()
if (clearWidget.clearDownloads->isChecked())
{
- Application::historyManager()->clearDownloadsHistory();
+ Application::instance()->clearDownloadsHistory();
}
if (clearWidget.clearCookies->isChecked())