[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kicker/extensions/dockbar
From: Oswald Buddenhagen <ossi () kde ! org>
Date: 2003-06-03 18:33:01
[Download RAW message or body]
CVS commit by ossi:
one more cvsrevertlast + proper fix.
please, don't play ping-pong, but investigate the issues properly. in
case of doubt ask "the breaker" first.
btw, incidentally the old code mostly worked since yesterday due to a
kshell change.
M +21 -31 dockbarextension.cpp 1.13
--- kdebase/kicker/extensions/dockbar/dockbarextension.cpp #1.12:1.13
@@ -28,4 +28,5 @@ CONNECTION WITH THE SOFTWARE OR THE USE
#include <kconfig.h>
#include <kprocess.h>
+#include <kshell.h>
#include <kwin.h>
#include <kstandarddirs.h>
@@ -90,15 +92,7 @@ void DockBarExtension::windowAdded(WId w
QString command;
if (XGetCommand(qt_xdisplay(), win, &argv, &argc)) {
- if (argc > 0 && argv != NULL) {
- command = argv[0];
- int i = 1;
- while (i < argc) {
- command += " ";
- command += argv[i];
- ++i;
- }
+ command = KShell::joinArgs(argv, argc);
XFreeStringList(argv);
}
- }
// try to read wm hints
@@ -140,7 +134,6 @@ void DockBarExtension::windowAdded(WId w
// get bug reports about whatever commenting it out was supposed
// to fix.
- if (resIconwin == 0) {
+ if (resIconwin == 0)
resIconwin = win;
- }
// try to read class hint
@@ -200,5 +193,5 @@ void DockBarExtension::embedWindow(WId w
layoutContainers();
emit updateLayout();
- if (KStandardDirs::findExe(QStringList::split(" ",container->command()).front()).isEmpty()) {
+ if (KStandardDirs::findExe(KShell::splitArgs(container->command()).front()).isEmpty()) {
container->askNewCommand();
}
@@ -273,12 +266,9 @@ void DockBarExtension::loadContainerConf
if (cmd.isEmpty() || resName.isEmpty() || resClass.isEmpty()) continue;
- KProcess proc;
- QStringList args = QStringList::split( " ", cmd );
- for (QStringList::Iterator it2 = args.begin(); it2 != args.end(); ++it2)
- proc << *it2;
-
DockContainer* c = new DockContainer(cmd, this, resName, resClass );
addContainer(c);
+ KProcess proc;
+ proc << KShell::splitArgs( *it );
if (!proc.start(KProcess::DontCare)) {
fail_list.append(cmd);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic