diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-15 01:10:51 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-02-15 01:10:51 -0600 |
commit | 7e955780a5e4a4a46e797fc6f6f884693f238688 (patch) | |
tree | e69cbc9331085ff55123a45b4bbcb52e7778f548 /twin/kcmtwin | |
parent | 0a95f048637129360015e2f4300204ef4a858bff (diff) | |
download | tdebase-7e955780a5e4a4a46e797fc6f6f884693f238688.tar.gz tdebase-7e955780a5e4a4a46e797fc6f6f884693f238688.zip |
Start new WM on application
Diffstat (limited to 'twin/kcmtwin')
-rw-r--r-- | twin/kcmtwin/twindecoration/twindecoration.cpp | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/twin/kcmtwin/twindecoration/twindecoration.cpp b/twin/kcmtwin/twindecoration/twindecoration.cpp index 89e6134d5..d65530a38 100644 --- a/twin/kcmtwin/twindecoration/twindecoration.cpp +++ b/twin/kcmtwin/twindecoration/twindecoration.cpp @@ -54,6 +54,7 @@ #include <kdialog.h> #include <kgenericfactory.h> #include <kaboutdata.h> +#include <kprocess.h> #include <dcopclient.h> #include "twindecoration.h" @@ -333,7 +334,7 @@ KWinDecorationModule::KWinDecorationModule(TQWidget* parent, const char* name, c windowmanagerLayout->addWidget(thirdpartyWMLabel); windowmanagerLayout->addWidget(thirdpartyWMList); thirdpartyWMArguments = new KLineEdit( windowmanagerPage ); - whatsThis = i18n("Specify any command line arguments to be passed to the selected WM on startup. A common example is --replace"); + whatsThis = i18n("Specify any command line arguments to be passed to the selected WM on startup, separated with whitespace. A common example is replace"); TQWhatsThis::add(thirdpartyWMArguments, whatsThis); TQLabel* thirdpartyWMArgumentsLabel = new TQLabel(i18n("Command line arguments to pass to the Window Manager (should remain blank unless needed):"), windowmanagerPage); windowmanagerLayout->addWidget(thirdpartyWMArgumentsLabel); @@ -452,10 +453,10 @@ void KWinDecorationModule::createThirdPartyWMList() // This list SHOULD NOT be hard coded // It should detect the available WMs through a standard mechanism of some sort TQString wmExecutable; - TQStringList wmNames; - TQStringList wmAvailableNames; - wmNames << TQString("kwin ").append(i18n("(KDE4's window manager)")) << TQString("compiz ").append(i18n("(Compiz Effects Manager)")) << TQString("icewm ").append(i18n("(Simple, fast window manager)")); - wmNames.sort(); + TQStringList wmNames; + TQStringList wmAvailableNames; + wmNames << TQString("kwin ").append(i18n("(KDE4's window manager)")) << TQString("compiz ").append(i18n("(Compiz Effects Manager)")) << TQString("icewm ").append(i18n("(Simple, fast window manager)")); + wmNames.sort(); wmNames.prepend(TQString("twin ").append(i18n("(Default TDE window manager)"))); for (it = wmNames.begin(); it != wmNames.end(); ++it) { @@ -469,7 +470,7 @@ void KWinDecorationModule::createThirdPartyWMList() } } - thirdpartyWMList->insertStringList(wmAvailableNames); + thirdpartyWMList->insertStringList(wmAvailableNames); } @@ -817,6 +818,15 @@ void KWinDecorationModule::writeConfig( KConfig* conf ) if (descStart >= 0) { wmExecutableName.truncate(descStart); } + if (conf->readEntry("WMExecutable", "twin") != wmExecutableName) { + KProcess newWMProc; + TQStringList wmstartupcommand; + wmstartupcommand.split(" ", thirdpartyWMArguments->text()); + wmstartupcommand.prepend(wmExecutableName); + newWMProc << wmstartupcommand; + newWMProc.start(KProcess::DontCare, NoCommunication); + newWMProc.detach(); + } conf->writeEntry("WMExecutable", wmExecutableName); conf->writeEntry("WMAdditionalArguments", thirdpartyWMArguments->text()); |