Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

Why is always one textview item selected in HILDON_UI_MODE_EDIT?

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


lists at harbaum

Dec 18, 2009, 3:45 AM

Post #1 of 5 (552 views)
Permalink
Why is always one textview item selected in HILDON_UI_MODE_EDIT?

Hi,

i have a simple treeview inside a pannable area. What i want to achieve is basically simple:
I want the user to be able to select one item and that item should stay selected until
the user selects a different item. Initially nothing should be selected.

Exactly this is the standard behaviour in gtk. In hildon, however i need to enable edit
mode to make something stay selected after the user clicked on it. There's a problem
with this: Initially the first item is automatically selected by some magic in this mode.
I even immediately get a "changed" event from the selection once the widget is being
created.

How do i prevent this? Even explicitely unselecting everything using
gtk_tree_selection_unselect_all() doesn't help. The first item stays selected. This is
bad since i was something to happen once the user selects an item. The user might
thus not be aware that he also needs to click onto the already selected first item if
he wants that first item to act.

Anybody else facing this problem? How can i deselect everything in a treeview in
state HILDON_UI_MODE_EDIT?

Regards,
Till


_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


marc.ordinasillopis at collabora

Dec 18, 2009, 4:13 AM

Post #2 of 5 (530 views)
Permalink
Re: Why is always one textview item selected in HILDON_UI_MODE_EDIT? [In reply to]

Hi,

On 18/12/09 12:45, Till Harbaum wrote:
> Hi,
>
> Anybody else facing this problem? How can i deselect everything in a treeview in
> state HILDON_UI_MODE_EDIT?
>
>
I was having the same problem with a GtkIconView and resorted to calling
gtk_icon_view_unselect_all after showing the widget. I still get the
selected events, though.

Regards,
marcoil
> Regards,
> Till
>
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


agarcia at igalia

Dec 18, 2009, 4:19 AM

Post #3 of 5 (535 views)
Permalink
Re: Why is always one textview item selected in HILDON_UI_MODE_EDIT? [In reply to]

On Fri, Dec 18, 2009 at 12:45:47PM +0100, Till Harbaum wrote:

> i have a simple treeview inside a pannable area. What i want to
> achieve is basically simple: I want the user to be able to select
> one item and that item should stay selected until the user selects a
> different item. Initially nothing should be selected.

Doesn't that work? That's what GTK_SELECTION_BROWSE is for.

See hildon-touch-selector-normal-mode-example.c

http://maemo.gitorious.org/hildon/hildon/blobs/master/examples/hildon-touch-selector-normal-mode-example.c

Berto
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


lists at harbaum

Dec 19, 2009, 3:55 AM

Post #4 of 5 (518 views)
Permalink
Re: Why is always one textview item selected in HILDON_UI_MODE_EDIT? [In reply to]

Hi,

Am Freitag 18 Dezember 2009 schrieb Alberto Garcia:
> Doesn't that work? That's what GTK_SELECTION_BROWSE is for.
It's GTK_SELECTION_SINGLE what i want. But single behaves like
browse on Maemo5 in a pannable area.

> See hildon-touch-selector-normal-mode-example.c
That example is not using edit mode but normal mode. Normal mode
doesn't work for me as it immediately de-select everything you select.

Till
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


lists at harbaum

Dec 19, 2009, 3:58 AM

Post #5 of 5 (515 views)
Permalink
Re: Why is always one textview item selected in HILDON_UI_MODE_EDIT? [In reply to]

Hi,

that's pretty exact also my solution. In the first change event i receive
i just deselect everything and don't fo any further processing.

Till

Am Freitag 18 Dezember 2009 schrieb Marc Ordinas i Llopis:
> Hi,
>
> On 18/12/09 12:45, Till Harbaum wrote:
> > Hi,
> >
> > Anybody else facing this problem? How can i deselect everything in a treeview in
> > state HILDON_UI_MODE_EDIT?
> >
> >
> I was having the same problem with a GtkIconView and resorted to calling
> gtk_icon_view_unselect_all after showing the widget. I still get the
> selected events, though.
>
> Regards,
> marcoil
> > Regards,
> > Till
> >
> >
> > _______________________________________________
> > maemo-developers mailing list
> > maemo-developers [at] maemo
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
> >
>
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>

_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.