summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2015-02-18 09:39:17 +0100
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2015-02-18 09:39:17 +0100
commit08642d5a2fd29445cb47e6a35d2fd929a29a2933 (patch)
tree5f896947bca380b125d5e57197a5cd1dc7e31be4
parente9f6f709ef0c5eb49c556dd1d53d0e0f5ef11ac2 (diff)
downloadglibmm-08642d5a2fd29445cb47e6a35d2fd929a29a2933.tar.gz
Gio::Notification: Add set_priority() and enum NotificationPriority
* gio/src/notification.hg: Add enum NotificationPriority and set_priority(). * tools/m4/convert_gio.m4: Add conversion of GNotificationPriority.
-rw-r--r--gio/src/notification.hg10
-rw-r--r--tools/m4/convert_gio.m41
2 files changed, 10 insertions, 1 deletions
diff --git a/gio/src/notification.hg b/gio/src/notification.hg
index caf5f943..46be4303 100644
--- a/gio/src/notification.hg
+++ b/gio/src/notification.hg
@@ -21,10 +21,17 @@
_DEFS(giomm,gio)
_PINCLUDE(glibmm/private/object_p.h)
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef G_DISABLE_DEPRECATED
+#define GLIB_DISABLE_DEPRECATION_WARNINGS 1
+#m4 _POP()
+
namespace Gio
{
class Icon;
+_WRAP_ENUM(NotificationPriority, GNotificationPriority)
+
/** User Notifications (pop up messages).
*
* Gio::Notification is a mechanism for creating a notification to be shown
@@ -67,7 +74,8 @@ public:
_WRAP_METHOD(void set_title(const Glib::ustring& title), g_notification_set_title)
_WRAP_METHOD(void set_body(const Glib::ustring& body), g_notification_set_body)
_WRAP_METHOD(void set_icon(const Glib::RefPtr<Icon>& icon), g_notification_set_icon)
- _WRAP_METHOD(void set_urgent(bool urgent = true), g_notification_set_urgent, deprecated "This should not be used in newly-written code.")
+ _WRAP_METHOD(void set_urgent(bool urgent = true), g_notification_set_urgent, deprecated "Use set_priority() instead.")
+ _WRAP_METHOD(void set_priority(NotificationPriority priority = NOTIFICATION_PRIORITY_NORMAL), g_notification_set_priority)
_WRAP_METHOD(void add_button(const Glib::ustring& label, const Glib::ustring& detailed_action), g_notification_add_button)
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index 9444c32f..d0672bac 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -33,6 +33,7 @@ _CONV_ENUM(G,MountMountFlags)
_CONV_ENUM(G,MountOperationResult)
_CONV_ENUM(G,MountUnmountFlags)
_CONV_ENUM(G,NetworkConnectivity)
+_CONV_ENUM(G,NotificationPriority)
_CONV_ENUM(G,OutputStreamSpliceFlags)
_CONV_ENUM(G,PasswordSave)
_CONV_ENUM(G,ResolverRecordType)