Summary: | KTImeTracker does not start if it gets a -caption parameter | ||
---|---|---|---|
Product: | [Applications] ktimetracker | Reporter: | Tomas Mecir <mecirt> |
Component: | general | Assignee: | Thorsten Staerk <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Tomas Mecir
2008-08-03 13:20:33 UTC
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 |