[gimp] Use gtk_adjustmenr_get_value() instead of adjustment->value



commit 9f77899bf1bde79405055abb0f20e12b28b79d32
Author: Michael Natterer <mitch gimp org>
Date:   Sat Oct 10 10:55:09 2009 +0200

    Use gtk_adjustmenr_get_value() instead of adjustment->value

 plug-ins/common/bump-map.c      |    6 ++----
 plug-ins/common/channel-mixer.c |   24 ++++++++++++------------
 2 files changed, 14 insertions(+), 16 deletions(-)
---
diff --git a/plug-ins/common/bump-map.c b/plug-ins/common/bump-map.c
index 99a29b0..67c93e0 100644
--- a/plug-ins/common/bump-map.c
+++ b/plug-ins/common/bump-map.c
@@ -1136,11 +1136,10 @@ dialog_new_bumpmap (gboolean init_offsets)
       adj = (GtkAdjustment *) bmint.offset_adj_x;
       if (adj)
         {
-          adj->value = bmvals.xofs;
           g_signal_handlers_block_by_func (adj,
                                            gimp_int_adjustment_update,
                                            &bmvals.xofs);
-          gtk_adjustment_value_changed (adj);
+          gtk_adjustment_set_value (adj, bmvals.xofs);
           g_signal_handlers_unblock_by_func (adj,
                                              gimp_int_adjustment_update,
                                              &bmvals.xofs);
@@ -1149,11 +1148,10 @@ dialog_new_bumpmap (gboolean init_offsets)
       adj = (GtkAdjustment *) bmint.offset_adj_y;
       if (adj)
         {
-          adj->value = bmvals.yofs;
           g_signal_handlers_block_by_func (adj,
                                            gimp_int_adjustment_update,
                                            &bmvals.yofs);
-          gtk_adjustment_value_changed (adj);
+          gtk_adjustment_set_value (adj, bmvals.yofs);
           g_signal_handlers_unblock_by_func (adj,
                                              gimp_int_adjustment_update,
                                              &bmvals.yofs);
diff --git a/plug-ins/common/channel-mixer.c b/plug-ins/common/channel-mixer.c
index 374683d..c515536 100644
--- a/plug-ins/common/channel-mixer.c
+++ b/plug-ins/common/channel-mixer.c
@@ -703,20 +703,20 @@ cm_red_scale_callback (GtkAdjustment *adjustment,
 {
   if (mix->monochrome)
     {
-      mix->black.red_gain = adjustment->value / 100.0;
+      mix->black.red_gain = gtk_adjustment_get_value (adjustment) / 100.0;
     }
   else
     {
       switch (mix->output_channel)
         {
         case CM_RED_CHANNEL:
-          mix->red.red_gain = adjustment->value / 100.0;
+          mix->red.red_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         case CM_GREEN_CHANNEL:
-          mix->green.red_gain = adjustment->value / 100.0;
+          mix->green.red_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         case CM_BLUE_CHANNEL:
-          mix->blue.red_gain = adjustment->value / 100.0;
+          mix->blue.red_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         }
     }
@@ -730,20 +730,20 @@ cm_green_scale_callback (GtkAdjustment *adjustment,
 {
   if (mix->monochrome)
     {
-      mix->black.green_gain = adjustment->value / 100.0;
+      mix->black.green_gain = gtk_adjustment_get_value (adjustment) / 100.0;
     }
   else
     {
       switch (mix->output_channel)
         {
         case CM_RED_CHANNEL:
-          mix->red.green_gain = adjustment->value / 100.0;
+          mix->red.green_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         case CM_GREEN_CHANNEL:
-          mix->green.green_gain = adjustment->value / 100.0;
+          mix->green.green_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         case CM_BLUE_CHANNEL:
-          mix->blue.green_gain = adjustment->value / 100.0;
+          mix->blue.green_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         }
     }
@@ -757,20 +757,20 @@ cm_blue_scale_callback (GtkAdjustment *adjustment,
 {
   if (mix->monochrome)
     {
-      mix->black.blue_gain = adjustment->value / 100.0;
+      mix->black.blue_gain = gtk_adjustment_get_value (adjustment) / 100.0;
     }
   else
     {
       switch (mix->output_channel)
         {
         case CM_RED_CHANNEL:
-          mix->red.blue_gain = adjustment->value / 100.0;
+          mix->red.blue_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         case CM_GREEN_CHANNEL:
-          mix->green.blue_gain = adjustment->value / 100.0;
+          mix->green.blue_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         case CM_BLUE_CHANNEL:
-          mix->blue.blue_gain = adjustment->value / 100.0;
+          mix->blue.blue_gain = gtk_adjustment_get_value (adjustment) / 100.0;
           break;
         }
     }



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