[gtk+] More patchwork for icon view subclasses that access the icon view api prematurely.



commit f85e80aadadbd5ff96e18c5669376278f84ab451
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Fri Feb 25 16:00:20 2011 +0900

    More patchwork for icon view subclasses that access the icon view api prematurely.
    
    In this patch we adress rows_reordered() and row_deleted() callbacks
    (since some icon view subclasses manipulate the connected treemodel
    from _init()).

 gtk/gtkiconview.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 239f9dba..03c4e59 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -3355,7 +3355,8 @@ gtk_icon_view_row_deleted (GtkTreeModel *model,
   list = g_list_nth (icon_view->priv->items, index);
   item = list->data;
 
-  gtk_cell_area_stop_editing (icon_view->priv->cell_area, TRUE);
+  if (icon_view->priv->cell_area)
+    gtk_cell_area_stop_editing (icon_view->priv->cell_area, TRUE);
 
   if (item == icon_view->priv->anchor_item)
     icon_view->priv->anchor_item = NULL;
@@ -3403,7 +3404,8 @@ gtk_icon_view_rows_reordered (GtkTreeModel *model,
   if (iter != NULL)
     return;
 
-  gtk_cell_area_stop_editing (icon_view->priv->cell_area, TRUE);
+  if (icon_view->priv->cell_area)
+    gtk_cell_area_stop_editing (icon_view->priv->cell_area, TRUE);
 
   length = gtk_tree_model_iter_n_children (model, NULL);
 



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