[gtk+/refactor: 7/96] gtk/gtktreeviewcolumn.c: use accessor functions to access GtkWidget



commit 8da362697f4c3bc7017721d8e52e64ddcc9195d9
Author: Javier Jardón <jjardon gnome org>
Date:   Wed Aug 11 22:50:01 2010 +0200

    gtk/gtktreeviewcolumn.c: use accessor functions to access GtkWidget

 gtk/gtktreeviewcolumn.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c
index 7f75f2c..ebc054d 100644
--- a/gtk/gtktreeviewcolumn.c
+++ b/gtk/gtktreeviewcolumn.c
@@ -1265,6 +1265,7 @@ gtk_tree_view_column_setup_sort_column_id_callback (GtkTreeViewColumn *tree_colu
 void
 _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
 {
+  GtkAllocation allocation;
   GtkTreeView *tree_view;
   GdkWindowAttr attr;
   guint attributes_mask;
@@ -1300,7 +1301,8 @@ _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column)
   attr.width = TREE_VIEW_DRAG_WIDTH;
   attr.height = tree_view->priv->header_height;
 
-  attr.x = (column->button->allocation.x + (rtl ? 0 : column->button->allocation.width)) - TREE_VIEW_DRAG_WIDTH / 2;
+  gtk_widget_get_allocation (column->button, &allocation);
+  attr.x = (allocation.x + (rtl ? 0 : allocation.width)) - TREE_VIEW_DRAG_WIDTH / 2;
   column->window = gdk_window_new (tree_view->priv->header_window,
 				   &attr, attributes_mask);
   gdk_window_set_user_data (column->window, tree_view);
@@ -3505,7 +3507,7 @@ _gtk_tree_view_column_cell_draw_focus (GtkTreeViewColumn  *tree_column,
       cell_state = flags & GTK_CELL_RENDERER_SELECTED ? GTK_STATE_SELECTED :
 	      (flags & GTK_CELL_RENDERER_PRELIT ? GTK_STATE_PRELIGHT :
 	      (flags & GTK_CELL_RENDERER_INSENSITIVE ? GTK_STATE_INSENSITIVE : GTK_STATE_NORMAL));
-      gtk_paint_focus (tree_column->tree_view->style,
+      gtk_paint_focus (gtk_widget_get_style (tree_column->tree_view),
 		       window,
 		       cell_state,
 		       cell_area,



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