Version: (using KDE 4.1.0) Installed from: SuSE RPMs If ktimetracker receives a -caption "anything can be here" parameter on the command line, it fails to start properly, terminating instantly instead. This is a problem, because the karm.desktop file (on openSuSE at least, no idea about other distros) gives it the -caption parameter, making it impossible to start ktimetracker from krunner/kickoff with the default installation.
If you hand over parameters to ktimetracker, it falls into the konsolemode, this means, you can tell it something like ktimetracker --addtask mytask This is the explanation why it terminates at an instant. More to follow.
Here is a patch that I want to apply. About that way: Index: main.cpp =================================================================== --- main.cpp (revision 844739) +++ main.cpp (working copy) @@ -111,15 +111,17 @@ KCmdLineArgs::addCmdLineOptions( options ); KUniqueApplication::addCmdLineOptions(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - /* when do we open a gui, when do we use konsole mode ? - call argc args->count konsolemode - ktimetracker 1 0 no - ktimetracker /tmp/test 2 1 no - ktimetracker /tmp/test --listtasknames 3 1 yes - ktimetracker --listtasknames 2 0 yes - */ int err=0; // error code - if ( argc-( args->count() ) <= 1) + bool konsolemode=false; + if ( args->isSet("listtasknames") ) konsolemode=true; + if ( !args->getOption("addtask").isEmpty() ) konsolemode=true; + if ( !args->getOption("deletetask").isEmpty() ) konsolemode=true; + if ( !args->getOption("taskidsfromname").isEmpty() ) konsolemode=true; + if ( !args->getOption("totalminutesfortaskid").isEmpty() ) konsolemode=true; + if ( !args->getOption("starttask").isEmpty() ) konsolemode=true; + if ( !args->getOption("stoptask").isEmpty() ) konsolemode=true; + + if ( !konsolemode ) { // no konsole mode KPIM::PimApplication myApp; MainWindow *mainWindow;
SVN commit 845106 by tstaerk: Decide depending on the parameters if you get into a dialog with the user. BUGS:168202 M +10 -8 main.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=845106