[Xfce4-commits] [xfce/xfce4-power-manager] 01/01: Continue with notification cleanup
noreply at xfce.org
noreply at xfce.org
Sun Oct 29 11:39:27 CET 2017
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfce4-power-manager.
commit b7f948a69e3b5406b2fd419041384422e0b9d035
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sun Oct 29 11:39:21 2017 +0100
Continue with notification cleanup
---
src/xfpm-backlight.c | 2 +-
src/xfpm-kbd-backlight.c | 2 +-
src/xfpm-notify.c | 9 ++++++++-
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/xfpm-backlight.c b/src/xfpm-backlight.c
index 6cc5640..583e652 100644
--- a/src/xfpm-backlight.c
+++ b/src/xfpm-backlight.c
@@ -171,7 +171,7 @@ xfpm_backlight_show_notification (XfpmBacklight *backlight, gfloat value)
}
/* add the brightness value to the notification */
- notify_notification_set_hint (backlight->priv->n, "value", value);
+ notify_notification_set_hint (backlight->priv->n, "value", g_variant_new_double (value));
/* show the notification */
notify_notification_show (backlight->priv->n, NULL);
diff --git a/src/xfpm-kbd-backlight.c b/src/xfpm-kbd-backlight.c
index aeb65ab..f954fdd 100644
--- a/src/xfpm-kbd-backlight.c
+++ b/src/xfpm-kbd-backlight.c
@@ -123,7 +123,7 @@ xfpm_kbd_backlight_show_notification (XfpmKbdBacklight *self, gfloat value)
}
/* add the brightness value to the notification */
- notify_notification_set_hint (self->priv->n, "value", value);
+ notify_notification_set_hint (self->priv->n, "value", g_variant_new_double (value));
/* show the notification */
notify_notification_show (self->priv->n, NULL);
diff --git a/src/xfpm-notify.c b/src/xfpm-notify.c
index 4797628..c670f12 100644
--- a/src/xfpm-notify.c
+++ b/src/xfpm-notify.c
@@ -212,7 +212,7 @@ xfpm_notify_new_notification_internal (const gchar *title, const gchar *message,
/* Only set transient hint on non-critical notifications, so that the critical
ones also end up in the notification server's log */
- if (!notify->priv->critical)
+ if (urgency != XFPM_NOTIFY_CRITICAL)
notify_notification_set_hint (n, "transient", g_variant_new_boolean (FALSE));
notify_notification_set_hint (n, "image-path", g_variant_new_string (icon_name));
@@ -314,6 +314,13 @@ void xfpm_notify_add_action_to_notification (XfpmNotify *notify, NotifyNotificat
}
+static void
+xfpm_notify_closed_cb (NotifyNotification *n, XfpmNotify *notify)
+{
+ notify->priv->notification = NULL;
+ g_object_unref (G_OBJECT (n));
+}
+
void xfpm_notify_present_notification (XfpmNotify *notify, NotifyNotification *n)
{
g_return_if_fail (XFPM_IS_NOTIFY(notify));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list