aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-01-13 23:54:58 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-01-15 03:58:29 +0800
commit0af3ff804c0d71c76fd63f0a2a152cac7de64863 (patch)
treee80b7e357654f0dcc3cef08e1d2d459b9cf45d85 /e-util
parent7087e222f8422470c44ce2ecd5c598fefd2315fc (diff)
downloadgsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.gz
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.tar.zst
gsoc2013-evolution-0af3ff804c0d71c76fd63f0a2a152cac7de64863.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