]> Pileus Git - ~andy/gtk/commitdiff
gtk/gtktreeviewcolumn.c: use accessor functions to access GtkWidget
authorJavier Jardón <jjardon@gnome.org>
Wed, 11 Aug 2010 20:50:01 +0000 (22:50 +0200)
committerJavier Jardón <jjardon@gnome.org>
Sun, 22 Aug 2010 19:25:22 +0000 (21:25 +0200)
gtk/gtktreeviewcolumn.c

index 7f75f2c8c3275ab4d47b23158a99fba3031d0457..ebc054d43ebca4ccc259143b0d036307c407e46f 100644 (file)
@@ -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,