This is an automated email from the git hooks/post-receive script. bluesabre pushed a commit to branch master in repository apps/xfce4-volumed-pulse.
commit 50f3af8d4919a38e21599a21bbb6481cefde5a5d Author: Simon Steinbeiss <[email protected]> Date: Mon Sep 12 16:06:44 2016 +0200 Only query xfconf on property changes, not on every notification --- src/xvd_data_types.h | 1 + src/xvd_notify.c | 3 +-- src/xvd_xfconf.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/xvd_data_types.h b/src/xvd_data_types.h index b3f948a..55dc70c 100644 --- a/src/xvd_data_types.h +++ b/src/xvd_data_types.h @@ -73,6 +73,7 @@ typedef struct { /* Xfconf vars */ XfconfChannel *settings; + guint icon_style; guint vol_step; #ifdef HAVE_LIBNOTIFY diff --git a/src/xvd_notify.c b/src/xvd_notify.c index 5dcd7c2..b08cad5 100644 --- a/src/xvd_notify.c +++ b/src/xvd_notify.c @@ -45,8 +45,7 @@ xvd_notify_notification(XvdInstance *Inst, title = g_strdup_printf ("Volume is at %d%c", value, '%'); } - if (xfconf_channel_get_uint (Inst->settings, XFCONF_ICON_STYLE_PROP, - ICONS_STYLE_NORMAL) == ICONS_STYLE_SYMBOLIC) + if (Inst->icon_style == ICONS_STYLE_SYMBOLIC) icon = g_strconcat (icon, "-symbolic", NULL); notify_notification_update (Inst->notification, diff --git a/src/xvd_xfconf.c b/src/xvd_xfconf.c index 2040317..d7765a6 100644 --- a/src/xvd_xfconf.c +++ b/src/xvd_xfconf.c @@ -39,6 +39,10 @@ _xvd_xfconf_handle_changes(XfconfChannel *re_channel, if (g_strcmp0 (re_property_name, XFCONF_MIXER_VOL_STEP_PROP) == 0) { _xvd_xfconf_reinit_vol_step(Inst); } + else if (g_strcmp0 (re_property_name, XFCONF_ICON_STYLE_PROP) == 0) { + Inst->icon_style = xfconf_channel_get_uint (Inst->settings, XFCONF_ICON_STYLE_PROP, + ICONS_STYLE_NORMAL); + } } gboolean @@ -58,7 +62,13 @@ xvd_xfconf_init(XvdInstance *Inst) if (!xfconf_channel_set_uint (Inst->settings, XFCONF_ICON_STYLE_PROP, ICONS_STYLE_NORMAL)) g_warning ("Couldn't initialize icon-style property (default: 0)."); + else + Inst->icon_style = xfconf_channel_get_uint (Inst->settings, XFCONF_ICON_STYLE_PROP, + ICONS_STYLE_NORMAL); } + else + Inst->icon_style = xfconf_channel_get_uint (Inst->settings, XFCONF_ICON_STYLE_PROP, + ICONS_STYLE_NORMAL); if (!xfconf_channel_has_property (Inst->settings, XFCONF_MIXER_VOL_STEP_PROP)) { if (!xfconf_channel_set_uint (Inst->settings, XFCONF_MIXER_VOL_STEP_PROP, -- To stop receiving notification emails like this one, please contact the administrator of this repository. _______________________________________________ Xfce4-commits mailing list [email protected] https://mail.xfce.org/mailman/listinfo/xfce4-commits
