2009-01-14 Claudio Saavedra <csaavedra@igalia.com>
authorClaudio Saavedra <csaavedra@igalia.com>
Wed, 14 Jan 2009 16:50:48 +0000 (16:50 +0000)
committerClaudio Saavedra <csaavedra@igalia.com>
Wed, 14 Jan 2009 16:50:48 +0000 (16:50 +0000)
* src/hildon-touch-selector.c:
(+hildon_touch_selector_unselect_all):
* src/hildon-touch-selector.h: New API to unselect all items in a
column of the touch selector.

ChangeLog
src/hildon-touch-selector.c
src/hildon-touch-selector.h

index 26e892e..27421a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-14  Claudio Saavedra  <csaavedra@igalia.com>
+
+       * src/hildon-touch-selector.c:
+       (+hildon_touch_selector_unselect_all):
+       * src/hildon-touch-selector.h: New API to unselect all items in a
+       column of the touch selector.
+
 2009-01-14  Alejandro G. Castro  <alex@igalia.com>
 
        * src/hildon-pannable-area.c,
index 5535f30..d4165e2 100644 (file)
@@ -1615,6 +1615,30 @@ void hildon_touch_selector_unselect_iter (HildonTouchSelector * selector,
 }
 
 /**
+ * hildon_touch_selector_unselect_all:
+ * @selector: a #HildonTouchSelector
+ * @column: the position of the column to get the selected rows from
+ *
+ * Unselects all the selected items in the column @column.
+ *
+ * Since: 2.2
+ **/
+void
+hildon_touch_selector_unselect_all (HildonTouchSelector * selector,
+                                    gint column)
+{
+  HildonTouchSelectorColumn *current_column = NULL;
+  GtkTreeSelection *selection = NULL;
+
+  g_return_if_fail (HILDON_IS_TOUCH_SELECTOR (selector));
+  g_return_if_fail (column < hildon_touch_selector_get_num_columns (selector));
+
+  current_column = g_slist_nth_data (selector->priv->columns, column);
+  selection = gtk_tree_view_get_selection (current_column->priv->tree_view);
+  gtk_tree_selection_unselect_all (selection);
+}
+
+/**
  * hildon_touch_selector_get_selected_rows:
  * @selector: a #HildonTouchSelector
  * @column: the position of the column to get the selected rows from
index f10228a..44d8d0d 100644 (file)
@@ -175,6 +175,10 @@ hildon_touch_selector_unselect_iter             (HildonTouchSelector *selector,
                                                  gint                 column,
                                                  GtkTreeIter         *iter);
 
+void
+hildon_touch_selector_unselect_all              (HildonTouchSelector * selector,
+                                                 gint                  column);
+
 GList *
 hildon_touch_selector_get_selected_rows         (HildonTouchSelector *selector,
                                                  gint                 column);