[gimp] Use GtkAdjustment's accessors



commit e2cc191c92eedc29d6f435ad4e62a5964850f0c8
Author: Michael Natterer <mitch gimp org>
Date:   Thu Oct 8 20:05:12 2009 +0200

    Use GtkAdjustment's accessors

 app/display/gimpnavigationeditor.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/app/display/gimpnavigationeditor.c b/app/display/gimpnavigationeditor.c
index 1ac8160..176ea97 100644
--- a/app/display/gimpnavigationeditor.c
+++ b/app/display/gimpnavigationeditor.c
@@ -573,16 +573,19 @@ gimp_navigation_editor_scroll (GimpNavigationView   *view,
         {
         case GDK_SCROLL_LEFT:
         case GDK_SCROLL_UP:
-          value -= adj->page_increment / 2;
+          value -= gtk_adjustment_get_page_increment (adj) / 2;
           break;
 
         case GDK_SCROLL_RIGHT:
         case GDK_SCROLL_DOWN:
-          value += adj->page_increment / 2;
+          value += gtk_adjustment_get_page_increment (adj) / 2;
           break;
         }
 
-      value = CLAMP (value, adj->lower, adj->upper - adj->page_size);
+      value = CLAMP (value,
+                     gtk_adjustment_get_lower (adj),
+                     gtk_adjustment_get_upper (adj) -
+                     gtk_adjustment_get_page_size (adj));
 
       gtk_adjustment_set_value (adj, value);
     }



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