summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/homepage.cpp6
-rw-r--r--src/mainview.cpp4
-rw-r--r--src/mainwindow.cpp55
-rw-r--r--src/settings.cpp9
-rw-r--r--src/tabbar.cpp10
5 files changed, 52 insertions, 32 deletions
diff --git a/src/homepage.cpp b/src/homepage.cpp
index e8608241..80d0d3b6 100644
--- a/src/homepage.cpp
+++ b/src/homepage.cpp
@@ -178,21 +178,21 @@ QString HomePage::homePageMenu(KUrl currentUrl)
if(currentUrl == "rekonq:favorites" || currentUrl == "rekonq:home")
menu += " current";
menu += "\"><a href=\"rekonq:favorites\">";
- menu += "<img src=\"file:///" + loader->iconPath("rating", KIconLoader::Desktop) + "\" />";
+ menu += "<img src=\"file:///" + loader->iconPath("emblem-favorite", KIconLoader::Desktop) + "\" />";
menu += "Favorites</a></div>";
menu += "<div class=\"link";
if(currentUrl == "rekonq:closedTabs")
menu += " current";
menu += "\"><a href=\"rekonq:closedTabs\">";
- menu += "<img src=\"file:///" + loader->iconPath("edit-undo", KIconLoader::Desktop) + "\" />";
+ menu += "<img src=\"file:///" + loader->iconPath("edit-redo", KIconLoader::Desktop) + "\" />";
menu += "Closed Tabs</a></div>";
menu += "<div class=\"link";
if(currentUrl == "rekonq:bookmarks")
menu += " current";
menu += "\"><a href=\"rekonq:bookmarks\">";
- menu += "<img src=\"file:///" + loader->iconPath("bookmarks-organize", KIconLoader::Desktop) + "\" />";
+ menu += "<img src=\"file:///" + loader->iconPath("bookmarks", KIconLoader::Desktop) + "\" />";
menu += "Bookmarks</a></div>";
menu += "<div class=\"link";
diff --git a/src/mainview.cpp b/src/mainview.cpp
index 3c78a0f6..ba7b720e 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -107,8 +107,8 @@ MainView::~MainView()
}
-TabBar *MainView::tabBar() const
-{
+TabBar *MainView::tabBar() const
+{
return m_tabBar;
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 1b527d1a..c0008cba 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -45,6 +45,7 @@
#include "findbar.h"
#include "sidepanel.h"
#include "urlbar.h"
+#include "tabbar.h"
// Ui Includes
#include "ui_cleardata.h"
@@ -68,6 +69,7 @@
#include <kdeprintdialog.h>
#include <KToggleAction>
#include <KStandardDirs>
+#include <KActionCategory>
// Qt Includes
#include <QtCore/QTimer>
@@ -168,7 +170,12 @@ void MainWindow::setupToolbars()
m_mainBar->addSeparator();
m_mainBar->addAction( actionByName("stop_reload") );
m_mainBar->addAction( actionByName(KStandardAction::name(KStandardAction::Home)) );
- m_mainBar->addAction( actionByName("url_bar") );
+
+ // location bar
+ KAction *urlBarAction = new KAction(this);
+ urlBarAction->setDefaultWidget(m_view->urlBar());
+ m_mainBar->addAction( urlBarAction );
+
m_mainBar->addAction( actionByName("bookmarksActionMenu") );
m_mainBar->addAction( actionByName("rekonq_tools") );
@@ -232,12 +239,7 @@ void MainWindow::setupActions()
actionCollection()->addAssociatedWidget(this);
KAction *a;
-
- // location bar
- a = new KAction(i18n("Location Bar"), this);
- a->setDefaultWidget(m_view->urlBar());
- actionCollection()->addAction(QLatin1String("url_bar"), a);
-
+
// new window action
a = new KAction(KIcon("window-new"), i18n("&New Window"), this);
a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_N));
@@ -260,7 +262,6 @@ void MainWindow::setupActions()
KStandardAction::home(this, SLOT(slotHome()), actionCollection());
KStandardAction::preferences(this, SLOT(slotPreferences()), actionCollection());
- // WEB Actions (NO KStandardActions..)
a = KStandardAction::redisplay(m_view, SLOT(slotWebReload()), actionCollection());
a->setText(i18n("Reload"));
@@ -276,13 +277,13 @@ void MainWindow::setupActions()
connect(m_view, SIGNAL(browserTabLoading(bool)), this, SLOT(slotBrowserLoading(bool)));
slotBrowserLoading(false); //first init for blank start page
- a = new KAction(this);
+ a = new KAction(i18n("Open Location"), this);
a->setShortcut(Qt::CTRL + Qt::Key_L);
actionCollection()->addAction(QLatin1String("open_location"), a);
connect(a, SIGNAL(triggered(bool)) , this, SLOT(slotOpenLocation()));
- // ============== Zoom Actions
+ // ============================= Zoom Actions ===================================
a = new KAction(KIcon("zoom-in"), i18n("&Enlarge Font"), this);
a->setShortcut(KShortcut(Qt::CTRL | Qt::Key_Plus));
actionCollection()->addAction(QLatin1String("bigger_font"), a);
@@ -298,13 +299,12 @@ void MainWindow::setupActions()
actionCollection()->addAction(QLatin1String("smaller_font"), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(slotViewTextSmaller()));
- // -----------
+ // =============================== Tools Actions =================================
a = new KAction(i18n("Page S&ource"), this);
a->setIcon(KIcon("application-xhtml+xml"));
actionCollection()->addAction(QLatin1String("page_source"), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(slotViewPageSource()));
- // ================ Tools (WebKit) Actions
a = new KAction(KIcon("tools-report-bug"), i18n("Web &Inspector"), this);
a->setCheckable(true);
actionCollection()->addAction(QLatin1String("web_inspector"), a);
@@ -315,7 +315,11 @@ void MainWindow::setupActions()
actionCollection()->addAction(QLatin1String("private_browsing"), a);
connect(a, SIGNAL(triggered(bool)), this, SLOT(slotPrivateBrowsing(bool)));
- // ================ history related actions
+ 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()));
+
+ // ========================= History related actions ==============================
a = KStandardAction::back(this, SLOT(slotOpenPrevious()) , actionCollection());
m_historyBackMenu = new KMenu(this);
@@ -325,7 +329,7 @@ void MainWindow::setupActions()
KStandardAction::forward(this, SLOT(slotOpenNext()) , actionCollection());
- // =================== Tab Actions
+ // ============================== Tab Actions ====================================
a = new KAction(KIcon("tab-new"), i18n("New &Tab"), this);
a->setShortcut(KShortcut(Qt::CTRL + Qt::Key_T));
actionCollection()->addAction(QLatin1String("new_tab"), a);
@@ -346,11 +350,24 @@ void MainWindow::setupActions()
actionCollection()->addAction(QLatin1String("show_prev_tab"), a);
connect(a, SIGNAL(triggered(bool)), m_view, SLOT(previousTab()));
- // clear private data action
- 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()));
+ a = new KAction(KIcon("tab-duplicate"), i18n("Clone Tab"), this);
+ actionCollection()->addAction(QLatin1String("clone_tab"), a);
+ connect(a, SIGNAL(triggered(bool)), m_view->tabBar(), SLOT(cloneTab()) );
+ a = new KAction(KIcon("tab-close-other"), i18n("Close &Other Tabs"), this);
+ actionCollection()->addAction( QLatin1String("close_other_tabs"), a);
+ connect(a, SIGNAL(triggered(bool)), m_view->tabBar(), SLOT(closeOtherTabs()) );
+
+ a = new KAction(KIcon("view-refresh"), i18n("Reload Tab"), this);
+ actionCollection()->addAction( QLatin1String("reload_tab"), a);
+ connect(a, SIGNAL(triggered(bool)), m_view->tabBar(), SLOT(reloadTab()) );
+
+ a = new KAction(KIcon("view-refresh"), i18n("Reload All Tabs"), this);
+ actionCollection()->addAction( QLatin1String("reload_all_tabs"), a);
+ connect(a, SIGNAL(triggered(bool)), m_view, SLOT(slotReloadAllTabs()) );
+
+ // ------------------------------------------------------------------------------------------------------------
+
// Bookmarks ToolBar Action
QAction *qa = m_bmBar->toggleViewAction();
qa->setText( i18n("Bookmarks Toolbar") );
@@ -359,7 +376,7 @@ void MainWindow::setupActions()
// Bookmark Menu
KActionMenu *bmMenu = Application::bookmarkProvider()->bookmarkActionMenu(this);
- bmMenu->setIcon(KIcon("bookmarks-organize"));
+ bmMenu->setIcon(KIcon("bookmarks"));
bmMenu->setDelayed(false);
actionCollection()->addAction(QLatin1String("bookmarksActionMenu"), bmMenu);
diff --git a/src/settings.cpp b/src/settings.cpp
index 7b320448..9b12ef3a 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -65,6 +65,7 @@ private:
Ui::webkit webkitUi;
KCModuleProxy *ebrowsingModule;
KCModuleProxy *cookiesModule;
+ KShortcutsEditor *shortcutsEditor;
Private(SettingsDialog *parent);
@@ -102,8 +103,8 @@ Private::Private(SettingsDialog *parent)
KIcon webkitIcon = KIcon(QIcon(webkitIconPath));
pageItem->setIcon(webkitIcon);
- widget = new KShortcutsEditor(Application::instance()->mainWindow()->actionCollection(),parent);
- pageItem = parent->addPage(widget , i18n("Shortcuts"));
+ shortcutsEditor = new KShortcutsEditor(Application::instance()->mainWindow()->actionCollection(),parent);
+ pageItem = parent->addPage(shortcutsEditor , i18n("Shortcuts"));
pageItem->setIcon(KIcon("configure-shortcuts"));
KCModuleInfo ebrowsingInfo("ebrowsing.desktop");
@@ -135,7 +136,8 @@ SettingsDialog::SettingsDialog(QWidget *parent)
connect(d->ebrowsingModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
connect(d->cookiesModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
-
+ connect(d->shortcutsEditor, SIGNAL(keyChange()), this, SLOT(updateButtons()));
+
connect(this, SIGNAL(applyClicked()), this, SLOT(saveSettings()));
connect(this, SIGNAL(okClicked()), this, SLOT(saveSettings()));
@@ -188,6 +190,7 @@ void SettingsDialog::saveSettings()
ReKonfig::self()->writeConfig();
d->ebrowsingModule->save();
d->cookiesModule->save();
+ d->shortcutsEditor->save();
}
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 569a59c5..94f2c274 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -165,18 +165,18 @@ void TabBar::contextMenuRequested(const QPoint &position)
{
m_actualIndex = index;
- menu.addAction(KIcon("tab-duplicate"), i18n("Clone Tab"), this, SLOT(cloneTab()));
+ menu.addAction( mainWindow->actionByName("clone_tab") );
menu.addSeparator();
- menu.addAction(KIcon("tab-close"), i18n("&Close Tab"), this, SLOT(closeTab()));
- menu.addAction(KIcon("tab-close-other"), i18n("Close &Other Tabs"), this, SLOT(closeOtherTabs()));
+ menu.addAction( mainWindow->actionByName("close_tab") );
+ menu.addAction( mainWindow->actionByName("close_other_tabs") );
menu.addSeparator();
- menu.addAction(KIcon("view-refresh"), i18n("Reload Tab"), this, SLOT(reloadTab()));
+ menu.addAction( mainWindow->actionByName("reload_tab") );
}
else
{
menu.addSeparator();
}
- menu.addAction(i18n("Reload All Tabs"), this, SIGNAL(reloadAllTabs()));
+ menu.addAction( mainWindow->actionByName("reload_all_tabs") );
menu.exec(QCursor::pos());
}