From b8a257b2dcddc3311c75ed3391f4d503e0b23382 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 8 Jul 2009 19:31:24 +0200 Subject: Cleaning settings ui && making optional hovering links popups --- src/mainwindow.cpp | 21 +++++++++++++++++---- src/rekonq.kcfg | 9 +++------ src/settings.cpp | 8 ++++---- src/settings_general.ui | 41 ++++++++++++++++------------------------- 4 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3cff7cff..82f95cfa 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -164,10 +164,6 @@ void MainWindow::postLaunch() connect(m_view, SIGNAL(loadProgress(int)), this, SLOT(slotLoadProgress(int))); connect(m_view, SIGNAL(printRequested(QWebFrame *)), this, SLOT(printRequested(QWebFrame *))); - // "status bar" messages (new notifyMessage system) - connect(m_view, SIGNAL(showStatusBarMessage(const QString&, Rekonq::Notify)), this, SLOT(notifyMessage(const QString&, Rekonq::Notify))); - connect(m_view, SIGNAL(linkHovered(const QString&)), this, SLOT(notifyMessage(const QString&))); - // update toolbar actions signals connect(m_view, SIGNAL(tabsChanged()), this, SLOT(slotUpdateActions())); connect(m_view, SIGNAL(currentChanged(int)), this, SLOT(slotUpdateActions())); @@ -367,6 +363,23 @@ void MainWindow::slotUpdateConfiguration() mainView()->showTabBar(); mainView()->setMakeBackTab( ReKonfig::openTabsBack() ); + // "status bar" messages (new notifyMessage system) + if(ReKonfig::showUrlsPopup()) + { + connect(m_view, SIGNAL(showStatusBarMessage(const QString&, Rekonq::Notify)), + this, SLOT(notifyMessage(const QString&, Rekonq::Notify))); + connect(m_view, SIGNAL(linkHovered(const QString&)), + this, SLOT(notifyMessage(const QString&))); + } + else + { + disconnect(m_view, SIGNAL(showStatusBarMessage(const QString&, Rekonq::Notify)), + this, SLOT(notifyMessage(const QString&, Rekonq::Notify))); + disconnect(m_view, SIGNAL(linkHovered(const QString&)), + this, SLOT(notifyMessage(const QString&))); + } + + // =========== Fonts ============== QWebSettings *defaultSettings = QWebSettings::globalSettings(); diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg index 499258d2..d6e3a8ae 100644 --- a/src/rekonq.kcfg +++ b/src/rekonq.kcfg @@ -14,12 +14,6 @@ http://www.kde.org/ - - $HOME - - - false - true @@ -29,6 +23,9 @@ false + + false + diff --git a/src/settings.cpp b/src/settings.cpp index 297b81d9..ab315a9d 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -162,9 +162,9 @@ void SettingsDialog::setWebSettingsToolTips() void SettingsDialog::readConfig() { // ======= General - d->generalUi.downloadDirUrlRequester->setMode(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly); - d->generalUi.downloadDirUrlRequester->setUrl(ReKonfig::downloadDir()); - connect(d->generalUi.downloadDirUrlRequester, SIGNAL(textChanged(QString)), this, SLOT(saveSettings())); +// d->generalUi.downloadDirUrlRequester->setMode(KFile::Directory | KFile::ExistingOnly | KFile::LocalOnly); +// d->generalUi.downloadDirUrlRequester->setUrl(ReKonfig::downloadDir()); +// connect(d->generalUi.downloadDirUrlRequester, SIGNAL(textChanged(QString)), this, SLOT(saveSettings())); // ======= Fonts d->fontsUi.kcfg_fixedFont->setOnlyFixed(true); @@ -180,7 +180,7 @@ void SettingsDialog::readConfig() void SettingsDialog::saveSettings() { // General - ReKonfig::setDownloadDir(d->generalUi.downloadDirUrlRequester->url().prettyUrl()); +// ReKonfig::setDownloadDir(d->generalUi.downloadDirUrlRequester->url().prettyUrl()); // Save ReKonfig::self()->writeConfig(); diff --git a/src/settings_general.ui b/src/settings_general.ui index 95723e78..d6ce4e49 100644 --- a/src/settings_general.ui +++ b/src/settings_general.ui @@ -64,26 +64,6 @@ - - - - - - - Save downloads to: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Ask where to save downloads - - - @@ -110,6 +90,22 @@ + + + + General Settings + + + + + + show urls in popup hovering links + + + + + + @@ -131,11 +127,6 @@ QLineEdit
klineedit.h
- - KUrlRequester - QFrame -
kurlrequester.h
-
-- cgit v1.2.1