[Galago-commits] r2434 - in trunk/libnotify: . tools

galago-commits at freedesktop.org galago-commits at freedesktop.org
Thu Jan 19 01:35:19 PST 2006


Author: chipx86
Date: 2006-01-19 01:35:17 -0800 (Thu, 19 Jan 2006)
New Revision: 2434

Modified:
   trunk/libnotify/ChangeLog
   trunk/libnotify/tools/notify-send.c
Log:
Make notify-send work again when a body isn't specified.


Modified: trunk/libnotify/ChangeLog
===================================================================
--- trunk/libnotify/ChangeLog	2006-01-19 06:25:16 UTC (rev 2433)
+++ trunk/libnotify/ChangeLog	2006-01-19 09:35:17 UTC (rev 2434)
@@ -1,3 +1,8 @@
+Thu Jan 19 01:34:57 PST 2006  Christian Hammond <chipx86 at chipx86.com>
+
+	* tools/notify-send.c:
+	  - Make notify-send work again when a body isn't specified.
+
 Wed Jan 18 22:24:10 PST 2006  Christian Hammond <chipx86 at chipx86.com>
 
 	* libnotify/notifynotification.h:

Modified: trunk/libnotify/tools/notify-send.c
===================================================================
--- trunk/libnotify/tools/notify-send.c	2006-01-19 06:25:16 UTC (rev 2433)
+++ trunk/libnotify/tools/notify-send.c	2006-01-19 09:35:17 UTC (rev 2434)
@@ -32,7 +32,7 @@
 main(int argc, const char **argv)
 {
 	const gchar *summary = NULL;
-	const gchar *body = NULL;
+	const gchar *body = "";
 	const gchar *type = NULL;
 	char *urgency_str = NULL;
 	gchar *icon_str = NULL;
@@ -42,7 +42,7 @@
 	char ch;
 	poptContext opt_ctx;
 	const char **args;
-        NotifyNotification *notify;
+	NotifyNotification *notify;
 
 	struct poptOption options[] =
 	{
@@ -64,7 +64,7 @@
 		POPT_TABLEEND
 	};
 
-        g_type_init (); 
+	g_type_init (); 
 
 	opt_ctx = poptGetContext("notify-send", argc, argv, options, 0);
 	poptSetOtherOptionHelp(opt_ctx, "[OPTIONS]* <summary> [body]");
@@ -128,14 +128,13 @@
 	if (!notify_init("notify-send"))
 		exit(1);
 
+	notify  = notify_notification_new(summary, body, icon_str, NULL);
+	notify_notification_set_category(notify, type);
+	notify_notification_set_urgency(notify, urgency);
+	notify_notification_set_timeout(notify, expire_timeout);
 
-	notify  = notify_notification_new (summary, body, icon_str, NULL); 
-	notify_notification_set_category (notify, type);
-	notify_notification_set_urgency (notify, urgency);
-	notify_notification_set_timeout (notify, expire_timeout);
+	notify_notification_show_and_forget(notify, NULL);
 
-	notify_notification_show_and_forget (notify, NULL);
-
 	poptFreeContext(opt_ctx);
 	notify_uninit();
 



More information about the galago-commits mailing list