summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp38
1 files changed, 36 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 1cd955e..b61d52e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -24,6 +24,10 @@
#include <unistd.h>
#include <signal.h>
+#include <tdeaboutdata.h>
+#include <tdeapplication.h>
+#include <tdecmdlineargs.h>
+#include <tdeglobal.h>
#include <tdelocale.h>
#include <tqdir.h>
@@ -36,14 +40,33 @@ static void sighandler(int sig)
{
if (sig == SIGUSR1)
{
- DUMP_TRACE(TQDir::homeDirPath() + "/tdedocker.trace");
+ DUMP_TRACE((TQDir::homeDirPath() + "/tdedocker.trace").ascii());
return;
}
tqDebug("%s", i18n("Caught signal %1. Cleaning up.").arg(sig).local8Bit().data());
((TDEDocker *)tqApp)->trayLabelMgr()->undockAll();
+ ::exit(0);
}
+static const TDECmdLineOptions options[] =
+{
+ { "b", I18N_NOOP("Dont warn about non-normal windows (blind mode)"), 0L },
+ { "d", I18N_NOOP("Disable session management"), 0L },
+ { "e", I18N_NOOP("Enable session management"), 0L },
+ { "f", I18N_NOOP("Dock window that has the focus(active window)"), 0L },
+ { "i icon", I18N_NOOP("Custom dock Icon"), 0L },
+ { "m", I18N_NOOP("Keep application window mapped (dont hide on dock)"), 0L },
+ { "o", I18N_NOOP("Dock when obscured"), 0L },
+ { "p secs", I18N_NOOP("Set ballooning timeout (popup time)"), 0L },
+ { "q", I18N_NOOP("Disable ballooning title changes (quiet)"), 0L },
+ { "t", I18N_NOOP("Remove this application from the task bar"), 0L },
+ { "w wid", I18N_NOOP("Window id of the application to dock"), 0L },
+ { "+[command <args>]", I18N_NOOP("Application to dock"), 0 },
+ TDECmdLineLastOption
+};
+
+//extern "C" int KDE_EXPORT kdemain(int argc, char* argv[])
int main(int argc, char *argv[])
{
// setup signal handlers that undock and quit
@@ -52,6 +75,17 @@ int main(int argc, char *argv[])
signal(SIGINT, sighandler);
signal(SIGUSR1, sighandler);
- TDEDocker app(argc, argv);
+ TDEAboutData about("tdedocker", I18N_NOOP("tdedocker"), "1.3",
+ I18N_NOOP("Docks any application into the system tray\nNOTE: Use -d for all startup scripts."), TDEAboutData::License_GPL);
+ about.addAuthor("John Schember", I18N_NOOP("Original KDocker maintainer"), "[email protected]");
+ about.addAuthor("Girish Ramakrishnan", I18N_NOOP("Original KDocker developer"), "[email protected]");
+
+ TDEGlobal::locale()->setMainCatalogue("tdedocker");
+
+ TDECmdLineArgs::init(argc, argv, &about);
+ TDECmdLineArgs::addCmdLineOptions(options);
+ TDEDocker::addCmdLineOptions();
+ TDEDocker app;
+
return app.exec();
}