summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-01-19 02:26:13 +0100
committerAndrea Diamantini <adjam7@gmail.com>2009-01-19 02:26:13 +0100
commit76d30285358bedd8b2fc6caf48d2a871f7546685 (patch)
tree28ee333ad33eeeb4f6edd9f647702fc2522db122 /src/mainwindow.cpp
parentm_tabWidget --> m_view (diff)
downloadrekonq-76d30285358bedd8b2fc6caf48d2a871f7546685.tar.xz
Ported tons of code to KConfigXT. To merge kcfg branch we need just to
port cookie settings..
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp33
1 files changed, 13 insertions, 20 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index bdf2120d..629899e4 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -66,7 +66,8 @@ MainWindow::MainWindow()
setAcceptDrops(true);
// updating rekonq configuration
- updateConfiguration();
+ slotUpdateConf();
+// QTimer::singleShot(0, this, SLOT( postLaunch() ) );
// creating a new tab
m_view->newTab();
@@ -118,7 +119,6 @@ MainWindow::MainWindow()
// Find Bar
m_findBar = new FindBar( this );
connect( m_findBar, SIGNAL( searchString(const QString &) ), this, SLOT( slotFind(const QString &) ) );
-
}
@@ -282,28 +282,11 @@ void MainWindow::setupCustomMenu()
// TODO FIXME
-void MainWindow::updateConfiguration()
+void MainWindow::slotUpdateConf()
{
// ============== General ==================
m_homePage = ReKonfig::homePage();
-// int historyExpire = ReKonfig::expireHistory();
-// int days;
-// switch (historyExpire)
-// {
-// case 0: days = 1; break;
-// case 1: days = 7; break;
-// case 2: days = 14; break;
-// case 3: days = 30; break;
-// case 4: days = 365; break;
-// case 5: days = -1; break;
-// default: days = -1;
-// }
-// m_historyExpire = days;
-//
-// m_downloadDir = ReKonfig::downloadDir();
-
-
// =========== Fonts ==============
QFont standardFont = ReKonfig::standardFont();
QFont fixedFont = ReKonfig::fixedFont();
@@ -454,7 +437,17 @@ void MainWindow::slotFileSaveAs()
void MainWindow::slotPreferences()
{
+ // 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( "settings" ) )
+ return;
+
+ // we didn't find an instance of this dialog, so lets create it
SettingsDialog *s = new SettingsDialog(this);
+
+ // keep us informed when the user changes settings
+ connect( s, SIGNAL(settingsChanged(const QString&)), this, SLOT(slotUpdateConf()) );
+
s->show();
}