Make GTimeLog a single instance application
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GTimeLog |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Currently it is possible to start multiple instances of GTimeLog, to me personally this doesn't seem very useful.
The attached patch turns GTimeLog into a single-instance application for all platforms with DBus (python-dbus) and degrade gracefully for those without. When another instance is started the application checks whether or not the DBus service is running, if so (meaning that another instance of GTimeLog is still running) it calls a ToggleFocus function which shows the main GTimeLog window if it wasn't visible (active) or hides it if it was (meaning you were most likely looking at it).
This behavior is also handy when you consider you can already easily assign global keybindings when running Metacity (gconf /apps/metacity/
Though not exactly related, this patch also introduces a new configuration key (boolean) start_in_tray which when enabled will make sure that GTimeLog always starts hidden.
Changed in gtimelog: | |
status: | New → Confirmed |
Changed in gtimelog: | |
importance: | Undecided → Medium |
tags: | added: patch |
Changed in gtimelog: | |
status: | Fix Committed → Fix Released |
Uhm, not sure what I was smoking but the comment in main() made no sense.