Use gtk_adjustmenr_get_value() instead of adjustment->value

This commit is contained in:
Michael Natterer 2009-10-10 10:55:09 +02:00
parent 1e47f5c67c
commit 9f77899bf1
2 changed files with 14 additions and 16 deletions

View File

@ -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);

View File

@ -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;
}
}