summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-26 14:38:07 +0100
committerinfirit <[email protected]>2014-11-26 18:13:43 +0100
commitd2d685818a85b773c49802c494a0c386917b5ee6 (patch)
tree918603ced900c21a124c7d6de37b609beda74046
parent1499d577a67f2dd0f99e6707f29ebd9ba8f9b940 (diff)
downloadmate-applets-d2d685818a85b773c49802c494a0c386917b5ee6.tar.bz2
mate-applets-d2d685818a85b773c49802c494a0c386917b5ee6.tar.xz
Gtk3: Silence GtkVbox and GtkHbox deprecation warnings
-rw-r--r--accessx-status/applet.c2
-rw-r--r--battstat/battstat_applet.c5
-rw-r--r--battstat/power-management.c4
-rw-r--r--charpick/charpick.c5
-rw-r--r--charpick/properties.c5
-rw-r--r--command/command.c4
-rw-r--r--cpufreq/src/cpufreq-applet.c7
-rw-r--r--geyes/geyes.c5
-rw-r--r--geyes/themes.c5
-rw-r--r--mateweather/mateweather-applet.c5
-rw-r--r--mateweather/mateweather-dialog.c5
-rw-r--r--mateweather/mateweather-pref.c5
-rw-r--r--multiload/load-graph.c3
-rw-r--r--multiload/main.c2
-rw-r--r--multiload/properties.c5
-rw-r--r--timerapplet/timerapplet.c4
-rw-r--r--trashapplet/src/trashapplet.c5
17 files changed, 75 insertions, 1 deletions
diff --git a/accessx-status/applet.c b/accessx-status/applet.c
index bdea685d..8cbe1ff3 100644
--- a/accessx-status/applet.c
+++ b/accessx-status/applet.c
@@ -44,6 +44,8 @@
#define MATE_DESKTOP_USE_UNSTABLE_API
#include <libmate-desktop/mate-desktop-utils.h>
#define gdk_spawn_command_line_on_screen mate_gdk_spawn_command_line_on_screen
+#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
static int xkb_base_event_type = 0;
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
diff --git a/charpick/charpick.c b/charpick/charpick.c
index 4afab222..299df110 100644
--- a/charpick/charpick.c
+++ b/charpick/charpick.c
@@ -12,6 +12,11 @@
#include <libmate-desktop/mate-aboutdialog.h>
#include "charpick.h"
+#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
+
/* The comment for each char list has the html entity names of the chars */
/* All gunicar codes should end in 0 */
diff --git a/charpick/properties.c b/charpick/properties.c
index e732a730..22104235 100644
--- a/charpick/properties.c
+++ b/charpick/properties.c
@@ -15,6 +15,11 @@
#define CHARPICK_STOCK_EDIT "charpick-stock-edit"
+#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
+
void
register_stock_for_edit (void)
{
diff --git a/command/command.c b/command/command.c
index e13a0f0c..20c6799b 100644
--- a/command/command.c
+++ b/command/command.c
@@ -48,6 +48,10 @@
#define GK_COMMAND_OUTPUT "Output"
#define GK_COMMAND_ICON "Icon"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
typedef struct
{
MatePanelApplet *applet;
diff --git a/cpufreq/src/cpufreq-applet.c b/cpufreq/src/cpufreq-applet.c
index a053da5a..326701a5 100644
--- a/cpufreq/src/cpufreq-applet.c
+++ b/cpufreq/src/cpufreq-applet.c
@@ -43,6 +43,11 @@
#include "cpufreq-monitor-factory.h"
#include "cpufreq-utils.h"
+#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
+
struct _CPUFreqApplet {
MatePanelApplet base;
@@ -448,7 +453,7 @@ cpufreq_applet_size_request (GtkWidget *widget, GtkRequisition *requisition)
gint icon_width;
gtk_widget_get_preferred_width (applet->icon, &icon_width, NULL);
- width = GTK_IS_HBOX (applet->box) ?
+ width = gtk_orientable_get_orientation (GTK_ORIENTABLE (applet->box)) == GTK_ORIENTATION_HORIZONTAL ?
labels_width + icon_width + 2 :
MAX (labels_width, icon_width + 2);
#else
diff --git a/geyes/geyes.c b/geyes/geyes.c
index 161c1682..49a79402 100644
--- a/geyes/geyes.c
+++ b/geyes/geyes.c
@@ -27,6 +27,11 @@
#define UPDATE_TIMEOUT 100
+#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
+
static void
applet_back_change (MatePanelApplet *a,
MatePanelAppletBackgroundType type,
diff --git a/geyes/themes.c b/geyes/themes.c
index 9af46d4b..325a14af 100644
--- a/geyes/themes.c
+++ b/geyes/themes.c
@@ -29,6 +29,11 @@
#define NUM_THEME_DIRECTORIES 2
#define HIG_IDENTATION " "
+#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
+
static char *theme_directories[NUM_THEME_DIRECTORIES];
enum {
diff --git a/mateweather/mateweather-applet.c b/mateweather/mateweather-applet.c
index 2c0f55c1..484160b5 100644
--- a/mateweather/mateweather-applet.c
+++ b/mateweather/mateweather-applet.c
@@ -50,6 +50,11 @@
#define MAX_CONSECUTIVE_FAULTS (3)
+#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
+
static void about_cb (GtkAction *action,
MateWeatherApplet *gw_applet)
{
diff --git a/mateweather/mateweather-dialog.c b/mateweather/mateweather-dialog.c
index af71d319..a50cbec2 100644
--- a/mateweather/mateweather-dialog.c
+++ b/mateweather/mateweather-dialog.c
@@ -27,6 +27,11 @@
#include "mateweather-pref.h"
#include "mateweather-dialog.h"
+#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
+
struct _MateWeatherDialogPrivate {
GtkWidget* cond_location;
GtkWidget* cond_update;
diff --git a/mateweather/mateweather-pref.c b/mateweather/mateweather-pref.c
index 672aa8e9..51d6947f 100644
--- a/mateweather/mateweather-pref.c
+++ b/mateweather/mateweather-pref.c
@@ -37,6 +37,11 @@
#define NEVER_SENSITIVE "never_sensitive"
+#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
+
struct _MateWeatherPrefPrivate {
GtkWidget* basic_detailed_btn;
GtkWidget* basic_temp_combo;
diff --git a/multiload/load-graph.c b/multiload/load-graph.c
index a6508056..3a15d4ba 100644
--- a/multiload/load-graph.c
+++ b/multiload/load-graph.c
@@ -15,6 +15,9 @@
#include "global.h"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y)
+#endif
/*
Shifts data right
diff --git a/multiload/main.c b/multiload/main.c
index b8e065bb..a3203fcc 100644
--- a/multiload/main.c
+++ b/multiload/main.c
@@ -35,6 +35,8 @@
#define MATE_DESKTOP_USE_UNSTABLE_API
#include <libmate-desktop/mate-desktop-utils.h>
#define gdk_spawn_command_line_on_screen mate_gdk_spawn_command_line_on_screen
+#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
#include "global.h"
diff --git a/multiload/properties.c b/multiload/properties.c
index df2433d1..3753a44b 100644
--- a/multiload/properties.c
+++ b/multiload/properties.c
@@ -33,6 +33,11 @@
#define HIG_IDENTATION " "
#define NEVER_SENSITIVE "never_sensitive"
+#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
+
/* set sensitive and setup NEVER_SENSITIVE appropriately */
static void
hard_set_sensitive (GtkWidget *w, gboolean sensitivity)
diff --git a/timerapplet/timerapplet.c b/timerapplet/timerapplet.c
index c5ff8a45..292ffda5 100644
--- a/timerapplet/timerapplet.c
+++ b/timerapplet/timerapplet.c
@@ -45,6 +45,10 @@
#define SHOW_NOTIFICATION_KEY "show-notification"
#define SHOW_DIALOG_KEY "show-dialog"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y)
+#endif
+
typedef struct
{
MatePanelApplet *applet;
diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c
index be92ca9d..f3372b17 100644
--- a/trashapplet/src/trashapplet.c
+++ b/trashapplet/src/trashapplet.c
@@ -40,6 +40,11 @@
#include "trash-empty.h"
#include "xstuff.h"
+#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
+
typedef MatePanelAppletClass TrashAppletClass;
typedef struct