diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-06-26 04:03:31 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-06-26 04:03:31 +0000 |
commit | bbb842cbedd45a3952496bb616c0e88a0416f6a9 (patch) | |
tree | 79758be4617671e28a8965ff4b5a89994cbd9574 /src/gtkutils.c | |
parent | b91745127a6333b9b8a809bc79e21b297aef4598 (diff) |
made workarounds for the crash in GTK+ 2.8.x.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1089 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/gtkutils.c')
-rw-r--r-- | src/gtkutils.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gtkutils.c b/src/gtkutils.c index 691c3712..8898f029 100644 --- a/src/gtkutils.c +++ b/src/gtkutils.c @@ -623,6 +623,19 @@ void gtkut_tree_view_scroll_to_cell(GtkTreeView *treeview, GtkTreePath *path, gtk_tree_view_scroll_to_point(treeview, dest_x, dest_y); } +void gtkut_tree_view_fast_clear(GtkTreeView *treeview, GtkTreeStore *store) +{ +#if GTK_CHECK_VERSION(2, 8, 0) + gtk_tree_store_clear(store); +#else + /* this is faster than above, but it seems to trigger crashes in + GTK+ 2.8.x */ + gtk_tree_view_set_model(treeview, NULL); + gtk_tree_store_clear(store); + gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(store)); +#endif +} + void gtkut_combo_set_items(GtkCombo *combo, const gchar *str1, ...) { va_list args; |