aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-13 23:54:58 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:19 +0800
commit2485ba3936c9fdd4e185393d49c34dae7ba1f49d (patch)
tree0836c8d3ebd4636ffa836de97f7217598264e999 /e-util
parent57d45a6536711e3fe974b97642f218ac859e36e7 (diff)
downloadgsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.gz
gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.tar.zst
gsoc2013-evolution-2485ba3936c9fdd4e185393d49c34dae7ba1f49d.zip
Fudge gtk_widget_get_preferred_size() for gtk2.
Easy enough to fake gtk_widget_get_preferred_size() in gtk2 using gtk_widget_size_request(). Reduces diff noise with gtk3 branch.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/gtk-compat.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/e-util/gtk-compat.h b/e-util/gtk-compat.h
index bbee3717cf..f67a9e2c8b 100644
--- a/e-util/gtk-compat.h
+++ b/e-util/gtk-compat.h
@@ -5,6 +5,11 @@
/* Provide a GTK+ compatibility layer. */
+#if !GTK_CHECK_VERSION (2,91,0) /* approximately */
+#define gtk_widget_get_preferred_size(widget, minimum_size, natural_size) \
+ (gtk_widget_size_request ((widget), ((minimum_size))))
+#endif
+
#if !GTK_CHECK_VERSION (2,23,0)
#define gtk_combo_box_text_new gtk_combo_box_new_text
#define gtk_combo_box_text_append_text gtk_combo_box_append_text