summaryrefslogtreecommitdiffstats
path: root/src/traylabelmgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/traylabelmgr.cpp')
-rw-r--r--src/traylabelmgr.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/traylabelmgr.cpp b/src/traylabelmgr.cpp
index 54e8fbd..54b98bd 100644
--- a/src/traylabelmgr.cpp
+++ b/src/traylabelmgr.cpp
@@ -327,9 +327,7 @@ bool TrayLabelMgr::processCommand(int argc, char** argv)
} // while (getopt)
// Launch an application if present in command line. else request from user
- CustomTrayLabel *t = (CustomTrayLabel *) // this should be dynamic_cast
- ((optind < argc) ? dockApplication(&argv[optind])
- : selectAndDock(w, check_normality));
+ TQTrayLabel *t = (optind < argc) ? dockApplication(&argv[optind]) : selectAndDock(w, check_normality);
if (t == NULL) return false;
// apply settings and add to tray
manageTrayLabel(t);
@@ -338,7 +336,7 @@ bool TrayLabelMgr::processCommand(int argc, char** argv)
t->setBalloonTimeout(balloon_timeout);
t->setDockWhenObscured(dock_obscure);
if (withdraw) t->withdraw(); else t->map();
- t->enableSessionManagement(enable_sm);
+ t->setSessionManagement(enable_sm);
t->dock();
return true;
}
@@ -379,7 +377,10 @@ TQTrayLabel *TrayLabelMgr::selectAndDock(Window w, bool checkNormality)
}
}
- if (!isWindowDocked(w)) return new CustomTrayLabel(w);
+ if (!isWindowDocked(w))
+ {
+ return new TQTrayLabel(w);
+ }
TRACE("0x%x is alredy docked", (unsigned) w);
@@ -438,10 +439,14 @@ TQTrayLabel *TrayLabelMgr::dockApplication(char *argv[])
}
TQStringList cmd_line;
- for(int i=0;;i++)
- if (argv[i]) cmd_line << argv[i]; else break;
+ int i = 0;
+ while (argv[i])
+ {
+ cmd_line.append(argv[i]);
+ ++i;
+ }
- TQTrayLabel *label = new CustomTrayLabel(cmd_line, pid);
+ TQTrayLabel *label = new TQTrayLabel(cmd_line, pid);
TDEApplication::kApplication()->syncX();
write(filedes[1], buf, sizeof(buf));
close(filedes[0]);
@@ -537,7 +542,7 @@ void TrayLabelMgr::doRestoreSession()
if (!pname.isEmpty())
{
TRACE("Restoring Application[%s]", pname.ascii());
- manageTrayLabel(new CustomTrayLabel(TQStringList::split(" ", pname), 0));
+ manageTrayLabel(new TQTrayLabel(TQStringList::split(" ", pname), 0));
mTrayLabels.getFirst()->restoreState(config);
}
}