From: Vadim Zeitlin Date: Tue, 8 Nov 2011 11:02:02 +0000 (+0000) Subject: Compilation fixes for GTK+ 2.4. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b6dd4afdf8d9456dccd0ead2016143708dd6435d?ds=inline Compilation fixes for GTK+ 2.4. Add missing GTK_CHECK_VERSION(2,6,0) checks. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/gtk/private/gtk2-compat.h b/include/wx/gtk/private/gtk2-compat.h index d7be4f14ad..f4f74d8e7c 100644 --- a/include/wx/gtk/private/gtk2-compat.h +++ b/include/wx/gtk/private/gtk2-compat.h @@ -55,13 +55,16 @@ static inline gpointer wx_g_object_ref_sink(gpointer object) #define g_object_ref_sink wx_g_object_ref_sink // ---------------------------------------------------------------------------- -// the following were introduced in GTK+ 2.12 +// the following were introduced in GTK+ 2.12 and GtkAboutDialog itself is not +// in 2.4 so skip this if we don't have it. +#if GTK_CHECK_VERSION(2,6,0) static inline void wx_gtk_about_dialog_set_program_name(GtkAboutDialog* about, const gchar* name) { gtk_about_dialog_set_name(about, name); } #define gtk_about_dialog_set_program_name wx_gtk_about_dialog_set_program_name +#endif // 2.6.0 // ---------------------------------------------------------------------------- // the following were introduced in GTK+ 2.14 diff --git a/src/gtk/assertdlg_gtk.cpp b/src/gtk/assertdlg_gtk.cpp index e80caffbdb..4df435b37e 100644 --- a/src/gtk/assertdlg_gtk.cpp +++ b/src/gtk/assertdlg_gtk.cpp @@ -44,7 +44,9 @@ GtkWidget *gtk_assert_dialog_add_button_to (GtkBox *box, const gchar *label, /* add a stock icon inside it */ GtkWidget *image = gtk_image_new_from_stock (stock, GTK_ICON_SIZE_BUTTON); +#if GTK_CHECK_VERSION(2,6,0) gtk_button_set_image (GTK_BUTTON (button), image); +#endif /* add to the given (container) widget */ if (box)