Enlightenment CVS committal

Author  : lok
Project : e17
Module  : libs/e_dbus

Dir     : e17/libs/e_dbus/src/lib/notification


Modified Files:
        daemon.c marshal.c 


Log Message:
When free-ed the daemon will release itself from org.freedesktop.Notifications
Never send NULL string by dbus replace them by empty string instead.
New utility e-notiy-send, send a notification by dbus.

===================================================================
RCS file: /cvs/e/e17/libs/e_dbus/src/lib/notification/daemon.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- daemon.c    24 Nov 2007 13:22:03 -0000      1.3
+++ daemon.c    2 Mar 2008 00:26:10 -0000       1.4
@@ -91,10 +91,16 @@
   return daemon;
 }
 
+
 EAPI void
 e_notification_daemon_free(E_Notification_Daemon *daemon)
 {
-  if (daemon->obj) e_dbus_object_free(daemon->obj);
+  e_dbus_release_name(daemon->conn, E_NOTIFICATION_BUS_NAME, NULL, NULL);
+  if (daemon->obj) 
+    {
+      e_dbus_object_interface_detach(daemon->obj, daemon->iface);
+      e_dbus_object_free(daemon->obj);
+    }
   if (daemon->conn) e_dbus_connection_close(daemon->conn);
   if (daemon->name) free(daemon->name);
   if (daemon->vendor) free(daemon->vendor);
===================================================================
RCS file: /cvs/e/e17/libs/e_dbus/src/lib/notification/marshal.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- marshal.c   28 Feb 2008 16:43:30 -0000      1.6
+++ marshal.c   2 Mar 2008 00:26:10 -0000       1.7
@@ -299,6 +299,11 @@
   DBusMessage *msg;
   DBusMessageIter iter, sub;
 
+  if (!n->app_name) n->app_name = strdup("");
+  if (!n->app_icon) n->app_icon = strdup("");
+  if (!n->summary) n->summary = strdup("");
+  if (!n->body) n->body = strdup("");
+
   msg = e_notification_call_new("Notify");
   dbus_message_append_args(msg, 
     DBUS_TYPE_STRING, &(n->app_name),



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to