[Xfce4-commits] [panel-plugins/xfce4-places-plugin] 15/30: Use xfce4-panel 4.13 xfce_panel_plugin_get_icon_size or ignore deprecated gtk_widget_get_style

noreply at xfce.org noreply at xfce.org
Mon Apr 22 12:08:06 CEST 2019


This is an automated email from the git hooks/post-receive script.

b   l   u   e   s   a   b   r   e       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 panel-plugins/xfce4-places-plugin.

commit 549855a1c46a519640b6d07242c88fc3b1897387
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Sat Apr 20 11:27:21 2019 -0400

    Use xfce4-panel 4.13 xfce_panel_plugin_get_icon_size or ignore deprecated gtk_widget_get_style
---
 panel-plugin/button.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/button.c b/panel-plugin/button.c
index 6a8e3f4..75e4c86 100644
--- a/panel-plugin/button.c
+++ b/panel-plugin/button.c
@@ -413,7 +413,10 @@ places_button_resize(PlacesButton *self)
     gboolean show_image, show_label;
     gint new_size, image_size;
     gint border_thickness;
+#if LIBXFCE4PANEL_CHECK_VERSION(4, 13, 0)
+#else
     GtkStyle *style;
+#endif
     gboolean vertical = FALSE;
     gboolean deskbar = FALSE;
     gint nrows = 1;
@@ -455,9 +458,15 @@ places_button_resize(PlacesButton *self)
     }
 
     /* image */
-    style = gtk_widget_get_style (GTK_WIDGET (self));
-    border_thickness = 2 * MAX (style->xthickness, style->ythickness) + 2;
+#if LIBXFCE4PANEL_CHECK_VERSION(4, 13, 0)
+    image_size = xfce_panel_plugin_get_icon_size (self->plugin);
+#else
+    G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+    style = gtk_widget_get_style(GTK_WIDGET(self));
+    G_GNUC_END_IGNORE_DEPRECATIONS
+    border_thickness = 2 * MAX(style->xthickness, style->ythickness) + 2;
     image_size = new_size - border_thickness;
+#endif
     places_button_resize_image(self, image_size);
 
     /* label */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list