[Xfce4-commits] [panel-plugins/xfce4-cpugraph-plugin] 03/16: Remove support for libxfce4panel < 4.10
noreply at xfce.org
noreply at xfce.org
Wed May 29 04:10:04 CEST 2019
This is an automated email from the git hooks/post-receive script.
a n d 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-cpugraph-plugin.
commit 3e51185be6007cdf1ee699c5b84867237a3d83c8
Author: Olivier Duclos <oduclos at sierrawireless.com>
Date: Thu Jun 28 18:24:09 2018 +0200
Remove support for libxfce4panel < 4.10
---
panel-plugin/cpu.c | 27 ++-------------------------
1 file changed, 2 insertions(+), 25 deletions(-)
diff --git a/panel-plugin/cpu.c b/panel-plugin/cpu.c
index befe4ed..490beb2 100644
--- a/panel-plugin/cpu.c
+++ b/panel-plugin/cpu.c
@@ -32,13 +32,6 @@
# define _(String) gettext (String)
#endif
-/* check for new Xfce 4.10 panel features */
-#ifdef LIBXFCE4PANEL_CHECK_VERSION
-#if LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
-#define HAS_PANEL_49
-#endif
-#endif
-
static void cpugraph_construct( XfcePanelPlugin *plugin );
static CPUGraph *create_gui( XfcePanelPlugin *plugin );
static void create_bars( CPUGraph *base );
@@ -48,11 +41,7 @@ static void delete_bars( CPUGraph *base );
static gboolean size_cb( XfcePanelPlugin *plugin, guint size, CPUGraph *base );
static void about_cb( XfcePanelPlugin *plugin, CPUGraph *base );
static void set_bars_size( CPUGraph *base, gint size, GtkOrientation orientation );
-#ifdef HAS_PANEL_49
static void mode_cb( XfcePanelPlugin *plugin, XfcePanelPluginMode mode, CPUGraph *base );
-#else
-static void orientation_cb( XfcePanelPlugin *plugin, GtkOrientation orientation, CPUGraph *base );
-#endif
static void set_bars_orientation( CPUGraph *base, GtkOrientation orientation);
static gboolean update_cb( CPUGraph *base );
static void update_tooltip( CPUGraph *base );
@@ -80,11 +69,7 @@ static void cpugraph_construct( XfcePanelPlugin *plugin )
g_signal_connect( plugin, "save", G_CALLBACK( write_settings ), base );
g_signal_connect( plugin, "configure-plugin", G_CALLBACK( create_options ), base );
g_signal_connect( plugin, "size-changed", G_CALLBACK( size_cb ), base );
-#ifdef HAS_PANEL_49
g_signal_connect( plugin, "mode-changed", G_CALLBACK( mode_cb ), base );
-#else
- g_signal_connect( plugin, "orientation-changed", G_CALLBACK( orientation_cb ), base );
-#endif
}
static CPUGraph * create_gui( XfcePanelPlugin * plugin )
@@ -122,11 +107,7 @@ static CPUGraph * create_gui( XfcePanelPlugin * plugin )
base->has_barcolor = FALSE;
base->bars = NULL;
-#ifdef HAS_PANEL_49
mode_cb(plugin, orientation, base);
-#else
- orientation_cb(plugin, orientation, base);
-#endif
gtk_widget_show_all(ebox);
base->tooltip_text = gtk_label_new( NULL );
@@ -279,18 +260,14 @@ static void set_bars_size( CPUGraph *base, gint size, GtkOrientation orientation
for( i=0; i < n ; i++ )
gtk_widget_set_size_request( GTK_WIDGET(base->bars[i]), h, v );
}
-#ifdef HAS_PANEL_49
+
static void mode_cb( XfcePanelPlugin * plugin, XfcePanelPluginMode mode, CPUGraph *base )
{
GtkOrientation orientation = (mode == XFCE_PANEL_PLUGIN_MODE_HORIZONTAL) ?
GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL;
gtk_orientable_set_orientation( GTK_ORIENTABLE( base->box ), xfce_panel_plugin_get_orientation (plugin));
-#else
-static void orientation_cb( XfcePanelPlugin * plugin, GtkOrientation orientation, CPUGraph *base )
-{
- gtk_orientable_set_orientation( base->box, orientation );
-#endif
+
if( base->has_bars )
set_bars_orientation( base, orientation );
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list