diff --git a/ChangeLog b/ChangeLog index 5f48e9a..a29ad56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Apr 29 00:39:32 PDT 2007 Christian Hammond + + * docs/reference/tmpl/notification.sgml: + * libnotify/notification.c: + - Patch by Lucas Rocha to add GObject property accessors for + notification IDs. + ========================= 0.4.4 ========================= Tue Feb 27 21:11:36 PST 2007 Christian Hammond diff --git a/NEWS b/NEWS index 9219f27..fd923da 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +version 0.4.5: + * Added GObject property accessors for notification IDs. Patch by Lucas + Rocha. + version 0.4.4 (27-February-2007): * Fixed a bug where a notification's ID could be reset when a different notification was closed. Patch by jylefort. (Bug #94) diff --git a/docs/reference/tmpl/notification.sgml b/docs/reference/tmpl/notification.sgml index 2d3c3fb..4accb54 100644 --- a/docs/reference/tmpl/notification.sgml +++ b/docs/reference/tmpl/notification.sgml @@ -66,6 +66,11 @@ not be used directly. Use the accessor functions below. + + + + + diff --git a/libnotify/notification.c b/libnotify/notification.c index c9de255..ae358d1 100644 --- a/libnotify/notification.c +++ b/libnotify/notification.c @@ -100,6 +100,7 @@ enum enum { PROP_0, + PROP_ID, PROP_SUMMARY, PROP_BODY, PROP_ICON_NAME, @@ -156,6 +157,18 @@ notify_notification_class_init(NotifyNotificationClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + g_object_class_install_property(object_class, PROP_ID, + g_param_spec_int("id", "ID", + "The notification ID", + 0, + G_MAXINT32, + 0, + G_PARAM_READWRITE | + G_PARAM_CONSTRUCT | + G_PARAM_STATIC_NAME | + G_PARAM_STATIC_NICK | + G_PARAM_STATIC_BLURB)); + g_object_class_install_property(object_class, PROP_SUMMARY, g_param_spec_string("summary", "Summary", "The summary text", @@ -223,6 +236,10 @@ notify_notification_set_property(GObject *object, switch (prop_id) { + case PROP_ID: + priv->id = g_value_get_int(value); + break; + case PROP_SUMMARY: notify_notification_update(notification, g_value_get_string(value), priv->body, priv->icon_name); @@ -268,6 +285,10 @@ notify_notification_get_property(GObject *object, switch (prop_id) { + case PROP_ID: + g_value_set_int(value, priv->id); + break; + case PROP_SUMMARY: g_value_set_string(value, priv->summary); break;