From b5b5db79ae1c2fef783c415fbf577e8dc34e6b5d Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 12 Nov 2009 12:32:55 +0000 Subject: define constants for notify capabilities --- libempathy-gtk/empathy-notify-manager.h | 19 +++++++++++++++++++ src/empathy-status-icon.c | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libempathy-gtk/empathy-notify-manager.h b/libempathy-gtk/empathy-notify-manager.h index 74d2fcfa4..951bd4d98 100644 --- a/libempathy-gtk/empathy-notify-manager.h +++ b/libempathy-gtk/empathy-notify-manager.h @@ -25,6 +25,25 @@ G_BEGIN_DECLS +#define EMPATHY_NOTIFY_MANAGER_CAPA_ACTIONS "actions" +#define EMPATHY_NOTIFY_MANAGER_CAPA_APPEND "append" +#define EMPATHY_NOTIFY_MANAGER_CAPA_BODY "body" +#define EMPATHY_NOTIFY_MANAGER_CAPA_BODY_HYPERLINKS "body-hyperlinks" +#define EMPATHY_NOTIFY_MANAGER_CAPA_BODY_IMAGES "body-images" +#define EMPATHY_NOTIFY_MANAGER_CAPA_BODY_MARKUP "body-markup" +#define EMPATHY_NOTIFY_MANAGER_CAPA_ICON_MULTI "icon-multi" +#define EMPATHY_NOTIFY_MANAGER_CAPA_ICON_STATIC "icon-static" +#define EMPATHY_NOTIFY_MANAGER_CAPA_IMAGE_SVG_XML "image/svg+xml" +#define EMPATHY_NOTIFY_MANAGER_CAPA_PRIVATE_ICON_ONLY "private-icon-only" +#define EMPATHY_NOTIFY_MANAGER_CAPA_PRIVATE_SYNCHRONOUS "private-synchronous" +#define EMPATHY_NOTIFY_MANAGER_CAPA_SOUND "sound" +#define EMPATHY_NOTIFY_MANAGER_CAPA_TRUNCATION "truncation" +/* notify-osd specific */ +#define EMPATHY_NOTIFY_MANAGER_CAPA_X_CANONICAL_APPEND "x-canonical-append" +#define EMPATHY_NOTIFY_MANAGER_CAPA_X_CANONICAL_PRIVATE_ICON_ONLY "x-canonical-private-icon-only" +#define EMPATHY_NOTIFY_MANAGER_CAPA_X_CANONICAL_PRIVATE_SYNCHRONOUS "x-canonical-private-synchronous" +#define EMPATHY_NOTIFY_MANAGER_CAPA_X_CANONICAL_TRUNCATION "x-canonical-truncation" + #define EMPATHY_TYPE_NOTIFY_MANAGER (empathy_notify_manager_get_type ()) #define EMPATHY_NOTIFY_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EMPATHY_TYPE_NOTIFY_MANAGER, EmpathyNotifyManager)) #define EMPATHY_NOTIFY_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EMPATHY_TYPE_NOTIFY_MANAGER, EmpathyNotifyManagerClass)) diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c index 830e6dbd6..000100f76 100644 --- a/src/empathy-status-icon.c +++ b/src/empathy-status-icon.c @@ -174,7 +174,8 @@ status_icon_update_notification (EmpathyStatusIcon *icon) notify_notification_set_timeout (priv->notification, NOTIFY_EXPIRES_DEFAULT); - if (empathy_notify_manager_has_capability (priv->notify_mgr, "actions")) { + if (empathy_notify_manager_has_capability (priv->notify_mgr, + EMPATHY_NOTIFY_MANAGER_CAPA_ACTIONS)) { notify_notification_add_action (priv->notification, "respond", _("Respond"), -- cgit v1.2.3