diff options
-rw-r--r-- | window_tag.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/window_tag.c b/window_tag.c index ad3dfba..d714f8a 100644 --- a/window_tag.c +++ b/window_tag.c @@ -186,10 +186,29 @@ void on_tags_rembtn_clicked(GtkButton *button, gpointer user_data) { gtk_widget_destroy(dialog); } +static void tags_select(gpointer user_data, gboolean select) { + struct tagdialog_data_t *data; + GtkTreeModel *model; + GtkTreeIter iter; + + data = user_data; + + model = gtk_tree_view_get_model(GTK_TREE_VIEW(data->tagview)); + + if(!gtk_tree_model_get_iter_first(model, &iter)) + return; + + do { + gtk_list_store_set(GTK_LIST_STORE(model), &iter, 0, select, -1); + } while(gtk_tree_model_iter_next(model, &iter)); +} + void on_tags_selallbtn_clicked(GtkButton *button, gpointer user_data) { + tags_select(user_data, TRUE); } void on_tags_selnonebtn_clicked(GtkButton *button, gpointer user_data) { + tags_select(user_data, FALSE); } void on_tagsdialog_destroy(GtkObject *object, gpointer user_data) { |