From d2d685818a85b773c49802c494a0c386917b5ee6 Mon Sep 17 00:00:00 2001 From: infirit Date: Wed, 26 Nov 2014 14:38:07 +0100 Subject: Gtk3: Silence GtkVbox and GtkHbox deprecation warnings --- battstat/battstat_applet.c | 5 +++++ battstat/power-management.c | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'battstat') diff --git a/battstat/battstat_applet.c b/battstat/battstat_applet.c index 0ac60ede..cd57e085 100644 --- a/battstat/battstat_applet.c +++ b/battstat/battstat_applet.c @@ -53,6 +53,11 @@ #define gettext_noop(String) (String) #endif +#if GTK_CHECK_VERSION (3, 0, 0) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#endif + #define BATTSTAT_SCHEMA "org.mate.panel.applet.battstat" static gboolean check_for_updates (gpointer data); diff --git a/battstat/power-management.c b/battstat/power-management.c index 682f9683..b046464c 100644 --- a/battstat/power-management.c +++ b/battstat/power-management.c @@ -62,6 +62,10 @@ "the ACPI subsystem. Check to make sure the " \ "ACPI subsystem is properly loaded.") +#if GTK_CHECK_VERSION (3, 0, 0) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#endif + static const char *apm_readinfo (BatteryStatus *status); static int pm_initialised; #ifdef HAVE_HAL -- cgit v1.2.1