diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-02 20:44:11 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-02 20:44:11 +0100 |
commit | ef9cc9e0133956f3c7871f9b826ba814d55509ab (patch) | |
tree | 95efb468fba16cad0f2a53e467fd8af1806ac69e | |
parent | f4ccff8a434c832be406b6bde08d94cf26b31fdc (diff) |
Implemented select buttons in the tag dialog.
-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) { |