[Xfce4-commits] [panel-plugins/xfce4-battery-plugin] 02/03: require Gtk >= 3.16 which was released in 2014..
noreply at xfce.org
noreply at xfce.org
Fri Jan 6 21:12:26 CET 2017
This is an automated email from the git hooks/post-receive script.
landry pushed a commit to branch master
in repository panel-plugins/xfce4-battery-plugin.
commit 27aa9ef1f0a30f4c22ec2af21fb15085b7ac1bd2
Author: Landry Breuil <landry at xfce.org>
Date: Fri Jan 6 21:12:12 2017 +0100
require Gtk >= 3.16 which was released in 2014..
---
configure.ac.in | 2 +-
panel-plugin/battery.c | 10 ----------
2 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/configure.ac.in b/configure.ac.in
index b51e51d..b832255 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -64,7 +64,7 @@ XDT_I18N([@LINGUAS@])
dnl ***********************************
dnl *** Check for required packages ***
dnl ***********************************
-XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.14.0])
+XDT_CHECK_PACKAGE([GTK], [gtk+-3.0], [3.16.0])
XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.8.0])
XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-2], [4.12.0])
XDT_CHECK_PACKAGE([LIBXFCE4PANEL], [libxfce4panel-2.0], [4.12.0])
diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index 9ab503b..03c5945 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -104,9 +104,7 @@ typedef struct
GtkLabel *acfan;
GtkLabel *temp;
GtkWidget *image;
-#if GTK_CHECK_VERSION (3, 16, 0)
GtkCssProvider *css_provider;
-#endif
} t_battmon;
typedef struct
@@ -276,9 +274,7 @@ update_apm_status(t_battmon *battmon)
int time_remaining=0;
gboolean acline;
gchar buffer[128];
-#if GTK_CHECK_VERSION (3, 16, 0)
gchar *css, *color_str;
-#endif
static int update_time = AVERAGING_CYCLE;
static int sum_lcapacity = 0;
@@ -605,7 +601,6 @@ battmon.c:241: for each function it appears in.)
}
}
-#if GTK_CHECK_VERSION (3, 16, 0)
color_str = gdk_rgba_to_string (color);
#if GTK_CHECK_VERSION (3, 20, 0)
gchar * cssminsizes = "min-width: 4px; min-height: 0px";
@@ -622,9 +617,6 @@ battmon.c:241: for each function it appears in.)
gtk_css_provider_load_from_data (battmon->css_provider, css, strlen(css), NULL);
g_free(css);
g_free(color_str);
-#else
- gtk_widget_override_background_color (GTK_WIDGET (battmon->battstatus), GTK_STATE_FLAG_NORMAL, color);
-#endif
/* alarms */
if (!acline && charge <= battmon->options.low_percentage){
@@ -687,13 +679,11 @@ static void setup_battmon(t_battmon *battmon)
gtk_progress_bar_set_inverted(GTK_PROGRESS_BAR(battmon->battstatus),
(xfce_panel_plugin_get_orientation(battmon->plugin) == GTK_ORIENTATION_HORIZONTAL));
-#if GTK_CHECK_VERSION (3, 16, 0)
battmon->css_provider = gtk_css_provider_new();
gtk_style_context_add_provider(
GTK_STYLE_CONTEXT (gtk_widget_get_style_context (GTK_WIDGET (battmon->battstatus))),
GTK_STYLE_PROVIDER (battmon->css_provider),
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
-#endif
battmon->label = (GtkLabel *)gtk_label_new(_("Battery"));
gtk_box_pack_start(GTK_BOX(battmon->ebox),GTK_WIDGET(battmon->label),FALSE, FALSE, 2);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list