From 070d3123bd6a5877c2f2b7e9932bd31d85bd5750 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 6 Feb 2018 00:46:03 +0100 Subject: [PATCH] Add compatibility code for GtkDialog --- include/Desktop/compat.h | 4 ++++ src/compat.c | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/include/Desktop/compat.h b/include/Desktop/compat.h index 2baadb5..45674b7 100644 --- a/include/Desktop/compat.h +++ b/include/Desktop/compat.h @@ -135,6 +135,10 @@ GtkWidget * gtk_box_new(GtkOrientation orientation, gint spacing); GtkWidget * gtk_button_box_new(GtkOrientation orientation); +# if !GTK_CHECK_VERSION(2, 14, 0) +GtkWidget * gtk_dialog_get_content_area(GtkDialog * dialog); +# endif + GtkWidget * gtk_paned_new(GtkOrientation orientation); GtkWidget * gtk_scale_new(GtkOrientation orientation, diff --git a/src/compat.c b/src/compat.c index a007bed..865e436 100644 --- a/src/compat.c +++ b/src/compat.c @@ -79,6 +79,15 @@ GtkWidget * gtk_button_box_new(GtkOrientation orientation) } +# if !GTK_CHECK_VERSION(2, 14, 0) +/* gtk_dialog_get_content_area */ +GtkWidget * gtk_dialog_get_content_area(GtkDialog * dialog) +{ + return dialog->vbox; +} +# endif + + /* gtk_paned_new */ GtkWidget * gtk_paned_new(GtkOrientation orientation) {