From 0ecd00c6f86b4558e978c07221baebe64039525b Mon Sep 17 00:00:00 2001 From: infirit Date: Thu, 20 Nov 2014 19:26:59 +0100 Subject: Gtk3: Silence the GtkBox and GtkPaned deprecation warnings --- src/dlg-add-files.c | 3 +++ src/dlg-add-folder.c | 5 +++++ src/dlg-extract.c | 5 +++++ src/fr-window.c | 6 ++++++ src/gtk-utils.c | 5 +++++ 5 files changed, 24 insertions(+) diff --git a/src/dlg-add-files.c b/src/dlg-add-files.c index 03f3828..18b70c8 100644 --- a/src/dlg-add-files.c +++ b/src/dlg-add-files.c @@ -31,6 +31,9 @@ #include "gtk-utils.h" #include "preferences.h" +#if GTK_CHECK_VERSION (3, 0, 0) +#define gtk_hbox_new(X, Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL, Y) +#endif typedef struct { FrWindow *window; diff --git a/src/dlg-add-folder.c b/src/dlg-add-folder.c index 01762f6..ebd0668 100644 --- a/src/dlg-add-folder.c +++ b/src/dlg-add-folder.c @@ -40,6 +40,11 @@ #define UNUSED_VARIABLE #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 + typedef struct { FrWindow *window; GSettings *settings; diff --git a/src/dlg-extract.c b/src/dlg-extract.c index 9cdc272..e92966b 100644 --- a/src/dlg-extract.c +++ b/src/dlg-extract.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "file-utils.h" #include "fr-stock.h" #include "main.h" @@ -30,6 +31,10 @@ #include "fr-window.h" #include "typedefs.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 { FrWindow *window; diff --git a/src/fr-window.c b/src/fr-window.c index 84bac36..505f702 100644 --- a/src/fr-window.c +++ b/src/fr-window.c @@ -100,6 +100,12 @@ static int dir_tree_icon_size = 0; #define FR_CLIPBOARD (gdk_atom_intern_static_string ("_RNGRAMPA_SPECIAL_CLIPBOARD")) #define FR_SPECIAL_URI_LIST (gdk_atom_intern_static_string ("application/engrampa-uri-list")) +#if GTK_CHECK_VERSION (3, 0, 0) +#define gtk_hpaned_new() gtk_paned_new(GTK_ORIENTATION_HORIZONTAL) +#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 GtkTargetEntry clipboard_targets[] = { { "application/engrampa-uri-list", 0, 1 } }; diff --git a/src/gtk-utils.c b/src/gtk-utils.c index fbcf967..3e1594e 100644 --- a/src/gtk-utils.c +++ b/src/gtk-utils.c @@ -22,10 +22,15 @@ #include #include +#include #include "gtk-utils.h" #define LOAD_BUFFER_SIZE 65536 +#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 count_selected (GtkTreeModel *model, -- cgit v1.2.1