2008-08-04 Claudio Saavedra <csaavedra@igalia.com>
+ * src/hildon-touch-selector.c: (hildon_touch_selector_class_init),
+ (_hildon_touch_selector_set_model),
+ (hildon_touch_selector_set_model): Move working code to
+ _hildon_touch_selector_set_mode(). Call the class method instead.
+
+ * src/hildon-touch-selector.h: Add (*set_model) to
+ HildonTouchSelectorClass.
+
+ Make hildon_touch_selector_set_model() a virtual method, so that
+ derived classes can extend it and do fancy stuff with the model.
+
+2008-08-04 Claudio Saavedra <csaavedra@igalia.com>
+
* configure.ac: Set back the tarname in AC_INIT to hildon.
2008-08-04 Kimmo Hämäläinen <kimmo.hamalainen@nokia.com>
static gboolean _hildon_touch_selector_center_on_selected_items (gpointer data);
static void
+_hildon_touch_selector_set_model (HildonTouchSelector * selector,
+ gint num_column, GtkTreeModel * model);
+
+static void
hildon_touch_selector_class_init (HildonTouchSelectorClass * class)
{
GObjectClass *gobject_class;
/* GtkContainer */
container_class->remove = hildon_touch_selector_remove;
+ /* HildonTouchSelector */
+ class->set_model = _hildon_touch_selector_set_model;
/* signals */
/**
return current_column->model;
}
-void
-hildon_touch_selector_set_model (HildonTouchSelector * selector,
+static void
+_hildon_touch_selector_set_model (HildonTouchSelector * selector,
gint num_column, GtkTreeModel * model)
{
SelectorColumn *column = NULL;
- g_return_if_fail (HILDON_TOUCH_SELECTOR (selector));
- g_return_if_fail (num_column <
- hildon_touch_selector_get_num_columns (selector));
-
column =
(SelectorColumn *) g_slist_nth_data (selector->priv->columns, num_column);
gtk_tree_view_set_model (column->tree_view, column->model);
}
+void
+hildon_touch_selector_set_model (HildonTouchSelector * selector,
+ gint num_column, GtkTreeModel * model)
+{
+ g_return_if_fail (HILDON_TOUCH_SELECTOR (selector));
+ g_return_if_fail (num_column < hildon_touch_selector_get_num_columns (selector));
+
+ HILDON_TOUCH_SELECTOR_GET_CLASS (selector)->set_model (selector, num_column, model);
+}
/**
* hildon_touch_selector_get_active_text
* @selector: the #HildonTouchSelector