2 * This file is a part of hildon
4 * Copyright (C) 2005, 2008 Nokia Corporation.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free
18 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 * SECTION:hildon-touch-picker
23 * @short_description: A picker widget with several columns
25 * HildonTouchPicker is a picker widget, very similar to the #GtkComboBox, but with
26 * several individual pannable columns
36 #include "hildon-pannable-area.h"
37 #include "hildon-touch-picker.h"
39 #define HILDON_TOUCH_PICKER_GET_PRIVATE(obj)\
40 (G_TYPE_INSTANCE_GET_PRIVATE ((obj), HILDON_TYPE_TOUCH_PICKER, HildonTouchPickerPrivate))
42 G_DEFINE_TYPE (HildonTouchPicker, hildon_touch_picker, GTK_TYPE_HBOX)
44 #define CENTER_ON_SELECTED_ITEM_DELAY 50
47 * Struct to maintain the data of each column. The columns are the elements
48 * of the widget that belongs properly to the selection behaviour. As
49 * the picker is a hbox, you can add more widgets, like buttons etc.
50 * between the columns, but this doesn't belongs to the selection
53 typedef struct _PickerColumn PickerColumn;
56 HildonTouchPicker *parent; /* the picker that contains this column */
58 GtkTreeView *tree_view;
60 GtkWidget *panarea; /* the pannable widget */
63 struct _HildonTouchPickerPrivate
65 GSList *columns; /* the selection columns */
67 HildonTouchPickerPrintFunc print_func;
76 static gint hildon_touch_picker_signals[LAST_SIGNAL] = { 0 };
79 static void hildon_touch_picker_map (GtkWidget * widget);
82 static void hildon_touch_picker_remove (GtkContainer * container,
84 /* private functions */
85 static void _selection_changed_cb (GtkTreeSelection * selection,
87 static gchar *_default_print_func (HildonTouchPicker * picker);
89 static PickerColumn *_create_new_column (HildonTouchPicker * picker,
91 GtkCellRenderer * renderer,
93 static gboolean _hildon_touch_picker_center_on_selected_items (gpointer data);
96 hildon_touch_picker_class_init (HildonTouchPickerClass * class)
98 GObjectClass *gobject_class;
99 GtkObjectClass *object_class;
100 GtkWidgetClass *widget_class;
101 GtkContainerClass *container_class;
103 gobject_class = (GObjectClass *) class;
104 object_class = (GtkObjectClass *) class;
105 widget_class = (GtkWidgetClass *) class;
106 container_class = (GtkContainerClass *) class;
111 widget_class->map = hildon_touch_picker_map;
114 container_class->remove = hildon_touch_picker_remove;
119 * HildonTouchPicker::changed:
120 * @widget: the object which received the signal
122 * The changed signal is emitted when the active
123 * item is changed. The can be due to the user selecting
124 * a different item from the list, or due to a
125 * call to hildon_touch_picker_set_active_iter() on
129 hildon_touch_picker_signals[CHANGED] =
130 g_signal_new ("changed",
131 G_OBJECT_CLASS_TYPE (class),
133 G_STRUCT_OFFSET (HildonTouchPickerClass, changed),
135 gtk_marshal_NONE__INT, G_TYPE_NONE, 1, G_TYPE_INT);
138 /* style properties */
139 g_type_class_add_private (object_class, sizeof (HildonTouchPickerPrivate));
144 hildon_touch_picker_init (HildonTouchPicker * picker)
146 picker->priv = HILDON_TOUCH_PICKER_GET_PRIVATE (picker);
148 GTK_WIDGET_SET_FLAGS (GTK_WIDGET (picker), GTK_NO_WINDOW);
149 gtk_widget_set_redraw_on_allocate (GTK_WIDGET (picker), FALSE);
151 picker->priv->columns = NULL;
153 picker->priv->print_func = NULL;
155 /* FIXME: this is the correct height? A fixed height is the correct
157 gtk_widget_set_size_request (GTK_WIDGET (picker), -1, 320);
161 hildon_touch_picker_map (GtkWidget * widget)
163 GTK_WIDGET_CLASS (hildon_touch_picker_parent_class)->map (widget);
165 g_timeout_add (CENTER_ON_SELECTED_ITEM_DELAY,
166 _hildon_touch_picker_center_on_selected_items, widget);
169 /*------------------------------ GtkContainer ------------------------------ */
172 * Required in order to free the column at the columns list
175 hildon_touch_picker_remove (GtkContainer * container, GtkWidget * widget)
177 HildonTouchPicker *picker = NULL;
180 PickerColumn *current_column = NULL;
181 gint num_columns = 0;
183 g_return_if_fail (HILDON_IS_TOUCH_PICKER (container));
185 picker = HILDON_TOUCH_PICKER (container);
186 num_columns = hildon_touch_picker_get_num_columns (picker);
188 /* Check if the widget is inside a column and remove
190 iter = picker->priv->columns;
193 current_column = (PickerColumn *) iter->data;
194 if (widget == current_column->panarea) {
195 current_column = g_slist_nth_data (picker->priv->columns, position);
197 picker->priv->columns = g_slist_remove (picker->priv->columns,
199 g_free (current_column);
205 iter = g_slist_next (iter);
207 if (position >= num_columns) {
208 g_debug ("This widget was not inside the picker column");
211 GTK_CONTAINER_CLASS (hildon_touch_picker_parent_class)->remove (container, widget);
214 /* ------------------------------ PRIVATE METHODS ---------------------------- */
216 * default_print_func:
217 * @picker: a #HildonTouchPicker
219 * Default print function
221 * Returns: a new string that represent the selected items
224 _default_print_func (HildonTouchPicker * picker)
226 gchar *result = NULL;
228 gint num_columns = 0;
230 GtkTreeModel *model = NULL;
231 gchar *current_string = NULL;
233 HildonTouchPickerSelectionMode mode;
235 GtkTreePath *current_path = NULL;
236 GList *selected_rows = NULL;
237 gint initial_value = 0;
239 num_columns = hildon_touch_picker_get_num_columns (picker);
241 mode = hildon_touch_picker_get_column_selection_mode (picker);
243 if ((mode == HILDON_TOUCH_PICKER_SELECTION_MODE_MULTIPLE)
244 && (num_columns > 0)) {
245 /* In this case we get the first column first */
246 selected_rows = hildon_touch_picker_get_selected_rows (picker, 0);
247 model = hildon_touch_picker_get_model (picker, 0);
249 result = g_strdup_printf ("(");
251 for (item = selected_rows; item; item = g_list_next (item)) {
252 current_path = item->data;
253 gtk_tree_model_get_iter (model, &iter, current_path);
255 gtk_tree_model_get (model, &iter, 0, ¤t_string, -1);
257 if (i < g_list_length (selected_rows) - 1) {
258 aux = g_strconcat (result, current_string, ",", NULL);
262 aux = g_strconcat (result, current_string, NULL);
269 aux = g_strconcat (result, ")", NULL);
273 g_list_foreach (selected_rows, (GFunc) (gtk_tree_path_free), NULL);
274 g_list_free (selected_rows);
280 for (i = initial_value; i < num_columns; i++) {
281 model = hildon_touch_picker_get_model (picker, i);
282 if (hildon_touch_picker_get_active_iter (picker, i, &iter)) {
284 gtk_tree_model_get (model, &iter, 0, ¤t_string, -1);
286 aux = g_strconcat (result, ":", current_string, NULL);
290 result = g_strdup_printf ("%s", current_string);
299 _selection_changed_cb (GtkTreeSelection * selection, gpointer user_data)
301 HildonTouchPicker *picker = NULL;
302 PickerColumn *column = NULL;
303 gint num_column = -1;
305 column = (PickerColumn *) user_data;
306 g_return_if_fail (HILDON_IS_TOUCH_PICKER (column->parent));
308 picker = column->parent;
310 num_column = g_slist_index (picker->priv->columns, column);
312 g_signal_emit (picker, hildon_touch_picker_signals[CHANGED], 0, num_column);
316 static PickerColumn *
317 _create_new_column (HildonTouchPicker * picker,
318 GtkTreeModel * model,
319 GtkCellRenderer * renderer, va_list args)
321 PickerColumn *new_column = NULL;
322 GtkTreeViewColumn *tree_column = NULL;
324 GtkTreeView *tv = NULL;
325 GtkWidget *panarea = NULL;
326 GtkTreeSelection *selection = NULL;
331 tree_column = gtk_tree_view_column_new ();
332 gtk_tree_view_column_pack_start (tree_column, renderer, TRUE);
334 attribute = va_arg (args, gchar *);
335 while (attribute != NULL) {
336 value = va_arg (args, gint);
337 gtk_tree_view_column_add_attribute (tree_column, renderer, attribute,
339 attribute = va_arg (args, gchar *);
342 tv = g_object_new (GTK_TYPE_TREE_VIEW, "model", model, "name", "fremantle-widget", /* FIXME: is this always this name? */
343 "hildon-ui-mode", HILDON_UI_MODE_EDIT,
344 "rules-hint", TRUE, NULL);
346 gtk_tree_view_append_column (GTK_TREE_VIEW (tv), tree_column);
348 new_column = (PickerColumn *) g_malloc0 (sizeof (PickerColumn));
349 new_column->parent = picker;
351 panarea = hildon_pannable_area_new ();
353 g_value_init (&val, G_TYPE_INT);
354 g_value_set_int (&val, HILDON_PANNABLE_AREA_INDICATOR_MODE_HIDE);
355 g_object_set_property (G_OBJECT (panarea), "vindicator-mode", &val);
357 g_value_unset (&val);
358 g_value_init (&val, G_TYPE_BOOLEAN);
359 g_value_set_boolean (&val, FALSE);
360 g_object_set_property (G_OBJECT (panarea), "initial-hint", &val);
362 gtk_container_add (GTK_CONTAINER (panarea), GTK_WIDGET (tv));
364 new_column->model = model;
365 new_column->tree_view = tv;
366 new_column->panarea = panarea;
368 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv));
369 gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
371 /* select the first item */
372 if (gtk_tree_model_get_iter_first (model, &iter)) {
373 gtk_tree_selection_select_iter (selection, &iter);
376 gtk_widget_grab_focus (GTK_WIDGET (tv));
378 /* connect to the changed signal connection */
379 g_signal_connect (G_OBJECT (selection), "changed",
380 G_CALLBACK (_selection_changed_cb), new_column);
385 /* ------------------------------ PUBLIC METHODS ---------------------------- */
388 * hildon_touch_picker_new:
391 * Creates a new empty #HildonTouchPicker
393 * Returns: a new #HildonTouchPicker
396 hildon_touch_picker_new ()
398 return g_object_new (HILDON_TYPE_TOUCH_PICKER, NULL);
402 * hildon_touch_picker_append_text_column
403 * @picker: the #HildonTouchPicker widget
404 * @model: the #GtkTreeModel with the data of the column
406 * This functions adds a new column to the widget, with the data on
407 * the model. Only the widgets added in this way should used on
408 * the selection logic, ie: the print function, the "changed" signal etc.
410 * There are a prerequisite on this model: this append
411 * consideres that the text data is in the first column of the model
413 * Basically it adds a tree view to the widget, using the model and
416 * Returns: TRUE if a new column were added, FALSE otherside
419 hildon_touch_picker_append_column (HildonTouchPicker * picker,
420 GtkTreeModel * model,
421 GtkCellRenderer * cell_renderer, ...)
424 PickerColumn *new_column = NULL;
426 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), FALSE);
427 g_return_val_if_fail (GTK_IS_TREE_MODEL (model), FALSE);
431 va_start (args, cell_renderer);
432 new_column = _create_new_column (picker, model, cell_renderer, args);
435 picker->priv->columns = g_slist_append (picker->priv->columns,
437 gtk_box_pack_start (GTK_BOX (picker), new_column->panarea, TRUE, TRUE, 6);
439 gtk_widget_show_all (new_column->panarea);
448 * hildon_touch_picker_append_text_column
449 * @picker: the #HildonTouchPicker widget
450 * @model: the #GtkTreeModel with the data of the column
452 * Equivalent to hildon_touch_picker_append_column, but using a
453 * default text cell renderer. This is the most common use of the
456 * Returns: TRUE if a new column were added, FALSE otherside
459 hildon_touch_picker_append_text_column (HildonTouchPicker * picker,
460 GtkTreeModel * model)
462 GtkCellRenderer *renderer = NULL;
465 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), FALSE);
466 g_return_val_if_fail (GTK_IS_TREE_MODEL (model), FALSE);
469 renderer = gtk_cell_renderer_text_new ();
471 g_value_init (&val, G_TYPE_FLOAT);
472 g_value_set_float (&val, 0.5);
473 /* FIXME: center the text, this should be configurable */
474 g_object_set_property (G_OBJECT (renderer), "xalign", &val);
476 return hildon_touch_picker_append_column (picker, model, renderer,
484 * hildon_touch_picker_remove_column
485 * @picker: a #HildonTouchPicker
486 * @position: the column position to remove, counting from 0 to (total column number - 1)
489 * Returns: TRUE is the column was removed, FALSE otherwise
492 hildon_touch_picker_remove_column (HildonTouchPicker * picker, gint position)
494 PickerColumn *current_column = NULL;
496 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), FALSE);
497 g_return_val_if_fail (position <
498 hildon_touch_picker_get_num_columns (picker), FALSE);
500 current_column = g_slist_nth_data (picker->priv->columns, position);
502 gtk_container_remove (GTK_CONTAINER (picker), current_column->panarea);
508 hildon_touch_picker_set_column_attributes (HildonTouchPicker * picker,
510 GtkCellRenderer * cell_renderer,
514 GtkTreeViewColumn *tree_column = NULL;
515 PickerColumn *current_column = NULL;
516 gchar *attribute = NULL;
519 g_return_if_fail (HILDON_IS_TOUCH_PICKER (picker));
520 g_return_if_fail (num_column <
521 hildon_touch_picker_get_num_columns (picker));
523 current_column = g_slist_nth_data (picker->priv->columns, num_column);
525 tree_column = gtk_tree_view_get_column (current_column->tree_view, 0);
526 gtk_tree_view_remove_column (current_column->tree_view, tree_column);
528 tree_column = gtk_tree_view_column_new ();
529 gtk_tree_view_column_pack_start (tree_column, cell_renderer, TRUE);
531 va_start (args, cell_renderer);
532 attribute = va_arg (args, gchar *);
534 gtk_tree_view_column_clear_attributes (tree_column, cell_renderer);
536 while (attribute != NULL) {
537 value = va_arg (args, gint);
538 gtk_tree_view_column_add_attribute (tree_column, cell_renderer,
540 attribute = va_arg (args, gchar *);
545 gtk_tree_view_append_column (current_column->tree_view, tree_column);
549 hildon_touch_picker_insert_column (HildonTouchPicker * picker, gint position)
551 g_warning ("Un-implemented!");
557 hildon_touch_picker_get_num_columns (HildonTouchPicker * picker)
559 return g_slist_length (picker->priv->columns);
562 HildonTouchPickerSelectionMode
563 hildon_touch_picker_get_column_selection_mode (HildonTouchPicker * picker)
565 HildonTouchPickerSelectionMode result =
566 HILDON_TOUCH_PICKER_SELECTION_MODE_SINGLE;
567 GtkSelectionMode treeview_mode = GTK_SELECTION_SINGLE;
568 PickerColumn *column = NULL;
569 GtkTreeSelection *selection = NULL;
571 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), result);
572 g_return_val_if_fail (hildon_touch_picker_get_num_columns (picker) > 0,
575 column = (PickerColumn *) picker->priv->columns->data;
577 selection = gtk_tree_view_get_selection (column->tree_view);
578 treeview_mode = gtk_tree_selection_get_mode (selection);
581 if (treeview_mode == GTK_SELECTION_MULTIPLE) {
582 result = HILDON_TOUCH_PICKER_SELECTION_MODE_MULTIPLE;
584 result = HILDON_TOUCH_PICKER_SELECTION_MODE_SINGLE;
591 hildon_touch_picker_set_column_selection_mode (HildonTouchPicker * picker,
592 HildonTouchPickerSelectionMode
595 GtkTreeView *tv = NULL;
596 PickerColumn *column = NULL;
597 GtkTreeSelection *selection = NULL;
598 GtkSelectionMode treeview_mode;
601 g_return_if_fail (HILDON_IS_TOUCH_PICKER (picker));
602 g_return_if_fail (hildon_touch_picker_get_num_columns (picker) > 0);
604 column = (PickerColumn *) (g_slist_nth (picker->priv->columns, 0))->data;
605 tv = column->tree_view;
609 case HILDON_TOUCH_PICKER_SELECTION_MODE_SINGLE:
610 treeview_mode = GTK_SELECTION_SINGLE;
612 case HILDON_TOUCH_PICKER_SELECTION_MODE_MULTIPLE:
613 treeview_mode = GTK_SELECTION_MULTIPLE;
617 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv));
618 gtk_tree_selection_set_mode (selection, treeview_mode);
620 selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tv));
621 gtk_tree_model_get_iter_first (column->model, &iter);
622 gtk_tree_selection_unselect_all (selection);
623 gtk_tree_selection_select_iter (selection, &iter);
629 hildon_touch_picker_set_print_func (HildonTouchPicker * picker,
630 HildonTouchPickerPrintFunc func)
632 g_return_if_fail (HILDON_IS_TOUCH_PICKER (picker));
634 picker->priv->print_func = func;
637 HildonTouchPickerPrintFunc
638 hildon_touch_picker_get_print_func (HildonTouchPicker * picker)
640 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), NULL);
642 return picker->priv->print_func;
646 * hildon_touch_picker_get_active_iter:
647 * @picker: a #HildonTouchPicker
648 * @column: the column number we want to get the element
649 * @iter: #GtkTreeIter currently selected
651 * Sets iter to the currently selected node on the nth-column, if selection is set to
652 * HILDON_TOUCH_PICKER_SINGLE. iter may be NULL if you just want to test if selection
653 * has any selected nodes.
655 * This function will not work if you use selection is HILDON_TOUCH_PICKER_MULTIPLE.
657 * See gtk_tree_selection_get_selected for more information
659 * Returns: TRUE if was posible to get the iter, FALSE otherwise
662 hildon_touch_picker_get_active_iter (HildonTouchPicker * picker,
663 gint column, GtkTreeIter * iter)
665 GtkTreeSelection *selection = NULL;
666 PickerColumn *current_column = NULL;
668 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), FALSE);
669 g_return_val_if_fail (hildon_touch_picker_get_column_selection_mode (picker)
670 == HILDON_TOUCH_PICKER_SELECTION_MODE_SINGLE, FALSE);
671 g_return_val_if_fail (column < hildon_touch_picker_get_num_columns (picker),
674 current_column = g_slist_nth_data (picker->priv->columns, column);
677 gtk_tree_view_get_selection (GTK_TREE_VIEW (current_column->tree_view));
679 return gtk_tree_selection_get_selected (selection, NULL, iter);
683 * hildon_touch_picker_set_active_iter
684 * @picker: a #HildonTouchPicker
685 * @column: the column to selects
686 * @iter: the #GtkTreeIter to be selected
688 * Sets the current iter
692 hildon_touch_picker_set_active_iter (HildonTouchPicker * picker,
693 gint column, GtkTreeIter * iter,
699 PickerColumn *current_column = NULL;
700 GtkTreeSelection *selection = NULL;
703 g_return_if_fail (HILDON_IS_TOUCH_PICKER (picker));
704 g_return_if_fail (column < hildon_touch_picker_get_num_columns (picker));
706 current_column = g_slist_nth_data (picker->priv->columns, column);
708 selection = gtk_tree_view_get_selection (current_column->tree_view);
710 gtk_tree_selection_select_iter (selection, iter);
713 model = gtk_tree_view_get_model (current_column->tree_view);
714 path = gtk_tree_model_get_path (model, iter);
715 gtk_tree_view_get_background_area (current_column->tree_view,
717 gtk_tree_view_convert_bin_window_to_tree_coords (current_column->tree_view,
718 0, rect.y, NULL, &y);
719 hildon_pannable_area_scroll_to (HILDON_PANNABLE_AREA (current_column->panarea),
721 gtk_tree_path_free (path);
726 * hildon_touch_picker_get_selected_rows:
727 * @picker: a #HildonTouchPicker
730 * Creates a list of path of all selected rows at a concrete column. Additionally,
731 * if you are planning on modifying the model after calling this function, you may
732 * want to convert the returned list into a list of GtkTreeRowReferences. To do this,
733 * you can use gtk_tree_row_reference_new().
735 * See #GtkTreeSelection:gtk_tree_selection_get_selected_rows for more information
737 * Returns: A new GList containing a GtkTreePath for each selected row in the concrete column
741 hildon_touch_picker_get_selected_rows (HildonTouchPicker * picker,
744 GList *result = NULL;
745 PickerColumn *current_column = NULL;
746 GtkTreeSelection *selection = NULL;
748 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), NULL);
749 g_return_val_if_fail (column < hildon_touch_picker_get_num_columns (picker),
752 current_column = g_slist_nth_data (picker->priv->columns, column);
753 selection = gtk_tree_view_get_selection (current_column->tree_view);
755 result = gtk_tree_selection_get_selected_rows (selection, NULL);
762 hildon_touch_picker_get_model (HildonTouchPicker * picker, gint column)
764 PickerColumn *current_column = NULL;
766 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), NULL);
767 g_return_val_if_fail (column < hildon_touch_picker_get_num_columns (picker),
770 current_column = g_slist_nth_data (picker->priv->columns, column);
772 return current_column->model;
776 hildon_touch_picker_set_model (HildonTouchPicker * picker,
777 gint num_column, GtkTreeModel * model)
779 PickerColumn *column = NULL;
781 g_return_if_fail (HILDON_TOUCH_PICKER (picker));
782 g_return_if_fail (num_column <
783 hildon_touch_picker_get_num_columns (picker));
786 (PickerColumn *) g_slist_nth_data (picker->priv->columns, num_column);
788 column->model = model;
789 gtk_tree_view_set_model (column->tree_view, column->model);
793 * hildon_touch_picker_get_active_text
794 * @picker: the #HildonTouchPicker
796 * It return a new gchar that represents the current element(s) selected,
797 * using the current print_func.
799 * Returns: a new allocated gchar*
802 hildon_touch_picker_get_current_text (HildonTouchPicker * picker)
804 gchar *result = NULL;
805 g_return_val_if_fail (HILDON_IS_TOUCH_PICKER (picker), NULL);
807 if (picker->priv->print_func) {
808 result = (*picker->priv->print_func) (picker);
810 result = _default_print_func (picker);
817 _hildon_touch_picker_center_on_selected_items (gpointer data)
819 HildonTouchPicker *picker = NULL;
820 PickerColumn *column = NULL;
821 GSList *iter_column = NULL;
827 HildonTouchPickerSelectionMode selection_mode;
829 /* ensure to center on the initial values */
830 picker = HILDON_TOUCH_PICKER (data);
832 selection_mode = hildon_touch_picker_get_column_selection_mode (picker);
834 iter_column = picker->priv->columns;
836 while (iter_column) {
837 column = (PickerColumn *) iter_column->data;
840 && (selection_mode == HILDON_TOUCH_PICKER_SELECTION_MODE_MULTIPLE)) {
843 if (hildon_touch_picker_get_active_iter (picker, i, &iter)) {
844 path = gtk_tree_model_get_path (column->model, &iter);
845 gtk_tree_view_get_background_area (GTK_TREE_VIEW
846 (column->tree_view), path, NULL,
849 gtk_tree_view_convert_bin_window_to_tree_coords (GTK_TREE_VIEW
850 (column->tree_view), 0,
853 hildon_pannable_area_scroll_to (HILDON_PANNABLE_AREA
854 (column->panarea), -1, y);
856 gtk_tree_path_free (path);
858 iter_column = iter_column->next;