[libgda] Correction for when GTK+ version < 2.18
- From: Vivien Malerba <vivien src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgda] Correction for when GTK+ version < 2.18
- Date: Tue, 8 Dec 2009 19:40:45 +0000 (UTC)
commit cef701a919496a54e8d59c7eed7a179598aad16a
Author: Vivien Malerba <malerba gnome-db org>
Date: Tue Dec 8 20:39:57 2009 +0100
Correction for when GTK+ version < 2.18
tools/browser/browser-spinner.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/tools/browser/browser-spinner.c b/tools/browser/browser-spinner.c
index 9504ba6..f521b66 100644
--- a/tools/browser/browser-spinner.c
+++ b/tools/browser/browser-spinner.c
@@ -633,19 +633,17 @@ browser_spinner_expose (GtkWidget *widget, GdkEventExpose *event)
height = gdk_pixbuf_get_height (pixbuf);
/* Compute the offsets for the image centered on our allocation */
-#if GTK_CHECK_VERSION(2,18,0)
GtkAllocation alloc;
+#if GTK_CHECK_VERSION(2,18,0)
gtk_widget_get_allocation (widget, &alloc);
+#else
+ alloc = widget->allocation;
+#endif
x_offset = (alloc.width - width) / 2;
y_offset = (alloc.height - height) / 2;
pix_area.x = x_offset + alloc.x;
pix_area.y = y_offset + alloc.y;
-#else
- x_offset = (widget->allocation.width - width) / 2;
- y_offset = (widget->allocation.height - height) / 2;
- pix_area.x = x_offset + widget->allocation.x;
- pix_area.y = y_offset + widget->allocation.y;
-#endif
+
pix_area.width = width;
pix_area.height = height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]