gail: Update adjustment usage for sealing

This commit is contained in:
Benjamin Otte 2011-01-05 22:12:58 +01:00
parent 801ba1c758
commit a28be2cc6c
2 changed files with 15 additions and 15 deletions

View File

@ -118,7 +118,7 @@ gail_adjustment_get_current_value (AtkValue *obj,
return;
}
current_value = adjustment->value;
current_value = gtk_adjustment_get_value (adjustment);
memset (value, 0, sizeof (GValue));
g_value_init (value, G_TYPE_DOUBLE);
g_value_set_double (value,current_value);
@ -138,7 +138,7 @@ gail_adjustment_get_maximum_value (AtkValue *obj,
return;
}
maximum_value = adjustment->upper;
maximum_value = gtk_adjustment_get_upper (adjustment);
memset (value, 0, sizeof (GValue));
g_value_init (value, G_TYPE_DOUBLE);
g_value_set_double (value, maximum_value);
@ -158,7 +158,7 @@ gail_adjustment_get_minimum_value (AtkValue *obj,
return;
}
minimum_value = adjustment->lower;
minimum_value = gtk_adjustment_get_lower (adjustment);
memset (value, 0, sizeof (GValue));
g_value_init (value, G_TYPE_DOUBLE);
g_value_set_double (value, minimum_value);
@ -178,26 +178,26 @@ gail_adjustment_get_minimum_increment (AtkValue *obj,
return;
}
if (adjustment->step_increment != 0 &&
adjustment->page_increment != 0)
if (gtk_adjustment_get_step_increment (adjustment) != 0 &&
gtk_adjustment_get_page_increment (adjustment) != 0)
{
if (ABS (adjustment->step_increment) < ABS (adjustment->page_increment))
minimum_increment = adjustment->step_increment;
if (ABS (gtk_adjustment_get_step_increment (adjustment)) < ABS (gtk_adjustment_get_page_increment (adjustment)))
minimum_increment = gtk_adjustment_get_step_increment (adjustment);
else
minimum_increment = adjustment->page_increment;
minimum_increment = gtk_adjustment_get_page_increment (adjustment);
}
else if (adjustment->step_increment == 0 &&
adjustment->page_increment == 0)
else if (gtk_adjustment_get_step_increment (adjustment) == 0 &&
gtk_adjustment_get_page_increment (adjustment) == 0)
{
minimum_increment = 0;
}
else if (adjustment->step_increment == 0)
else if (gtk_adjustment_get_step_increment (adjustment) == 0)
{
minimum_increment = adjustment->page_increment;
minimum_increment = gtk_adjustment_get_page_increment (adjustment);
}
else
{
minimum_increment = adjustment->step_increment;
minimum_increment = gtk_adjustment_get_step_increment (adjustment);
}
memset (value, 0, sizeof (GValue));

View File

@ -1061,9 +1061,9 @@ static gboolean gail_widget_on_screen (GtkWidget *widget)
gtk_widget_get_allocation (viewport, &viewport_allocation);
adjustment = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (viewport));
visible_rect.y = adjustment->value;
visible_rect.y = gtk_adjustment_get_value (adjustment);
adjustment = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (viewport));
visible_rect.x = adjustment->value;
visible_rect.x = gtk_adjustment_get_value (adjustment);
visible_rect.width = viewport_allocation.width;
visible_rect.height = viewport_allocation.height;