From a4ada885c6a94fff768aad83cf4070a5ebfd8bbf Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 19 Jun 2009 18:12:56 +0200 Subject: UI changes --- src/mainwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index abc3fcd5..e4b6773c 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -323,6 +323,11 @@ void MainWindow::setupActions() a->setShortcuts(QApplication::isRightToLeft() ? KStandardShortcut::tabNext() : KStandardShortcut::tabPrev()); actionCollection()->addAction(QLatin1String("show_prev_tab"), a); connect(a, SIGNAL(triggered(bool)), m_view, SLOT(previousTab())); + + // ==================== Bookmarks Actions + a = new KAction(i18n("Add Bookmark"), this); + a->setIcon(KIcon("rating")); + actionCollection()->addAction(QLatin1String("add_bookmark"),a); } -- cgit v1.2.1 From 8a7e6c079fcc941b5232a03044512135d43b8403 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 19 Jun 2009 18:19:28 +0200 Subject: No more Action Back Menu --- src/mainwindow.cpp | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e4b6773c..0cae2ab6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -292,11 +292,7 @@ void MainWindow::setupActions() // ================ history related actions m_historyBackAction = new KAction(KIcon("go-previous"), i18n("Back"), this); - m_historyBackMenu = new KMenu(this); - m_historyBackAction->setMenu(m_historyBackMenu); connect(m_historyBackAction, SIGNAL(triggered(bool)), this, SLOT(slotOpenPrevious())); - connect(m_historyBackMenu, SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowBackMenu())); - connect(m_historyBackMenu, SIGNAL(triggered(QAction *)), this, SLOT(slotOpenActionUrl(QAction *))); actionCollection()->addAction(QLatin1String("history_back"), m_historyBackAction); m_historyForwardAction = new KAction(KIcon("go-next"), i18n("Forward"), this); @@ -771,44 +767,6 @@ void MainWindow::slotLoadProgress(int progress) } -void MainWindow::slotAboutToShowBackMenu() -{ - m_historyBackMenu->clear(); - if (!currentTab()) - return; - QWebHistory *history = currentTab()->history(); - int historyCount = history->count(); - for (int i = history->backItems(historyCount).count() - 1; i >= 0; --i) - { - QWebHistoryItem item = history->backItems(history->count()).at(i); - KAction *action = new KAction(this); - action->setData(-1*(historyCount - i - 1)); - QIcon icon = Application::instance()->icon(item.url()); - action->setIcon(icon); - action->setText(item.title()); - m_historyBackMenu->addAction(action); - } -} - - -void MainWindow::slotOpenActionUrl(QAction *action) -{ - int offset = action->data().toInt(); - QWebHistory *history = currentTab()->history(); - if (offset < 0) - { - history->goToItem(history->backItems(-1*offset).first()); // back - } - else - { - if (offset > 0) - { - history->goToItem(history->forwardItems(history->count() - offset + 1).back()); // forward - } - } -} - - void MainWindow::slotOpenPrevious() { QWebHistory *history = currentTab()->history(); -- cgit v1.2.1 From 0a8e7f56c426639dd140558dd685c72d24a22e79 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 19 Jun 2009 18:33:59 +0200 Subject: Removed recently closed tabs history --- src/mainwindow.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 0cae2ab6..3faa4699 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -357,7 +357,6 @@ void MainWindow::setupHistoryMenu() QList historyActions; historyActions.append(actionCollection()->action("history_back")); historyActions.append(actionCollection()->action("history_forward")); - historyActions.append(m_view->recentlyClosedTabsAction()); historyMenu->setInitialActions(historyActions); } -- cgit v1.2.1 From 205e89597c14473f34ace33c30d503eb9b7cf7e7 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 20 Jun 2009 09:46:23 +0200 Subject: History Panel Action fix --- src/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3faa4699..ec3f45c6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -338,7 +338,8 @@ void MainWindow::setupSidePanel() // setup side panel actions QAction* a = m_sidePanel->toggleViewAction(); - a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); + a->setText( i18n("History Panel") ); + a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); // WARNING : is this the right shortcut ?? actionCollection()->addAction(QLatin1String("show_history_panel"), a); } -- cgit v1.2.1 From f9441ee6e3033b370703ce8ab4e86fa5e9400a2c Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sat, 20 Jun 2009 10:37:30 +0200 Subject: Various Fixes --- src/mainwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ec3f45c6..a555df9a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -251,6 +251,7 @@ void MainWindow::setupActions() // stop reload Action m_stopReloadAction = new KAction(KIcon("view-refresh"), i18n("Reload"), this); + m_stopReloadAction->setShortcut(KShortcut(Qt::Key_F5)); actionCollection()->addAction(QLatin1String("stop_reload") , m_stopReloadAction); m_stopReloadAction->setShortcutConfigurable(false); @@ -337,7 +338,7 @@ void MainWindow::setupSidePanel() addDockWidget(Qt::LeftDockWidgetArea, m_sidePanel); // setup side panel actions - QAction* a = m_sidePanel->toggleViewAction(); + KAction* a = (KAction *) m_sidePanel->toggleViewAction(); a->setText( i18n("History Panel") ); a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); // WARNING : is this the right shortcut ?? actionCollection()->addAction(QLatin1String("show_history_panel"), a); -- cgit v1.2.1