summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com>2009-04-14 11:55:38 -0400
committerSøren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com>2009-04-14 11:55:38 -0400
commit97c68da0c64c0c97fa5dfe99c57ece9a31231c5a (patch)
tree6da89da4d6c95f515a79f78f3df2e1bf8c7e80a1
parentb67bf71c88383079d851df6fd5217ce95fee045a (diff)
Fix startup notification
-rw-r--r--TODO4
-rw-r--r--siv.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/TODO b/TODO
index 9967f31..c4d08d3 100644
--- a/TODO
+++ b/TODO
@@ -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).
diff --git a/siv.c b/siv.c
index b122caa..3bd7000 100644
--- a/siv.c
+++ b/siv.c
@@ -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;