Updating branch refs/heads/gber/improvements to 73ecc6e97f485b4fb7a0f6fa64013f4a0ba06076 (commit) from 2476a6a1854c820e534fe9a53a1ce056593787f1 (commit)
commit 73ecc6e97f485b4fb7a0f6fa64013f4a0ba06076 Author: Guido Berhoerster <guido+x...@berhoerster.name> Date: Fri Sep 21 12:00:36 2012 +0200 Support xfce4-panel 4.10 with its deskbar mode Add support for the deskbar mode introduced by xfce4-panel 4.10 and set the small property for the plugin so that it only occupies a single row in deskbar mode (bug #8350). NEWS | 1 + configure.in.in | 2 +- panel-plugin/xfce-mixer-plugin.c | 6 ++++++ panel-plugin/xfce-volume-button.c | 6 +++++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index ab83293..1f72815 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ - Modernize build system and build panel plugin as a module. - Use standard icons where possible. - Update the icons on theme change (bug #3498). +- Support xfce4-panel 4.10 with its deskbar mode (bug #8350). 4.8.0 diff --git a/configure.in.in b/configure.in.in index c2153a1..e5dd9c8 100644 --- a/configure.in.in +++ b/configure.in.in @@ -89,7 +89,7 @@ XDT_CHECK_PACKAGE([GST_PLUGINS_BASE], [gstreamer-plugins-base-0.10], [0.10.2]) XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.14.0]) XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0]) XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.8.0]) -XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.8.0]) +XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-1.0], [4.10.0]) XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.8.0]) dnl ************************************** diff --git a/panel-plugin/xfce-mixer-plugin.c b/panel-plugin/xfce-mixer-plugin.c index e2470a0..a396cc6 100644 --- a/panel-plugin/xfce-mixer-plugin.c +++ b/panel-plugin/xfce-mixer-plugin.c @@ -210,6 +210,9 @@ xfce_mixer_plugin_construct (XfcePanelPlugin *plugin) xfce_panel_plugin_menu_show_configure (plugin); + /* Only occupy a single row in deskbar mode */ + xfce_panel_plugin_set_small (XFCE_PANEL_PLUGIN (mixer_plugin), TRUE); + /* Connect to plugin signals */ g_signal_connect_swapped (G_OBJECT (plugin), "free-data", G_CALLBACK (xfce_mixer_plugin_free), mixer_plugin); g_signal_connect_swapped (G_OBJECT (plugin), "size-changed", G_CALLBACK (xfce_mixer_plugin_size_changed), mixer_plugin); @@ -231,6 +234,9 @@ xfce_mixer_plugin_size_changed (XfceMixerPlugin *mixer_plugin, { g_return_val_if_fail (mixer_plugin != NULL, FALSE); + /* The plugin only occupies a single row */ + size /= xfce_panel_plugin_get_nrows (XFCE_PANEL_PLUGIN (mixer_plugin)); + /* Determine size for the volume button icons */ size -= 2 + 2 * MAX (mixer_plugin->button->style->xthickness, mixer_plugin->button->style->ythickness); diff --git a/panel-plugin/xfce-volume-button.c b/panel-plugin/xfce-volume-button.c index cc9bfed..adb94a7 100644 --- a/panel-plugin/xfce-volume-button.c +++ b/panel-plugin/xfce-volume-button.c @@ -38,6 +38,10 @@ +#define VOLUME_EPSILON 0.005 + + + /* Signal identifiers */ enum { @@ -415,7 +419,7 @@ xfce_volume_button_update (XfceVolumeButton *button) /* Determine the difference between upper and lower bound (= volume range) */ range = (upper - lower) / (G_N_ELEMENTS (icons) - 2); - if (G_UNLIKELY (button->is_muted || value < 0.005)) + if (G_UNLIKELY (button->is_muted || value < VOLUME_EPSILON)) { /* By definition, use the first icon if the button is muted or the volume is 0 */ pixbuf = button->pixbufs[0]; _______________________________________________ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits