[gitg] Use fields instead of functions to keep compatible with gtk+ 2.12



commit ff72080fcea9b5aac2dcce769135a6273623fb52
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sat Jul 4 20:18:30 2009 +0200

    Use fields instead of functions to keep compatible with gtk+ 2.12

 configure.ac    |    2 +-
 gitg/gitg-dnd.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3dc4803..779e3f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,7 +45,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
 AM_GLIB_GNU_GETTEXT
 
 PKG_CHECK_MODULES(PACKAGE, [
-	gtk+-2.0 >= 2.14.0
+	gtk+-2.0 >= 2.12.0
 	gthread-2.0
 	gtksourceview-2.0
 	gio-2.0
diff --git a/gitg/gitg-dnd.c b/gitg/gitg-dnd.c
index 80a2912..aea6914 100644
--- a/gitg/gitg-dnd.c
+++ b/gitg/gitg-dnd.c
@@ -277,8 +277,8 @@ vertical_autoscroll (GitgDndData *data)
 
 	GtkAdjustment *adj = gtk_tree_view_get_vadjustment (data->tree_view);
 	
-	value = CLAMP (gtk_adjustment_get_value (adj) + offset, 0.0,
-	               gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj));
+	value = CLAMP (adj->upper + offset, 0.0,
+	               adj->upper - adj->page_size);
 
 	gtk_adjustment_set_value (adj, value);	
 	return TRUE;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]