* 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>
+ * 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().
<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
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);
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;
}
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);
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);
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
* 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);
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)
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)
{
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);
*
* 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.
*