diff options
author | Søren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com> | 2009-04-14 11:55:38 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com> | 2009-04-14 11:55:38 -0400 |
commit | 97c68da0c64c0c97fa5dfe99c57ece9a31231c5a (patch) | |
tree | 6da89da4d6c95f515a79f78f3df2e1bf8c7e80a1 | |
parent | b67bf71c88383079d851df6fd5217ce95fee045a (diff) |
Fix startup notification
-rw-r--r-- | TODO | 4 | ||||
-rw-r--r-- | siv.c | 11 |
2 files changed, 10 insertions, 5 deletions
@@ -26,12 +26,12 @@ - Loading arrays of files -- Handle startup notification across dbus - - Remember the directory in the open file dialog Done: +- Handle startup notification across dbus + - When failing from the command line, print failure on stdout rather than displaying an alert. (This doesn't work very well if the process is running in the background, but still has a terminal). @@ -571,8 +571,10 @@ main (int argc, { char **files; int i; + gboolean sn = g_getenv ("DESKTOP_STARTUP_ID"); - g_print ("existing process\n"); + if (sn) + gtk_init (&argc, &argv); files = process_options (argc, argv); @@ -585,8 +587,11 @@ main (int argc, files[i]); } - /* FIXME: send the startup ID across the wire instead */ - gdk_notify_startup_complete (); + if (sn) + { + /* FIXME: send the startup ID across the wire instead */ + gdk_notify_startup_complete (); + } } return 0; |