summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegabigbug <megabigbug@arrakis.(none)>2009-07-29 11:50:08 +0200
committermegabigbug <megabigbug@arrakis.(none)>2009-07-29 11:50:08 +0200
commit24363d6be965db3d93896e85d2d7dcbafcd42d4e (patch)
tree717520e1ab92c4e4d047428267210c7ed22ef487 /src
parentIncluding web shortcuts configuration dialog. (diff)
downloadrekonq-24363d6be965db3d93896e85d2d7dcbafcd42d4e.tar.xz
Add WebShorcuts Settings in the configuration panel
Remove Webshorcuts Settings item in menus Remove trailing spaces
Diffstat (limited to 'src')
-rw-r--r--src/application.cpp2
-rw-r--r--src/mainwindow.cpp31
-rw-r--r--src/mainwindow.h7
-rw-r--r--src/rekonqui.rc1
-rw-r--r--src/settings.cpp20
-rw-r--r--src/settings.h4
6 files changed, 33 insertions, 32 deletions
diff --git a/src/application.cpp b/src/application.cpp
index c49892b7..623c3034 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -90,7 +90,7 @@ int Application::newInstance()
setWindowIcon(KIcon("rekonq"));
m_mainWindow->show();
-
+
QTimer::singleShot(0, this, SLOT(postLaunch()));
}
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index ea387ae0..8cb005b1 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -301,7 +301,7 @@ void MainWindow::setupActions()
m_historyForwardAction = new KAction(KIcon("go-next"), i18n("Forward"), this);
connect(m_historyForwardAction, SIGNAL(triggered(bool)), this, SLOT(slotOpenNext()));
actionCollection()->addAction(QLatin1String("history_forward"), m_historyForwardAction);
-
+
// =================== Tab Actions
a = new KAction(KIcon("tab-new"), i18n("New &Tab"), this);
a->setShortcut(KShortcut(Qt::CTRL + Qt::Key_T, Qt::CTRL + Qt::Key_N));
@@ -327,11 +327,6 @@ 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()));
-
- // configure web shortcuts action
- a = new KAction(KIcon("preferences-web-browser-shortcuts"), i18n("Web Shortcuts"), this);
- actionCollection()->addAction(QLatin1String("web_shortcuts"), a);
- connect(a, SIGNAL(triggered(bool)), this, SLOT(configureWebShortcuts()));
}
@@ -343,27 +338,26 @@ void MainWindow::setupTools()
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::SaveAs)));
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::PrintPreview)));
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Find)));
-
+
KActionMenu *webMenu = new KActionMenu(KIcon("applications-development-web"), i18n("Web Development"), this);
webMenu->addAction(actionByName(QLatin1String("web_inspector")));
webMenu->addAction(actionByName(QLatin1String("page_source")));
toolsMenu->addAction(webMenu);
toolsMenu->addSeparator();
-
+
toolsMenu->addAction(actionByName(QLatin1String("private_browsing")));
toolsMenu->addAction(actionByName(QLatin1String("clear_private_data")));
-
+
toolsMenu->addSeparator();
-
+
toolsMenu->addAction(actionByName(QLatin1String("show_history_panel")));
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::FullScreen)));
-
+
toolsMenu->addSeparator();
// TODO: decide if re-enable this when rekonq docs will be written
// toolsMenu->addAction(KStandardAction::helpContents(this, SLOT(appHelpActivated()), actionCollection()));
- toolsMenu->addAction(actionByName(QLatin1String("web_shortcuts")));
toolsMenu->addAction(actionByName(KStandardAction::name(KStandardAction::Preferences)));
// adding rekonq_tools to rekonq actionCollection
@@ -966,17 +960,17 @@ void MainWindow::clearPrivateData()
{
Application::historyManager()->clear();
}
-
+
if(clearWidget.clearCookies->isChecked())
{
Application::cookieJar()->clear();
}
-
+
if(clearWidget.clearCachedPages->isChecked())
{
Application::networkAccessManager()->resetDiskCache();
}
-
+
if(clearWidget.clearWebIcons->isChecked())
{
QWebSettings::clearIconDatabase();
@@ -985,10 +979,3 @@ void MainWindow::clearPrivateData()
// this let crash rekonq.
// delete dialog;
}
-
-
-void MainWindow::configureWebShortcuts()
-{
- KRun::run( "kcmshell4 ebrowsing", KUrl::List(), this);
-}
- \ No newline at end of file
diff --git a/src/mainwindow.h b/src/mainwindow.h
index b3f88472..b50c5867 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -69,7 +69,7 @@ private:
void setupHistoryMenu();
void setupBars();
void setupTools();
-
+
void setupSidePanel();
SidePanel *sidePanel();
@@ -131,11 +131,10 @@ private slots:
// Settings Menu slots
void slotShowMenubar(bool enable);
void slotPreferences();
- void configureWebShortcuts();
-
+
// clear private data
void clearPrivateData();
-
+
private:
MainView *m_view;
FindBar *m_findBar;
diff --git a/src/rekonqui.rc b/src/rekonqui.rc
index 03b85527..6b250ab3 100644
--- a/src/rekonqui.rc
+++ b/src/rekonqui.rc
@@ -63,7 +63,6 @@
<Action name="web_inspector" />
<Action name="private_browsing" />
<Action name="clear_private_data" />
- <Action name="web_shortcuts" />
</Menu>
<!-- ============ SETTINGS menu =========== -->
diff --git a/src/settings.cpp b/src/settings.cpp
index 47339ce4..2610a351 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -51,6 +51,8 @@
#include <KFontDialog>
#include <KUrl>
#include <KShortcutsEditor>
+#include <KCModuleInfo>
+#include <KCModuleProxy>
// Qt Includes
#include <QtCore/QPointer>
@@ -65,6 +67,7 @@ private:
Ui::privacy privacyUi;
Ui::proxy proxyUi;
Ui::webkit webkitUi;
+ KCModuleProxy *ebrowsingModule;
Private(SettingsDialog *parent);
@@ -109,10 +112,16 @@ Private::Private(SettingsDialog *parent)
kWarning() << webkitIconPath;
KIcon webkitIcon = KIcon(QIcon(webkitIconPath));
pageItem->setIcon(webkitIcon);
-
+
widget = new KShortcutsEditor(Application::instance()->mainWindow()->actionCollection(),parent);
pageItem = parent->addPage(widget , i18n("Shortcuts"));
pageItem->setIcon(KIcon("configure-shortcuts"));
+
+ KCModuleInfo ebrowsingInfo("ebrowsing.desktop");
+ ebrowsingModule = new KCModuleProxy(ebrowsingInfo,parent);
+ pageItem = parent->addPage(ebrowsingModule, i18n(ebrowsingInfo.moduleName().toLocal8Bit()));
+ pageItem->setIcon(KIcon(ebrowsingInfo.icon()));
+
}
@@ -135,11 +144,13 @@ SettingsDialog::SettingsDialog(QWidget *parent)
connect(d->privacyUi.exceptionsButton, SIGNAL(clicked()), this, SLOT(showExceptions()));
connect(d->privacyUi.cookiesButton, SIGNAL(clicked()), this, SLOT(showCookies()));
+ connect(d->ebrowsingModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
+ connect(this, SIGNAL(applyClicked()), this, SLOT(saveSettings()));
+
setWebSettingsToolTips();
}
-
SettingsDialog::~SettingsDialog()
{
delete d;
@@ -189,8 +200,13 @@ void SettingsDialog::saveSettings()
// Save
ReKonfig::self()->writeConfig();
+ d->ebrowsingModule->save();
}
+bool SettingsDialog::hasChanged()
+{
+ return KConfigDialog::hasChanged() || d->ebrowsingModule->changed();
+}
// ----------------------------------------------------------------------------------------------
diff --git a/src/settings.h b/src/settings.h
index d9baa009..1ec76d5f 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -28,7 +28,7 @@
// Forward Declarations
class QWidget;
class Private;
-
+class KCModuleProxy;
class SettingsDialog : public KConfigDialog
{
@@ -37,10 +37,10 @@ class SettingsDialog : public KConfigDialog
public:
SettingsDialog(QWidget *parent = 0);
~SettingsDialog();
+ virtual bool hasChanged ();
private:
Private* const d;
-
void setWebSettingsToolTips();
private slots: