Changeset 3005

Show
Ignore:
Timestamp:
03/18/08 21:53:30
Author:
chipx86
Message:

Add support for sending the closed reason in the signal handler. Closes ticket #139.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libnotify/ChangeLog

    r2988 r3005  
     1Tue Mar 18 21:51:32 PDT 2008  Christian Hammond <chipx86@chipx86.com> 
     2 
     3    * libnotify/notification.c: 
     4    * libnotify/notification.h: 
     5    * libnotify/notify.c: 
     6    * libnotify/notify-marshal.list: 
     7    * NEWS: 
     8      - Add support for sending the closed reason in the signal handler. 
     9        Closes ticket #139. 
     10 
    111Sat Aug 25 18:08:01 PDT 2007  Christian Hammond <chipx86@chipx86.com> 
    212 
  • trunk/libnotify/NEWS

    r2978 r3005  
    22    * Added GObject property accessors for notification IDs. Patch by Lucas 
    33      Rocha. 
     4    * Added support for sending the closed reason in the "closed" signal 
     5      handler. (Ticket #139) 
    46 
    57version 0.4.4 (27-February-2007): 
  • trunk/libnotify/libnotify/notification.c

    r2978 r3005  
    4747static void notify_notification_init(NotifyNotification *sp); 
    4848static void notify_notification_finalize(GObject *object); 
    49 static void _close_signal_handler(DBusGProxy *proxy, guint32 id, 
     49static void _close_signal_handler(DBusGProxy *proxy, guint32 id, guint32 reason, 
    5050                                  NotifyNotification *notification); 
    5151 
     
    156156                     G_STRUCT_OFFSET(NotifyNotificationClass, closed), 
    157157                     NULL, NULL, 
    158                      g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); 
     158                     g_cclosure_marshal_VOID__UINT, G_TYPE_NONE, 1, G_TYPE_INT); 
    159159 
    160160    g_object_class_install_property(object_class, PROP_ID, 
     
    692692 
    693693static void 
    694 _close_signal_handler(DBusGProxy *proxy, guint32 id, 
     694_close_signal_handler(DBusGProxy *proxy, guint32 id, guint32 reason, 
    695695                      NotifyNotification *notification) 
    696696{ 
     
    698698    { 
    699699        g_object_ref(G_OBJECT(notification)); 
    700         g_signal_emit(notification, signals[SIGNAL_CLOSED], 0); 
     700        g_signal_emit(notification, signals[SIGNAL_CLOSED], 0, reason); 
    701701        notification->priv->id = 0; 
    702702        g_object_unref(G_OBJECT(notification)); 
  • trunk/libnotify/libnotify/notification.h

    r2827 r3005  
    6464 
    6565    /* Signals */ 
    66     void (*closed)(NotifyNotification *notification); 
     66    void (*closed)(NotifyNotification *notification, gint reason); 
    6767}; 
    6868 
  • trunk/libnotify/libnotify/notify-marshal.list

    r2392 r3005  
     1VOID:UINT,UINT 
    12VOID:UINT,STRING 
  • trunk/libnotify/libnotify/notify.c

    r2967 r3005  
    7373    dbus_g_connection_unref(bus); 
    7474 
     75    dbus_g_object_register_marshaller(notify_marshal_VOID__UINT_UINT, 
     76                                      G_TYPE_NONE, 
     77                                      G_TYPE_UINT, 
     78                                      G_TYPE_UINT, G_TYPE_INVALID); 
     79 
    7580    dbus_g_object_register_marshaller(notify_marshal_VOID__UINT_STRING, 
    7681                                      G_TYPE_NONE, 
     
    7984 
    8085    dbus_g_proxy_add_signal(_proxy, "NotificationClosed", 
    81                             G_TYPE_UINT, G_TYPE_INVALID); 
     86                            G_TYPE_UINT, G_TYPE_UINT,  
     87                            G_TYPE_INVALID); 
    8288    dbus_g_proxy_add_signal(_proxy, "ActionInvoked", 
    8389                            G_TYPE_UINT, G_TYPE_STRING,