summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-23 11:23:52 +0100
committerinfirit <[email protected]>2014-11-23 11:38:10 +0100
commitdba401f22f4aa533d74bb5429e807fbc3c42ec00 (patch)
tree908bcd70dee3dcca1086f8138333a01a5c8dee1b
parent53362cb07c5e9d68cc9ff52c9a9eaf0da3ef585e (diff)
downloadmate-panel-dba401f22f4aa533d74bb5429e807fbc3c42ec00.tar.bz2
mate-panel-dba401f22f4aa533d74bb5429e807fbc3c42ec00.tar.xz
Gtk3: Silence GtkBox deprecation warnings
-rw-r--r--applets/clock/calendar-window.c6
-rw-r--r--applets/clock/clock-location.c6
-rw-r--r--applets/clock/clock.c4
-rw-r--r--applets/notification_area/na-tray.c5
-rw-r--r--mate-panel/nothing.cP3
-rw-r--r--mate-panel/panel-addto.c5
-rw-r--r--mate-panel/panel-ditem-editor.c4
-rw-r--r--mate-panel/panel-force-quit.c4
8 files changed, 36 insertions, 1 deletions
diff --git a/applets/clock/calendar-window.c b/applets/clock/calendar-window.c
index fe61ce58..2a6de2f1 100644
--- a/applets/clock/calendar-window.c
+++ b/applets/clock/calendar-window.c
@@ -31,6 +31,7 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
+#include <gtk/gtk.h>
#define MATE_DESKTOP_USE_UNSTABLE_API
#include <libmate-desktop/mate-desktop-utils.h>
@@ -45,6 +46,11 @@
#define KEY_LOCATIONS_EXPANDED "expand-locations"
+#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
+
enum {
EDIT_LOCATIONS,
LAST_SIGNAL
diff --git a/applets/clock/clock-location.c b/applets/clock/clock-location.c
index ca785889..bcebb538 100644
--- a/applets/clock/clock-location.c
+++ b/applets/clock/clock-location.c
@@ -15,6 +15,7 @@
#include <glib.h>
#include <gio/gio.h>
+#include <gtk/gtk.h>
#ifdef HAVE_NETWORK_MANAGER
#include <dbus/dbus-glib.h>
@@ -27,6 +28,11 @@
#include "set-timezone.h"
#include "system-timezone.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
+
G_DEFINE_TYPE (ClockLocation, clock_location, G_TYPE_OBJECT)
typedef struct {
diff --git a/applets/clock/clock.c b/applets/clock/clock.c
index 586f857d..4d897656 100644
--- a/applets/clock/clock.c
+++ b/applets/clock/clock.c
@@ -85,6 +85,10 @@
#define KEY_TEMPERATURE_UNIT "temperature-unit"
#define KEY_SPEED_UNIT "speed-unit"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_VERTICAL, Y)
+#endif
+
enum {
COL_CITY_NAME = 0,
COL_CITY_TZ,
diff --git a/applets/notification_area/na-tray.c b/applets/notification_area/na-tray.c
index 7df0741c..356e4d53 100644
--- a/applets/notification_area/na-tray.c
+++ b/applets/notification_area/na-tray.c
@@ -34,6 +34,11 @@
#define ICON_SPACING 1
#define MIN_BOX_SIZE 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
+
typedef struct
{
NaTrayManager *tray_manager;
diff --git a/mate-panel/nothing.cP b/mate-panel/nothing.cP
index cfb935c5..13d45cc3 100644
--- a/mate-panel/nothing.cP
+++ b/mate-panel/nothing.cP
@@ -8,6 +8,7 @@
#include <gdk/gdkkeysyms.h>
#if GTK_CHECK_VERSION (3, 0, 0)
#include <gdk/gdkkeysyms-compat.h>
+#define gtk_vbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_VERTICAL, Y)
#endif
#include <canberra-gtk.h>
@@ -1571,4 +1572,4 @@ panel_dialog_window_event (GtkWidget *window,
return FALSE;
}
-#endif \ No newline at end of file
+#endif
diff --git a/mate-panel/panel-addto.c b/mate-panel/panel-addto.c
index 377ec852..401fd9ed 100644
--- a/mate-panel/panel-addto.c
+++ b/mate-panel/panel-addto.c
@@ -52,6 +52,11 @@
#include "panel-schemas.h"
#include "panel-stock-icons.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 struct {
PanelWidget *panel_widget;
diff --git a/mate-panel/panel-ditem-editor.c b/mate-panel/panel-ditem-editor.c
index 7a4a9e64..9521df17 100644
--- a/mate-panel/panel-ditem-editor.c
+++ b/mate-panel/panel-ditem-editor.c
@@ -40,6 +40,10 @@
#include "panel-util.h"
#include "panel-marshal.h"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_hbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL, Y)
+#endif
+
struct _PanelDItemEditorPrivate
{
/* we keep a ditem around, since we can never have absolutely
diff --git a/mate-panel/panel-force-quit.c b/mate-panel/panel-force-quit.c
index 9b3afaa0..8231b8f1 100644
--- a/mate-panel/panel-force-quit.c
+++ b/mate-panel/panel-force-quit.c
@@ -35,6 +35,10 @@
#include "panel-icon-names.h"
#include "panel-stock-icons.h"
+#if GTK_CHECK_VERSION (3, 0, 0)
+#define gtk_vbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_VERTICAL, Y)
+#endif
+
static GdkFilterReturn popup_filter (GdkXEvent *gdk_xevent,
GdkEvent *event,
GtkWidget *popup);