Make hildon_touch_selector_column_get/set_column public
authorClaudio Saavedra <csaavedra@igalia.com>
Tue, 9 Jun 2009 08:47:03 +0000 (11:47 +0300)
committerClaudio Saavedra <csaavedra@igalia.com>
Tue, 9 Jun 2009 12:19:47 +0000 (15:19 +0300)
* doc/hildon-sections.txt: Add the new public methods below.

* examples/hildon-picker-button-multicolumn-example.c:
(create_touch_selector):
* examples/hildon-touch-selector-example.c: (create_selector):
* examples/hildon-touch-selector-multi-cells-example.c:
(create_selector):
Use hildon_touch_selector_column_set_text_column()

* hildon/hildon-touch-selector-column.h:
* hildon/hildon-touch-selector.c:
(hildon_touch_selector_column_set_text_column),
(hildon_touch_selector_column_get_text_column):
Make hildon_touch_selector_column_set/get_column() public, use
them in the inline example, document them, and reference to them
in the docs.

ChangeLog
doc/hildon-sections.txt
examples/hildon-picker-button-multicolumn-example.c
examples/hildon-touch-selector-example.c
examples/hildon-touch-selector-multi-cells-example.c
hildon/hildon-touch-selector-column.h
hildon/hildon-touch-selector.c

index 51c07f1..88b8bd1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,24 @@
 2009-06-09  Claudio Saavedra  <csaavedra@igalia.com>
 
+       * doc/hildon-sections.txt: Add the new public methods below.
+
+       * examples/hildon-picker-button-multicolumn-example.c:
+       (create_touch_selector):
+       * examples/hildon-touch-selector-example.c: (create_selector):
+       * examples/hildon-touch-selector-multi-cells-example.c:
+       (create_selector):
+       Use hildon_touch_selector_column_set_text_column()
+
+       * hildon/hildon-touch-selector-column.h:
+       * hildon/hildon-touch-selector.c:
+       (hildon_touch_selector_column_set_text_column),
+       (hildon_touch_selector_column_get_text_column):
+       Make hildon_touch_selector_column_set/get_column() public, use
+       them in the inline example, document them, and reference to them
+       in the docs.
+
+2009-06-09  Claudio Saavedra  <csaavedra@igalia.com>
+
        * hildon/hildon-time-selector.c: Fix the docs for
        hildon_time_selector_new_step().
 
index 6c311b1..4d885c5 100644 (file)
@@ -262,6 +262,8 @@ HildonCaptionClass
 <FILE>hildon-touch-selector-column</FILE>
 <TITLE>HildonTouchSelectorColumn</TITLE>
 HildonTouchSelectorColumn
+hildon_touch_selector_column_set_text_column
+hildon_touch_selector_column_get_text_column
 <SUBSECTION Standard>
 HILDON_TOUCH_SELECTOR_COLUMN
 HILDON_IS_TOUCH_SELECTOR_COLUMN
index 5c63b16..fdf9ace 100644 (file)
@@ -44,7 +44,7 @@ create_touch_selector (void)
 
   column = hildon_touch_selector_append_text_column (HILDON_TOUCH_SELECTOR (selector),
                                                      GTK_TREE_MODEL (model), TRUE);
-  g_object_set (G_OBJECT(column), "text-column", 0, NULL);
+  hildon_touch_selector_column_set_text_column (column, 0);
 
   model = gtk_list_store_new (1, G_TYPE_STRING);
 
@@ -59,7 +59,7 @@ create_touch_selector (void)
 
   column = hildon_touch_selector_append_text_column (HILDON_TOUCH_SELECTOR (selector),
                                                      GTK_TREE_MODEL (model), TRUE);
-  g_object_set (G_OBJECT(column), "text-column", 0, NULL);
+  hildon_touch_selector_column_set_text_column (column, 0);
   
   return selector;
 }
index 8d80707..695688b 100644 (file)
@@ -76,7 +76,7 @@ create_selector ()
   column = hildon_touch_selector_append_column (HILDON_TOUCH_SELECTOR (selector),
                                                 GTK_TREE_MODEL (store_icons),
                                                 renderer, "stock-id", 0, NULL);
-  g_object_set (G_OBJECT (column), "text-column", 0, NULL);
+  hildon_touch_selector_column_set_text_column (column, 0);
 
   hildon_touch_selector_set_column_selection_mode (HILDON_TOUCH_SELECTOR (selector),
                                                    HILDON_TOUCH_SELECTOR_SELECTION_MODE_MULTIPLE);
index ddc74ca..b66a111 100644 (file)
@@ -77,7 +77,7 @@ create_selector ()
   column = hildon_touch_selector_append_column (HILDON_TOUCH_SELECTOR (selector),
                                                 GTK_TREE_MODEL (store_icons),
                                                 NULL, NULL);
-  g_object_set (G_OBJECT(column), "text-column", 1, NULL);
+  hildon_touch_selector_column_set_text_column (column, 1);
 
   renderer = gtk_cell_renderer_pixbuf_new ();
   gtk_cell_renderer_set_fixed_size (renderer, 75, 75);
index 0ee68d5..24a5100 100644 (file)
@@ -68,6 +68,12 @@ struct                                          _HildonTouchSelectorColumnClass
 GType
 hildon_touch_selector_column_get_type           (void) G_GNUC_CONST;
 
+void
+hildon_touch_selector_column_set_text_column (HildonTouchSelectorColumn *column,
+                                              gint text_column);
+gint
+hildon_touch_selector_column_get_text_column (HildonTouchSelectorColumn *column);
+
 G_END_DECLS
 
 
index e769292..fd38265 100644 (file)
  *                                                 GTK_TREE_MODEL (store_icons),
  *                                                 renderer, "stock-id", 0, NULL);
  * <!-- -->
- *   g_object_set (G_OBJECT (column), "text-column", 0, NULL);
+ *   hildon_touch_selector_column_set_text_column (column, 0);
  * <!-- -->
  *   hildon_touch_selector_set_column_selection_mode (HILDON_TOUCH_SELECTOR (selector),
  *                                                    HILDON_TOUCH_SELECTOR_SELECTION_MODE_MULTIPLE);
@@ -787,12 +787,6 @@ static void
 hildon_touch_selector_column_set_property  (GObject *object, guint property_id,
                                             const GValue *value, GParamSpec *pspec);
 
-static void
-hildon_touch_selector_column_set_text_column (HildonTouchSelectorColumn *column,
-                                              gint text_column);
-static gint
-hildon_touch_selector_column_get_text_column (HildonTouchSelectorColumn *column);
-
 
 static void
 hildon_touch_selector_column_class_init (HildonTouchSelectorColumnClass *klass)
@@ -826,7 +820,19 @@ hildon_touch_selector_column_init (HildonTouchSelectorColumn *column)
   column->priv->text_column = -1;
 }
 
-static void
+/**
+ * hildon_touch_selector_column_set_text_column:
+ * @column: A #HildonTouchSelectorColumn
+ * @text_column: the index of a model column in the model for @column.
+ *
+ * Sets the model column to be displayed in @column. @text_column must point to a
+ * column in the model used with type %G_TYPE_STRING. Initially, this property
+ * is unset. You should set it before using the #HildonTouchSelector that uses
+ * @column.
+ *
+ * Since: 2.2
+ **/
+void
 hildon_touch_selector_column_set_text_column (HildonTouchSelectorColumn *column,
                                               gint text_column)
 {
@@ -838,7 +844,17 @@ hildon_touch_selector_column_set_text_column (HildonTouchSelectorColumn *column,
   g_object_notify (G_OBJECT (column), "text-column");
 }
 
-static gint
+/**
+ * hildon_touch_selector_column_get_text_column:
+ * @column: a #HildonTouchSelectorColumn
+ *
+ * Gets the model column set as the text source for @column.
+ *
+ * Returns: the index of the text column for @column, or -1 if unset.
+ *
+ * Since: 2.2
+ **/
+gint
 hildon_touch_selector_column_get_text_column (HildonTouchSelectorColumn *column)
 {
   g_return_val_if_fail (HILDON_IS_TOUCH_SELECTOR_COLUMN (column), -1);
@@ -1175,7 +1191,8 @@ hildon_touch_selector_insert_text (HildonTouchSelector * selector,
  *
  * Initially, the returned #HildonTouchSelectorColumn will have its
  * #HildonTouchSelectorColumn:text-column property unset. You should set
- * it to a column in @model with type %G_TYPE_STRING.
+ * it to a column in @model with type %G_TYPE_STRING. See
+ * hildon_touch_selector_column_set_text_column().
  *
  * Returns: the new column added added, %NULL otherwise.
  *