diff options
| author | David Zeuthen <davidz@redhat.com> | 2009-04-15 12:33:11 -0400 |
|---|---|---|
| committer | David Zeuthen <davidz@redhat.com> | 2009-04-15 12:33:11 -0400 |
| commit | 122c651f99ee1ad730a35925db520d8fb90bd4f4 (patch) | |
| tree | a9f8e2b8435f60dfa85cc12dc7908e3e99abf1c7 /src/notification | |
| parent | da5dd2b06ccfe0725e2e9d20f0e51e366eaa51a6 (diff) | |
| download | gnome-disk-utility-122c651f99ee1ad730a35925db520d8fb90bd4f4.tar.gz gnome-disk-utility-122c651f99ee1ad730a35925db520d8fb90bd4f4.tar.xz gnome-disk-utility-122c651f99ee1ad730a35925db520d8fb90bd4f4.zip | |
work around notification-daemon brokenness
On login, the bubble is not correctly positioned and it even appears
that it disappears when the background is changed. So delay start up
five seconds.
Diffstat (limited to 'src/notification')
| -rw-r--r-- | src/notification/notification-main.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/src/notification/notification-main.c b/src/notification/notification-main.c index d34028d..a63a090 100644 --- a/src/notification/notification-main.c +++ b/src/notification/notification-main.c @@ -23,6 +23,7 @@ #include <gtk/gtk.h> #include <glib/gi18n.h> +#include <stdlib.h> #include <gdu/gdu.h> #include <gdu-gtk/gdu-gtk.h> @@ -527,17 +528,36 @@ show_menu_for_status_icon (NotificationData *data) int main (int argc, char **argv) { + GError *error; NotificationData *data; - - gtk_init (&argc, &argv); - notify_init ("gdu-notification-daemon"); + gboolean opt_delay; + GOptionEntry opt_entries[] = { + { "delay", 0, 0, G_OPTION_ARG_NONE, &opt_delay, "Delay startup for five seconds", NULL }, + { NULL } + }; + + error = NULL; + if (!gtk_init_with_args (&argc, &argv, + "gnome-disk-utility notification daemon", + opt_entries, + GETTEXT_PACKAGE, + &error)) { + g_error ("%s", error->message); + g_error_free (error); + exit (1); + } bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); + notify_init ("gdu-notification-daemon"); + gtk_window_set_default_icon_name ("palimpsest"); + if (opt_delay) + sleep (5); + data = notification_data_new (); update_all (data); |
