SOURCES: goobox-libnotify.patch (NEW) - port to new libnotify

freetz freetz at pld-linux.org
Sun May 21 17:38:53 CEST 2006


Author: freetz                       Date: Sun May 21 15:38:53 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- port to new libnotify

---- Files affected:
SOURCES:
   goobox-libnotify.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/goobox-libnotify.patch
diff -u /dev/null SOURCES/goobox-libnotify.patch:1.1
--- /dev/null	Sun May 21 17:38:53 2006
+++ SOURCES/goobox-libnotify.patch	Sun May 21 17:38:48 2006
@@ -0,0 +1,52 @@
+diff -aurN goobox-0.9.93.orig/src/main.c goobox-0.9.93/src/main.c
+--- goobox-0.9.93.orig/src/main.c	2005-11-18 21:20:08.000000000 +0100
++++ goobox-0.9.93/src/main.c	2006-05-21 17:34:06.211841144 +0200
+@@ -47,7 +47,6 @@
+ 
+ #ifdef HAVE_LIBNOTIFY
+ #include <libnotify/notify.h>
+-static NotifyHandle *notify_h = NULL;
+ #endif /* HAVE_LIBNOTIFY */
+ 
+ GtkWindow *main_window = NULL;
+@@ -193,7 +192,7 @@
+ 
+ #ifdef HAVE_LIBNOTIFY
+ 	if (! notify_init ("goobox")) 
+-                g_error ("Cannot initialize notification system.");
++                g_warning ("Cannot initialize notification system.");
+ #endif /* HAVE_LIBNOTIFY */
+ 
+ 	goo_stock_init ();
+@@ -557,27 +556,9 @@
+ 	       int         y)
+ {
+ #ifdef HAVE_LIBNOTIFY
+-	NotifyIcon  *icon = notify_icon_new_from_uri("goobox");
+-	NotifyHints *hints = NULL;
+-
+-	if ((x >= 0) && (y >= 0)) {
+-		hints = notify_hints_new ();
+-		notify_hints_set_int (hints, "x", x);
+-		notify_hints_set_int (hints, "y", y);
+-	}
+-
+-	notify_h = notify_send_notification (notify_h,
+-					     "device",
+-					     NOTIFY_URGENCY_NORMAL,
+-					     title,
+-					     msg,
+-					     icon,
+-					     TRUE, 0, 
+-					     hints, // no hints
+-					     NULL, // no user data
+-					     0);
+-	
+-	if (icon != NULL)
+-		notify_icon_destroy (icon);
++	if(!notify_is_initted())
++	    return;
++	NotifyNotification *n = notify_notification_new (title,msg,"goobox",GTK_WIDGET (main_window));
++	notify_notification_show(n, NULL);
+ #endif /* HAVE_LIBNOTIFY */
+ }
================================================================


More information about the pld-cvs-commit mailing list