Patch by Lucas Rocha to add GObject property accessors for notification IDs.
This commit is contained in:
parent
da3ef45d56
commit
8ee3f0d77b
|
@ -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>
|
||||
|
|
4
NEWS
4
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)
|
||||
|
|
|
@ -66,6 +66,11 @@ not be used directly. Use the accessor functions below.
|
|||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG NotifyNotification:id ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG NotifyNotification:status-icon ##### -->
|
||||
<para>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue