~ubuntu-branches/debian/sid/kde-baseapps/sid

« back to all changes in this revision

Viewing changes to dolphin/src/settings/startup/startupsettingspage.cpp

  • Committer: Package Import Robot
  • Author(s): Modestas Vainius, Eshat Cakar, Pino Toscano
  • Date: 2012-06-09 22:18:08 UTC
  • mfrom: (4.2.1) (6.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20120609221808-h1l0ekd5qmb8nefr
Tags: 4:4.8.4-1
* New upstream release.

[ Eshat Cakar ]
* Add watch file.
* Bump kde-sc-dev-latest build dependency to version 4:4.8.4.
* Update installed files.

[ Pino Toscano ]
* Move files of the konqueror documentation from kde-baseapps-data to
  konqueror itself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
#include "startupsettingspage.h"
21
21
 
22
 
#include "settings/dolphinsettings.h"
23
22
#include "dolphinmainwindow.h"
24
23
#include "dolphinviewcontainer.h"
25
24
 
98
97
 
99
98
    loadSettings();
100
99
 
101
 
    connect(m_homeUrl, SIGNAL(textChanged(const QString&)), this, SLOT(slotSettingsChanged()));
 
100
    connect(m_homeUrl, SIGNAL(textChanged(QString)), this, SLOT(slotSettingsChanged()));
102
101
    connect(m_splitView,    SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
103
102
    connect(m_editableUrl,  SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
104
103
    connect(m_showFullPath, SIGNAL(toggled(bool)), this, SLOT(slotSettingsChanged()));
111
110
 
112
111
void StartupSettingsPage::applySettings()
113
112
{
114
 
    GeneralSettings* settings = DolphinSettings::instance().generalSettings();
 
113
    GeneralSettings* settings = GeneralSettings::self();
115
114
 
116
115
    const KUrl url(m_homeUrl->text());
117
116
    KFileItem fileItem(KFileItem::Unknown, KFileItem::Unknown, url);
131
130
 
132
131
void StartupSettingsPage::restoreDefaults()
133
132
{
134
 
    GeneralSettings* settings = DolphinSettings::instance().generalSettings();
 
133
    GeneralSettings* settings = GeneralSettings::self();
135
134
    settings->useDefaults(true);
136
135
    loadSettings();
137
136
    settings->useDefaults(false);
142
141
    // Provide a hint that the startup settings have been changed. This allows the views
143
142
    // to apply the startup settings only if they have been explicitly changed by the user
144
143
    // (see bug #254947).
145
 
    GeneralSettings* settings = DolphinSettings::instance().generalSettings();
146
 
    settings->setModifiedStartupSettings(true);
147
 
 
 
144
    GeneralSettings::setModifiedStartupSettings(true);
148
145
    emit changed();
149
146
}
150
147
 
171
168
 
172
169
void StartupSettingsPage::loadSettings()
173
170
{
174
 
    GeneralSettings* settings = DolphinSettings::instance().generalSettings();
175
 
    KUrl url(settings->homeUrl());
 
171
    const KUrl url(GeneralSettings::homeUrl());
176
172
    m_homeUrl->setText(url.prettyUrl());
177
 
    m_splitView->setChecked(settings->splitView());
178
 
    m_editableUrl->setChecked(settings->editableUrl());
179
 
    m_showFullPath->setChecked(settings->showFullPath());
180
 
    m_filterBar->setChecked(settings->filterBar());
 
173
    m_splitView->setChecked(GeneralSettings::splitView());
 
174
    m_editableUrl->setChecked(GeneralSettings::editableUrl());
 
175
    m_showFullPath->setChecked(GeneralSettings::showFullPath());
 
176
    m_filterBar->setChecked(GeneralSettings::filterBar());
181
177
}
182
178
 
183
179
#include "startupsettingspage.moc"