diff options
Diffstat (limited to 'src/webwindow')
-rw-r--r-- | src/webwindow/webwindow.cpp | 21 | ||||
-rw-r--r-- | src/webwindow/webwindow.h | 3 |
2 files changed, 23 insertions, 1 deletions
diff --git a/src/webwindow/webwindow.cpp b/src/webwindow/webwindow.cpp index 2dc476c1..4d350d71 100644 --- a/src/webwindow/webwindow.cpp +++ b/src/webwindow/webwindow.cpp @@ -41,6 +41,7 @@ #include "bookmarkstoolbar.h" #include "rekonqfactory.h" #include "rekonqmenu.h" +#include "settingsdialog.h" #include "urlbar.h" #include "websnap.h" @@ -304,7 +305,7 @@ void WebWindow::setupActions() // <Action name="help_about_kde"/> // </Menu> // -// <Action name="options_configure" /> +// <Action name="options_configure" /> + // </Menu> } @@ -788,3 +789,21 @@ void WebWindow::setEditable(bool on) { page()->setContentEditable(on); } + + +void WebWindow::preferences() +{ + // an instance the dialog could be already created and could be cached, + // in which case you want to display the cached dialog + if (SettingsDialog::showDialog("rekonfig")) + return; + + // we didn't find an instance of this dialog, so lets create it + QPointer<SettingsDialog> s = new SettingsDialog(this); + + // keep us informed when the user changes settings + connect(s, SIGNAL(settingsChanged(QString)), rApp, SLOT(updateConfiguration())); + connect(s, SIGNAL(finished(int)), s, SLOT(deleteLater())); + + s->show(); +} diff --git a/src/webwindow/webwindow.h b/src/webwindow/webwindow.h index ef8a502b..8d9afefc 100644 --- a/src/webwindow/webwindow.h +++ b/src/webwindow/webwindow.h @@ -115,6 +115,9 @@ private Q_SLOTS: void populateUserAgentMenu(); void setEditable(bool); + // Settings Menu slot + void preferences(); + Q_SIGNALS: void titleChanged(QString); |