[glibmm] Gio::Notification: Add set_priority() and enum NotificationPriority
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glibmm] Gio::Notification: Add set_priority() and enum NotificationPriority
- Date: Wed, 18 Feb 2015 08:51:44 +0000 (UTC)
commit 08642d5a2fd29445cb47e6a35d2fd929a29a2933
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Wed Feb 18 09:39:17 2015 +0100
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.
gio/src/notification.hg | 10 +++++++++-
tools/m4/convert_gio.m4 | 1 +
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/gio/src/notification.hg b/gio/src/notification.hg
index caf5f94..46be430 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 9444c32..d0672ba 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]