[Xfce4-commits] <xfce4-screenshooter:master> Adapting the panel plugin to xfce4-panel 4.9+.

Jérôme Guelfucci noreply at xfce.org
Sat Feb 18 15:04:01 CET 2012


Updating branch refs/heads/master
         to 5620dbdd96a35f78477f924b281fc645511ff5b4 (commit)
       from bb48e9269a1a486a5e269c99918b393a5015de96 (commit)

commit 5620dbdd96a35f78477f924b281fc645511ff5b4
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Sat Feb 18 14:58:29 2012 +0100

    Adapting the panel plugin to xfce4-panel 4.9+.

 panel-plugin/screenshooter-plugin.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/screenshooter-plugin.c b/panel-plugin/screenshooter-plugin.c
index 60ae066..f5159f1 100644
--- a/panel-plugin/screenshooter-plugin.c
+++ b/panel-plugin/screenshooter-plugin.c
@@ -115,6 +115,12 @@ static gboolean
 cb_set_size (XfcePanelPlugin *plugin, int size, PluginData *pd)
 {
   GdkPixbuf *pb;
+
+#if defined (LIBXFCE4PANEL_CHECK_VERSION) && LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+  /* reduce the size of the plugin to a single row */
+  size /= xfce_panel_plugin_get_nrows (plugin);
+#endif
+
   int width = size - 2 - 2 * MAX (pd->button->style->xthickness,
                                     pd->button->style->ythickness);
 
@@ -341,6 +347,11 @@ screenshooter_plugin_construct (XfcePanelPlugin *plugin)
   pd->sd = sd;
   pd->plugin = plugin;
 
+#if defined (LIBXFCE4PANEL_CHECK_VERSION) && LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
+  /* make the plugin fit a single row */
+  xfce_panel_plugin_set_small (plugin, TRUE);
+#endif
+
   TRACE ("Initialize the text domain");
   xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
 


More information about the Xfce4-commits mailing list