[maemo-developers] row-activate signal for HildonTouchSelector

From: Piñeiro apinheiro at igalia.com
Date: Thu Jan 14 16:54:35 EET 2010
From: "Neal H. Walfield" <neal at walfield.org>

Sorry for the delay.

> I want to use the HildonTouchSelector widget to enable the user to
> select an item from a list.  I want an action to occur when the user
> "clicks" on an item.  I don't want the user to have to press another
> button.
> The HildonTouchSelector widget provides a "changed" signal.  This is
> emtited when the active item changes.  This appears to be due to the
> user selecting an item (even the preselected one) or an item (perhaps
> the active item?) in the model changing via, e.g., a "row-changed"
> signal.

GtkTreeModel::row-changed can be a cause of the emission of
HildonTouchSelector::changed, but normally the emission of the signal
is due GtkTreeView::row-tapped. This signal is emitted each time the
user tap on one of the GtkTreeView rows.

> I need to distinguish between these two cases.  I only want to act if
> the user actually "clicked" on an item.  That is, I want the behavior
> that the media player implements, e.g., in its "select artist" view.
> Will someone please suggest how to best achieve this?

HildonTouchSelector::changed is more related to
GtkTreeSelection::changed that to row-changed. Similarly to
GtkTreeSelection::changed [1] this is basically a hint, although we
try to be more strict. As far as I know the only "misleading"
behaviour is this one, that the signal could be emitted when the
although the value selected has no really changed.

One option you have is save the previous selection before that, and
then compare the value selected with the user with the previous


[1] http://library.gnome.org/devel/gtk/stable/GtkTreeSelection.html#GtkTreeSelection-changed

API (apinheiro at igalia.com)
More information about the maemo-developers mailing list