summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com>2009-04-14 08:00:34 -0400
committerSøren Sandmann Pedersen <ssp@dhcp-100-2-40.bos.redhat.com>2009-04-14 08:00:34 -0400
commitb67bf71c88383079d851df6fd5217ce95fee045a (patch)
tree584cefc8d87674a1c0b4b203647d304536bbe949
parentdc927e676bfadb834ede60de8c10eb4a5d128962 (diff)
Handle startup notification in the dbus case
-rw-r--r--TODO7
-rw-r--r--siv.c16
2 files changed, 11 insertions, 12 deletions
diff --git a/TODO b/TODO
index 88cfdc8..9967f31 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,3 @@
-- When failing from the command line, print failure on stdout rather
- than displaying an alert.
-
- Keyboard shortcuts
zoom in
zoom out
@@ -35,6 +32,10 @@
Done:
+- 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).
+
- Icon
- Set the image as icon when one is loaded
diff --git a/siv.c b/siv.c
index 3502df1..b122caa 100644
--- a/siv.c
+++ b/siv.c
@@ -6,6 +6,7 @@
#include <math.h>
#include <libnul.h>
#include <signal.h>
+#include <unistd.h>
#include "siv.h"
#define _(a) a
@@ -61,27 +62,21 @@ app_show_could_not_open (GtkWidget *parent_window,
const char *header = NULL;
GString *text;
int i;
-
+
if (n_files == 0)
- {
return;
- }
else if (n_files == 1)
- {
header = "<b>Could not open this file:</b>";
- }
else
- {
header = "<b>Could not open these files:</b>";
- }
-
+
text = g_string_new (header);
for (i = 0; i < n_files; ++i)
g_string_append_printf (text, "\n%s", files[i]);
app_show_warning (NULL, NULL, "%s", text->str);
-
+
g_string_free (text, TRUE);
}
@@ -589,6 +584,9 @@ main (int argc,
NULL/* callback */, NULL/* data */,
files[i]);
}
+
+ /* FIXME: send the startup ID across the wire instead */
+ gdk_notify_startup_complete ();
}
return 0;