From c8d5bf9f09dc271c59c31016efc0c80cb9955561 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Thu, 17 Feb 2011 15:49:17 +0100 Subject: [PATCH] Pubblicata la funzione Solipa::gtkliststore_select_unselect_all. --- src/utils.c | 13 +++++-------- src/utils.h | 4 ++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/utils.c b/src/utils.c index e61623b..3042b77 100644 --- a/src/utils.c +++ b/src/utils.c @@ -38,9 +38,6 @@ static void solipa_fixed_toggled (GtkCellRendererToggle *cell, gchar *path_str, gpointer data); -static void solipa_gtkliststore_select_unselect_all (GtkListStore *store, - gboolean select); - static void solipa_on_btn_select_all_clicked (GtkButton *button, gpointer user_data); static void solipa_on_btn_unselect_all_clicked (GtkButton *button, @@ -291,8 +288,8 @@ solipa_fixed_toggled (GtkCellRendererToggle *cell, gtk_tree_path_free (path); } -static void -solipa_gtkliststore_select_unselect_all (GtkListStore *store, gboolean select) +void +solipa_gtkliststore_select_unselect_all (GtkListStore *store, guint column, gboolean select) { GtkTreeIter iter; @@ -300,7 +297,7 @@ solipa_gtkliststore_select_unselect_all (GtkListStore *store, gboolean select) { do { - gtk_list_store_set (store, &iter, 0, select, -1); + gtk_list_store_set (store, &iter, column, select, -1); } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter)); } } @@ -309,14 +306,14 @@ static void solipa_on_btn_select_all_clicked (GtkButton *button, gpointer user_data) { - solipa_gtkliststore_select_unselect_all ((GtkListStore *)user_data, TRUE); + solipa_gtkliststore_select_unselect_all ((GtkListStore *)user_data, 0, TRUE); } static void solipa_on_btn_unselect_all_clicked (GtkButton *button, gpointer user_data) { - solipa_gtkliststore_select_unselect_all ((GtkListStore *)user_data, FALSE); + solipa_gtkliststore_select_unselect_all ((GtkListStore *)user_data, 0, FALSE); } guint diff --git a/src/utils.h b/src/utils.h index e88e1a8..ed5fab1 100644 --- a/src/utils.h +++ b/src/utils.h @@ -29,6 +29,10 @@ G_BEGIN_DECLS gboolean solipa_file_exists (const gchar *filename); +void solipa_gtkliststore_select_unselect_all (GtkListStore *store, + guint column, + gboolean select); + gboolean solipa_gtktreemodel_to_csv (GtkTreeModel *model, const gchar *filename, gboolean overwrite, const gchar *quote, gboolean quote_all, -- 2.49.0