[Xfce4-commits] [panel-plugins/xfce4-systemload-plugin] 03/16: Remove compat code for panel < 4.9
noreply at xfce.org
noreply at xfce.org
Fri Apr 29 16:07:20 CEST 2016
This is an automated email from the git hooks/post-receive script.
landry pushed a commit to branch master
in repository panel-plugins/xfce4-systemload-plugin.
commit 2d90f310a05bdb6e71f958e197614d666de06cae
Author: Landry Breuil <landry at xfce.org>
Date: Fri Apr 29 11:11:28 2016 +0200
Remove compat code for panel < 4.9
---
panel-plugin/systemload.c | 33 ---------------------------------
1 file changed, 33 deletions(-)
diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index 4df29e5..607145f 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -59,13 +59,6 @@ static gchar *DEFAULT_COMMAND_TEXT = "xfce4-taskmanager";
#define BORDER 8
-/* 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
-
enum { CPU_MONITOR, MEM_MONITOR, SWAP_MONITOR };
typedef struct
@@ -254,10 +247,8 @@ monitor_update_orientation (XfcePanelPlugin *plugin,
gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(global->monitor[count]->status), GTK_PROGRESS_LEFT_TO_RIGHT);
}
}
-#ifdef HAS_PANEL_49
gtk_label_set_angle(GTK_LABEL(global->uptime->label),
(orientation == GTK_ORIENTATION_HORIZONTAL) ? 0 : -90);
-#endif
}
static void
@@ -641,7 +632,6 @@ monitor_set_size(XfcePanelPlugin *plugin, int size, t_global_monitor *global)
}
-#ifdef HAS_PANEL_49
static void
monitor_set_mode (XfcePanelPlugin *plugin, XfcePanelPluginMode mode,
t_global_monitor *global)
@@ -660,18 +650,6 @@ monitor_set_mode (XfcePanelPlugin *plugin, XfcePanelPluginMode mode,
monitor_set_size (plugin, xfce_panel_plugin_get_size (plugin), global);
}
-
-#else
-static void
-monitor_set_orientation (XfcePanelPlugin *plugin, GtkOrientation orientation,
- t_global_monitor *global)
-{
- monitor_update_orientation (plugin, orientation, GTK_ORIENTATION_HORIZONTAL, global);
- monitor_set_size (plugin, xfce_panel_plugin_get_size (plugin), global);
-}
-#endif
-
-
#ifdef HAVE_UPOWER_GLIB
static void
#if UP_CHECK_VERSION(0, 99, 0)
@@ -965,15 +943,9 @@ systemload_construct (XfcePanelPlugin *plugin)
monitor_read_config (plugin, global);
create_monitor (global);
-#ifdef HAS_PANEL_49
monitor_set_mode (plugin,
xfce_panel_plugin_get_mode (plugin),
global);
-#else
- monitor_set_orientation (plugin,
- xfce_panel_plugin_get_orientation (plugin),
- global);
-#endif
setup_monitor (global);
@@ -1001,13 +973,8 @@ systemload_construct (XfcePanelPlugin *plugin)
g_signal_connect (plugin, "size-changed", G_CALLBACK (monitor_set_size),
global);
-#ifdef HAS_PANEL_49
g_signal_connect (plugin, "mode-changed",
G_CALLBACK (monitor_set_mode), global);
-#else
- g_signal_connect (plugin, "orientation-changed",
- G_CALLBACK (monitor_set_orientation), global);
-#endif
g_signal_connect (plugin, "button-press-event", G_CALLBACK (click_event),
global);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list