summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tree.c9
-rw-r--r--src/util.c4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/tree.c b/src/tree.c
index a8b324f..7f20b92 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -30,6 +30,15 @@
#include "zenity.h"
#include "util.h"
+#if GTK_MAJOR_VERSION == 2
+static void
+gtk_widget_get_preferred_size (GtkWidget *widget, GtkRequisition *minimum_size, GtkRequisition *natural_size)
+{
+ gtk_widget_size_request(widget, natural_size);
+ gtk_widget_get_size_request(widget, &(minimum_size->width), &(minimum_size->height));
+}
+#endif
+
#define MAX_ELEMENTS_BEFORE_SCROLLING 5
#define PRINT_HIDE_COLUMN_SEPARATOR ","
diff --git a/src/util.c b/src/util.c
index d63aeca..23ba3ab 100644
--- a/src/util.c
+++ b/src/util.c
@@ -45,6 +45,10 @@
#define ZENITY_ERROR_DEFAULT -1
#define ZENITY_EXTRA_DEFAULT 127
+#if defined(GDK_WINDOWING_X11) && !defined(GDK_IS_X11_DISPLAY)
+#define GDK_IS_X11_DISPLAY(display) 1
+#endif
+
GtkBuilder*
zenity_util_load_ui_file (const gchar *root_widget, ...)
{