diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-18 14:36:45 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2013-10-18 14:36:45 -0400 |
commit | 23a7232661bbc2058a483c52394a200f1803a6b0 (patch) | |
tree | ac70f85bc02201433f8c647afd59a4ba82b51035 | |
parent | b5572025d76b5bf4891b1ff260981680f2739992 (diff) |
In tree.c, if GTK_MAJOR_VERSION==2, I provide an implementation of GTK 3's
gtk_widget_get_preferred_size() for GTK 2.
In util.c, if GDK_WINDOWNING_X11 is defined, but GDK_IS_X11_DISPLAY()
isn't, I define it to always return 1.
-rw-r--r-- | src/tree.c | 9 | ||||
-rw-r--r-- | src/util.c | 4 |
2 files changed, 13 insertions, 0 deletions
@@ -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 "," @@ -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, ...) { |