diff options
author | Christian Hammond <chipx86@chipx86.com> | 2007-04-29 07:43:55 +0000 |
---|---|---|
committer | Christian Hammond <chipx86@chipx86.com> | 2007-04-29 07:43:55 +0000 |
commit | 8ee3f0d77b61b968a2ee20d25a0f381a8fbef9e9 (patch) | |
tree | e70061e760fad65c09a2d0eef9532a36563bcf6c | |
parent | da3ef45d56b87ddf1f2c9af9a1f574eae0fa2b00 (diff) | |
download | libnotify-8ee3f0d77b61b968a2ee20d25a0f381a8fbef9e9.tar.gz |
Patch by Lucas Rocha to add GObject property accessors for notification IDs.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | docs/reference/tmpl/notification.sgml | 5 | ||||
-rw-r--r-- | libnotify/notification.c | 21 |
4 files changed, 37 insertions, 0 deletions
@@ -1,3 +1,10 @@ +Sun Apr 29 00:39:32 PDT 2007 Christian Hammond <chipx86@chipx86.com> + + * 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 <chipx86@chipx86.com> @@ -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. </para> +<!-- ##### ARG NotifyNotification:id ##### --> +<para> + +</para> + <!-- ##### ARG NotifyNotification:status-icon ##### --> <para> 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; |