[gtk+] combobox: Update adjustment usage for sealing
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] combobox: Update adjustment usage for sealing
- Date: Wed, 5 Jan 2011 22:56:06 +0000 (UTC)
commit a41402c455c05c4b29d2220022d08f5e4dde83a9
Author: Benjamin Otte <otte redhat com>
Date: Wed Jan 5 22:29:13 2011 +0100
combobox: Update adjustment usage for sealing
gtk/gtkcombobox.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index c1ca3bc..b2adcfb 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -3632,35 +3632,35 @@ gtk_combo_box_list_auto_scroll (GtkComboBox *combo_box,
gtk_widget_get_allocation (tree_view, &allocation);
adj = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (combo_box->priv->scrolled_window));
- if (adj && adj->upper - adj->lower > adj->page_size)
+ if (adj && gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj) > gtk_adjustment_get_page_size (adj))
{
if (x <= allocation.x &&
- adj->lower < adj->value)
+ gtk_adjustment_get_lower (adj) < gtk_adjustment_get_value (adj))
{
- value = adj->value - (allocation.x - x + 1);
+ value = gtk_adjustment_get_value (adj) - (allocation.x - x + 1);
gtk_adjustment_set_value (adj, value);
}
else if (x >= allocation.x + allocation.width &&
- adj->upper - adj->page_size > adj->value)
+ gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj) > gtk_adjustment_get_value (adj))
{
- value = adj->value + (x - allocation.x - allocation.width + 1);
+ value = gtk_adjustment_get_value (adj) + (x - allocation.x - allocation.width + 1);
gtk_adjustment_set_value (adj, MAX (value, 0.0));
}
}
adj = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (combo_box->priv->scrolled_window));
- if (adj && adj->upper - adj->lower > adj->page_size)
+ if (adj && gtk_adjustment_get_upper (adj) - gtk_adjustment_get_lower (adj) > gtk_adjustment_get_page_size (adj))
{
if (y <= allocation.y &&
- adj->lower < adj->value)
+ gtk_adjustment_get_lower (adj) < gtk_adjustment_get_value (adj))
{
- value = adj->value - (allocation.y - y + 1);
+ value = gtk_adjustment_get_value (adj) - (allocation.y - y + 1);
gtk_adjustment_set_value (adj, value);
}
else if (y >= allocation.height &&
- adj->upper - adj->page_size > adj->value)
+ gtk_adjustment_get_upper (adj) - gtk_adjustment_get_page_size (adj) > gtk_adjustment_get_value (adj))
{
- value = adj->value + (y - allocation.height + 1);
+ value = gtk_adjustment_get_value (adj) + (y - allocation.height + 1);
gtk_adjustment_set_value (adj, MAX (value, 0.0));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]