summaryrefslogtreecommitdiffstats
path: root/kcontrol/componentchooser/componentchooser.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2020-02-19 10:20:48 +0900
committerMichele Calgaro <[email protected]>2020-02-19 10:20:48 +0900
commita430111b101339a278dbe299b0dd5c2bc06528d8 (patch)
tree3824b54cae1b6222cb2557077effe42a78d20b82 /kcontrol/componentchooser/componentchooser.cpp
parentd4b559f91838a9d3e63c1aed0b3960dca4e4df14 (diff)
downloadtdebase-a430111b101339a278dbe299b0dd5c2bc06528d8.tar.gz
tdebase-a430111b101339a278dbe299b0dd5c2bc06528d8.zip
Added logic for selection of default file manager from TCC.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kcontrol/componentchooser/componentchooser.cpp')
-rw-r--r--kcontrol/componentchooser/componentchooser.cpp63
1 files changed, 15 insertions, 48 deletions
diff --git a/kcontrol/componentchooser/componentchooser.cpp b/kcontrol/componentchooser/componentchooser.cpp
index bee7797e1..c084c2fce 100644
--- a/kcontrol/componentchooser/componentchooser.cpp
+++ b/kcontrol/componentchooser/componentchooser.cpp
@@ -37,6 +37,7 @@
#include <kstandarddirs.h>
#include <ktrader.h>
#include <kurlrequester.h>
+#include <kprocess.h>
class MyListBoxItem: public TQListBoxText
{
@@ -211,13 +212,13 @@ void CfgEmailClient::save(TDEConfig *)
//BEGIN File Manager Configuration
-CfgFileManager::CfgFileManager(TQWidget *parent) : FileManagerConfig_UI(parent), CfgPlugin() {
- connect(filemanagerLE, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(configChanged()));
- connect(filemanagerCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(configChanged()));
- connect(otherCB, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(configChanged()));
+CfgFileManager::CfgFileManager(TQWidget *parent) : FileManagerConfig_UI(parent), CfgPlugin()
+{
+ btnOpenFileAssociations->setEnabled(true);
}
-CfgFileManager::~CfgFileManager() {
+CfgFileManager::~CfgFileManager()
+{
}
void CfgFileManager::configChanged()
@@ -227,57 +228,23 @@ void CfgFileManager::configChanged()
void CfgFileManager::defaults()
{
- load(0L);
+ load(0L);
}
-void CfgFileManager::load(TDEConfig *) {
- TDEConfig *config = new TDEConfig("kdeglobals", true);
- config->setGroup("General");
- TQString filemanager = config->readPathEntry("FileManagerApplication","konqueror");
- if (filemanager == "konqueror")
- {
- filemanagerLE->setText("");
- filemanagerCB->setChecked(true);
- }
- else
- {
- filemanagerLE->setText(filemanager);
- otherCB->setChecked(true);
- }
- delete config;
-
- emit changed(false);
+void CfgFileManager::load(TDEConfig *)
+{
}
-void CfgFileManager::save(TDEConfig *) {
-
- TDEConfig *config = new TDEConfig("kdeglobals");
- config->setGroup("General");
- config->writePathEntry("FileManagerApplication", filemanagerCB->isChecked() ? "konqueror" : filemanagerLE->text(),
- true, true);
- config->sync();
- delete config;
-
- KIPC::sendMessageAll(KIPC::SettingsChanged);
- kapp->dcopClient()->send("tdelauncher", "tdelauncher","reparseConfiguration()", TQString::null);
-
- emit changed(false);
+void CfgFileManager::save(TDEConfig *)
+{
}
-void CfgFileManager::selectFileManagerApp()
+void CfgFileManager::selectFileAssociations()
{
- KURL::List urlList;
- KOpenWithDlg dlg(urlList, i18n("Select preferred file manager application:"), TQString::null, this);
- // hide "Run in &terminal" here, we don't need it for a File Manager Application
- dlg.hideRunInTerminal();
- if (dlg.exec() != TQDialog::Accepted) return;
- TQString client = dlg.text();
-
- if (!client.isEmpty())
- {
- filemanagerLE->setText(client);
- }
+ TDEProcess p;
+ p << "tdecmshell" << "filetypes";
+ p.start(TDEProcess::DontCare);
}
//END File Manager Configuration