From 4e3db2e3a8eb9a9f4cc0ce5c2abe17ba8f5f72ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Fri, 19 Nov 2010 07:47:27 +0100 Subject: [PATCH] gtkcombobox: Use accessor functions to access GtkTreeViewColumn --- gtk/gtkcombobox.c | 2 +- gtk/gtktreeview.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 08a4797c3d..9df273d81c 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -4327,7 +4327,7 @@ gtk_combo_box_list_select_func (GtkTreeSelection *selection, GtkTreeIter iter; GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN (list->data); - if (!column->visible) + if (!gtk_tree_view_column_get_visible (column)) continue; gtk_tree_model_get_iter (model, &iter, path); diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index 3abc1f4c34..dc3e3b717c 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -2367,7 +2367,7 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget, list = (rtl ? list->prev : list->next)) { gint real_requested_width = 0; - gint old_width, width; + gint old_width, column_width; column = list->data; old_width = gtk_tree_view_column_get_width (column); @@ -2425,11 +2425,11 @@ gtk_tree_view_size_allocate_columns (GtkWidget *widget, g_object_notify (G_OBJECT (column), "width"); - width = gtk_tree_view_column_get_width (column); - allocation.width = width; - width += width; + column_width = gtk_tree_view_column_get_width (column); + allocation.width = column_width; + width += column_width; - if (column->width > old_width) + if (column_width > old_width) column_changed = TRUE; gtk_widget_size_allocate (column->button, &allocation); @@ -5510,7 +5510,7 @@ gtk_tree_view_key_press (GtkWidget *widget, column->resized_width += 2; max_width = gtk_tree_view_column_get_max_width (column); - if (column != -1) + if (max_width != -1) column->resized_width = MIN (column->resized_width, max_width); column->use_resized_width = TRUE; @@ -10641,7 +10641,7 @@ gtk_tree_view_new_column_width (GtkTreeView *tree_view, width = MAX (min_width, width); max_width = gtk_tree_view_column_get_max_width (column); - if (column != -1) + if (max_width != -1) width = MIN (width, max_width); *x = rtl ? (allocation.x + allocation.width - width) : (allocation.x + width);