diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-08-08 15:05:40 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:48:05 +0100 |
commit | 3464290338fb7aaf8057d229221abf96ce349929 (patch) | |
tree | 1071bcb1ab89b7f97d80b2d852313665c0ef158c /src/webwindow | |
parent | Tools actions restored (diff) | |
download | rekonq-3464290338fb7aaf8057d229221abf96ce349929.tar.xz |
Restore rekonq settings
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); |