diff --git a/source/libublsettings-gtk3-tree-view.c b/source/libublsettings-gtk3-tree-view.c index d8bda33..8004439 100644 --- a/source/libublsettings-gtk3-tree-view.c +++ b/source/libublsettings-gtk3-tree-view.c @@ -158,9 +158,12 @@ struct fixed_info { int size; }; +void yon_on_fixed_changed(GtkTreeViewColumn *self, GParamSpec*,struct fixed_info *info); void on_row_fixed_changed(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter, struct fixed_info *info){ for (int i=0;isize;i++){ + g_signal_handlers_block_by_func(G_OBJECT(gtk_tree_view_get_column(GTK_TREE_VIEW(info->target),info->columns[i])),yon_on_fixed_changed,info); yon_gtk_tree_view_column_set_fixed_size(GTK_TREE_VIEW(info->target),info->columns[i]); + g_signal_handlers_unblock_by_func(G_OBJECT(gtk_tree_view_get_column(GTK_TREE_VIEW(info->target),info->columns[i])),yon_on_fixed_changed,info); } } @@ -168,7 +171,9 @@ void on_row_fixed_changed(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* it void on_row_fixed_deleted(GtkTreeModel* self, GtkTreePath* path, struct fixed_info *info){ for (int i=0;isize;i++){ + g_signal_handlers_block_by_func(G_OBJECT(gtk_tree_view_get_column(GTK_TREE_VIEW(info->target),info->columns[i])),yon_on_fixed_changed,info); yon_gtk_tree_view_column_set_fixed_size(GTK_TREE_VIEW(info->target),info->columns[i]); + g_signal_handlers_unblock_by_func(G_OBJECT(gtk_tree_view_get_column(GTK_TREE_VIEW(info->target),info->columns[i])),yon_on_fixed_changed,info); } } @@ -190,6 +195,7 @@ void yon_on_fixed_changed(GtkTreeViewColumn *self, GParamSpec*,struct fixed_info free(info->columns); free(info); } + g_signal_handlers_disconnect_by_func(self,yon_on_fixed_changed,info); return; } }