svn path=/trunk/KDE/kdebase/apps/; revision=637272
<label>Should the view properties used for all directories</label>
<default>false</default>
</entry>
<label>Should the view properties used for all directories</label>
<default>false</default>
</entry>
- <entry name="ShowDeleteCommand" type="Bool">
- <label>Should the command 'Delete' be shown in the context menu</label>
- <default>false</default>
- </entry>
<entry name="ViewPropsTimestamp" type="DateTime" >
<label>Timestamp since when the view properties are valid</label>
</entry>
<entry name="ViewPropsTimestamp" type="DateTime" >
<label>Timestamp since when the view properties are valid</label>
</entry>
#include "dolphinview.h"
#include "editbookmarkdialog.h"
#include "dolphinview.h"
#include "editbookmarkdialog.h"
-#include "dolphin_generalsettings.h"
-
#include <assert.h>
#include <kactioncollection.h>
#include <assert.h>
#include <kactioncollection.h>
popup->addAction(renameAction);
// insert 'Move to Trash' and (optionally) 'Delete'
popup->addAction(renameAction);
// insert 'Move to Trash' and (optionally) 'Delete'
- bool showDeleteCommand = DolphinSettings::instance().generalSettings()->showDeleteCommand();
+ const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals);
+ const KConfigGroup kdeConfig(globalConfig, "KDE");
+ bool showDeleteCommand = kdeConfig.readEntry("ShowDeleteCommand", false);
const KUrl& url = dolphin->activeView()->url();
if (url.isLocalFile()) {
QAction* moveToTrashAction = dolphin->actionCollection()->action("move_to_trash");
const KUrl& url = dolphin->activeView()->url();
if (url.isLocalFile()) {
QAction* moveToTrashAction = dolphin->actionCollection()->action("move_to_trash");
startBoxLayout->addWidget(m_startEditable);
m_showDeleteCommand = new QCheckBox(i18n("Show the command 'Delete' in context menu"), vBox);
startBoxLayout->addWidget(m_startEditable);
m_showDeleteCommand = new QCheckBox(i18n("Show the command 'Delete' in context menu"), vBox);
- // TODO: use global config like in Konqueror or is this a custom setting for Dolphin?
- m_showDeleteCommand->setChecked(settings->showDeleteCommand());
+ const KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals);
+ const KConfigGroup kdeConfig(globalConfig, "KDE");
+ m_showDeleteCommand->setChecked(kdeConfig.readEntry("ShowDeleteCommand", false));
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
// Add a dummy widget with no restriction regarding
// a vertical resizing. This assures that the dialog layout
settings->setSplitView(m_startSplit->isChecked());
settings->setEditableUrl(m_startEditable->isChecked());
settings->setSplitView(m_startSplit->isChecked());
settings->setEditableUrl(m_startEditable->isChecked());
- settings->setShowDeleteCommand(m_showDeleteCommand->isChecked());
+
+ KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig("kdeglobals", KConfig::NoGlobals);
+ KConfigGroup kdeConfig(globalConfig, "KDE");
+ kdeConfig.writeEntry("ShowDeleteCommand", m_showDeleteCommand->isChecked());
+ kdeConfig.sync();
}
void GeneralSettingsPage::selectHomeUrl()
}
void GeneralSettingsPage::selectHomeUrl()