diff options
author | infirit <[email protected]> | 2014-11-20 19:26:59 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-11-20 19:40:56 +0100 |
commit | 0ecd00c6f86b4558e978c07221baebe64039525b (patch) | |
tree | da35027c96ed8f36f0d4148015552edf7e980641 /src | |
parent | 09fe261d9d0e6bbb9c44d073e6211c5eed37b2c0 (diff) | |
download | engrampa-0ecd00c6f86b4558e978c07221baebe64039525b.tar.bz2 engrampa-0ecd00c6f86b4558e978c07221baebe64039525b.tar.xz |
Gtk3: Silence the GtkBox and GtkPaned deprecation warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/dlg-add-files.c | 3 | ||||
-rw-r--r-- | src/dlg-add-folder.c | 5 | ||||
-rw-r--r-- | src/dlg-extract.c | 5 | ||||
-rw-r--r-- | src/fr-window.c | 6 | ||||
-rw-r--r-- | src/gtk-utils.c | 5 |
5 files changed, 24 insertions, 0 deletions
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 <config.h> #include <string.h> #include <unistd.h> +#include <gtk/gtk.h> #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 <config.h> #include <string.h> +#include <gtk/gtk.h> #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, |