From 7dc23854634e8177fb03d403c0f71e9c10830694 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Thu, 23 Jul 2015 19:01:19 +0200 Subject: GTK3: Replace gtk_{v,h}box new with gtk_box_new for gtk+ >=3.2.0 --- src/eom-close-confirmation-dialog.c | 5 +++++ src/eom-error-message-area.c | 5 +++++ src/eom-file-chooser.c | 5 +++++ src/eom-print-image-setup.c | 5 +++++ src/eom-sidebar.c | 5 +++++ src/eom-statusbar.c | 5 +++++ src/eom-window.c | 5 +++++ 7 files changed, 35 insertions(+) (limited to 'src') diff --git a/src/eom-close-confirmation-dialog.c b/src/eom-close-confirmation-dialog.c index 5966de1..119ff44 100644 --- a/src/eom-close-confirmation-dialog.c +++ b/src/eom-close-confirmation-dialog.c @@ -33,6 +33,11 @@ #include "eom-close-confirmation-dialog.h" #include +#if GTK_CHECK_VERSION (3, 2, 0) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#endif + /* Properties */ enum { diff --git a/src/eom-error-message-area.c b/src/eom-error-message-area.c index 3a4a2f4..9ea49a3 100644 --- a/src/eom-error-message-area.c +++ b/src/eom-error-message-area.c @@ -34,6 +34,11 @@ #include #include +#if GTK_CHECK_VERSION (3, 2, 0) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#endif + static void set_message_area_text_and_icon (GtkInfoBar *message_area, const gchar *icon_stock_id, diff --git a/src/eom-file-chooser.c b/src/eom-file-chooser.c index 6eaf30e..62e7ea9 100644 --- a/src/eom-file-chooser.c +++ b/src/eom-file-chooser.c @@ -45,6 +45,11 @@ static char *last_dir[] = { NULL, NULL, NULL, NULL }; EOM_TYPE_FILE_CHOOSER, \ EomFileChooserPrivate)) +#if GTK_CHECK_VERSION (3, 2, 0) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#endif + struct _EomFileChooserPrivate { MateDesktopThumbnailFactory *thumb_factory; diff --git a/src/eom-print-image-setup.c b/src/eom-print-image-setup.c index 6aab307..6aa965b 100644 --- a/src/eom-print-image-setup.c +++ b/src/eom-print-image-setup.c @@ -51,6 +51,11 @@ #define EOM_PRINT_IMAGE_SETUP_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_PRINT_IMAGE_SETUP, EomPrintImageSetupPrivate)) +#if GTK_CHECK_VERSION (3, 2, 0) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#endif + G_DEFINE_TYPE (EomPrintImageSetup, eom_print_image_setup, GTK_TYPE_TABLE); struct _EomPrintImageSetupPrivate { diff --git a/src/eom-sidebar.c b/src/eom-sidebar.c index d8a479c..85a1b2f 100644 --- a/src/eom-sidebar.c +++ b/src/eom-sidebar.c @@ -69,6 +69,11 @@ G_DEFINE_TYPE (EomSidebar, eom_sidebar, GTK_TYPE_VBOX) #define EOM_SIDEBAR_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_SIDEBAR, EomSidebarPrivate)) +#if GTK_CHECK_VERSION (3, 2, 0) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#endif + static void #if GTK_CHECK_VERSION(3, 0, 0) eom_sidebar_destroy (GtkWidget *object) diff --git a/src/eom-statusbar.c b/src/eom-statusbar.c index e825e97..4c01536 100644 --- a/src/eom-statusbar.c +++ b/src/eom-statusbar.c @@ -33,6 +33,11 @@ #define EOM_STATUSBAR_GET_PRIVATE(object) \ (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_STATUSBAR, EomStatusbarPrivate)) +#if GTK_CHECK_VERSION (3, 2, 0) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#endif + G_DEFINE_TYPE (EomStatusbar, eom_statusbar, GTK_TYPE_STATUSBAR) struct _EomStatusbarPrivate diff --git a/src/eom-window.c b/src/eom-window.c index 210ba40..4ab5d57 100644 --- a/src/eom-window.c +++ b/src/eom-window.c @@ -103,6 +103,11 @@ G_DEFINE_TYPE (EomWindow, eom_window, GTK_TYPE_WINDOW); #define is_rtl (gtk_widget_get_default_direction () == GTK_TEXT_DIR_RTL) +#if GTK_CHECK_VERSION (3, 2, 0) +#define gtk_hbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_HORIZONTAL,Y) +#define gtk_vbox_new(X,Y) gtk_box_new(GTK_ORIENTATION_VERTICAL,Y) +#endif + typedef enum { EOM_WINDOW_STATUS_UNKNOWN, EOM_WINDOW_STATUS_INIT, -- cgit v1.2.1