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

Mailing List Archive: Maemo: Developers

Problems Panning/Clicking with GtkIconView

 

 

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


code177 at gmail

Nov 9, 2009, 4:04 PM

Post #1 of 6 (858 views)
Permalink
Problems Panning/Clicking with GtkIconView

Hi everyone,

I am having a hell of a time trying to get an GtkIconView working correctly
with the pannable area widget. Using hildon.GtkIconView I am able to pan by
using the scrollwheel on my mouse, but if i click anywhere to start panning,
it immediately activates whatever was clicked on. gtk.IconView does pretty
much exactly the same thing. Removing the connect function obviously allows
you to pan freely.

Code is as follows (I've left in various settings etc for completeness'
sake):
------------
pan_area = hildon.PannableArea()
model = gtk.ListStore(str, gtk.gdk.Pixbuf)

for item in xmlf:
thumbnail_data = gtk.gdk.pixbuf_new_from_file(
cache_path_thumbs + item["filename"])
model.append([str(item['name']), thumbnail_data])

grid = hildon.GtkIconView(gtk.HILDON_UI_MODE_NORMAL, model)
grid.set_selection_mode(gtk.SELECTION_SINGLE)
grid.set_pixbuf_column(1)
grid.set_columns(4)
grid.set_item_width(190)
grid.set_spacing(thumbnail_spacing)
grid.connect('selection-changed', self.thumbnailSelect, model, window)
pan_area.add_with_viewport(grid)
------------

Points of note: I'm using the Vmware SDK. I know that has a few bugs so
maybe this is one of them. As mentioned, the scrollwheel does pan the area,
so pannable area is working as intended.

Does anyone have any ideas? this is a pretty critical issue and I don't know
of anyone else who's managed to get this working.

What am I doing wrong?

Thanks!


daniel.wilms at nokia

Nov 10, 2009, 12:15 AM

Post #2 of 6 (810 views)
Permalink
Re: Problems Panning/Clicking with GtkIconView [In reply to]

Hi Jonathan,

which VMWare image and SDK are you using? This was an issue in the Beta
SDK and with the Final SDK it should work.

Cheers Daniel

ext Jonathan Blake wrote:
> Hi everyone,
>
> I am having a hell of a time trying to get an GtkIconView working
> correctly with the pannable area widget. Using hildon.GtkIconView I am
> able to pan by using the scrollwheel on my mouse, but if i click
> anywhere to start panning, it immediately activates whatever was
> clicked on. gtk.IconView does pretty much exactly the same thing.
> Removing the connect function obviously allows you to pan freely.
>
> Code is as follows (I've left in various settings etc for
> completeness' sake):
> ------------
> pan_area = hildon.PannableArea()
> model = gtk.ListStore(str, gtk.gdk.Pixbuf)
>
> for item in xmlf:
> thumbnail_data = gtk.gdk.pixbuf_new_from_file(
> cache_path_thumbs + item["filename"])
> model.append([str(item['name']), thumbnail_data])
>
> grid = hildon.GtkIconView(gtk.HILDON_UI_MODE_NORMAL, model)
> grid.set_selection_mode(gtk.SELECTION_SINGLE)
> grid.set_pixbuf_column(1)
> grid.set_columns(4)
> grid.set_item_width(190)
> grid.set_spacing(thumbnail_spacing)
> grid.connect('selection-changed', self.thumbnailSelect, model, window)
> pan_area.add_with_viewport(grid)
> ------------
>
> Points of note: I'm using the Vmware SDK. I know that has a few bugs
> so maybe this is one of them. As mentioned, the scrollwheel does pan
> the area, so pannable area is working as intended.
>
> Does anyone have any ideas? this is a pretty critical issue and I
> don't know of anyone else who's managed to get this working.
>
> What am I doing wrong?
>
> Thanks!

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


code177 at gmail

Nov 10, 2009, 9:08 AM

Post #3 of 6 (799 views)
Permalink
Re: Problems Panning/Clicking with GtkIconView [In reply to]

Hi Daniel,

I'm using the PreFinal from http://maemovmware.garage.maemo.org/ -
Does that sound like it would be the cause of my problems?

Cheers
Jon



On Tue, Nov 10, 2009 at 12:15 AM, daniel wilms <daniel.wilms [at] nokia> wrote:
>
> Hi Jonathan,
>
> which VMWare image and SDK are you using? This was an issue in the Beta SDK and with the Final SDK it should work.
>
> Cheers Daniel
>
> ext Jonathan Blake wrote:
>>
>> Hi everyone,
>>
>> I am having a hell of a time trying to get an GtkIconView working correctly with the pannable area widget. Using hildon.GtkIconView I am able to pan by using the scrollwheel on my mouse, but if i click anywhere to start panning, it immediately activates whatever was clicked on. gtk.IconView does pretty much exactly the same thing. Removing the connect function obviously allows you to pan freely.
>>
>> Code is as follows (I've left in various settings etc for completeness' sake):
>> ------------
>> pan_area = hildon.PannableArea()
>> model = gtk.ListStore(str, gtk.gdk.Pixbuf)
>>
>> for item in xmlf:
>>    thumbnail_data = gtk.gdk.pixbuf_new_from_file(
>> cache_path_thumbs + item["filename"])
>>    model.append([str(item['name']), thumbnail_data])
>>           grid = hildon.GtkIconView(gtk.HILDON_UI_MODE_NORMAL, model)
>> grid.set_selection_mode(gtk.SELECTION_SINGLE)
>> grid.set_pixbuf_column(1)
>> grid.set_columns(4)
>> grid.set_item_width(190)
>> grid.set_spacing(thumbnail_spacing)
>> grid.connect('selection-changed', self.thumbnailSelect, model, window)
>> pan_area.add_with_viewport(grid)
>> ------------
>>
>> Points of note: I'm using the Vmware SDK. I know that has a few bugs so maybe this is one of them. As mentioned, the scrollwheel does pan the area, so pannable area is working as intended.
>>
>> Does anyone have any ideas? this is a pretty critical issue and I don't know of anyone else who's managed to get this working.
>>
>> What am I doing wrong?
>>
>> Thanks!
>
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


hald at icandy

Nov 10, 2009, 9:35 AM

Post #4 of 6 (805 views)
Permalink
Re: Problems Panning/Clicking with GtkIconView [In reply to]

On Tue, 2009-11-10 at 09:08 -0800, Jonathan Blake wrote:
> Hi Daniel,
>
> I'm using the PreFinal from http://maemovmware.garage.maemo.org/ -
> Does that sound like it would be the cause of my problems?

The PreFinal vmware image contains the Final Maemo SDK. So I guess the
answer is no. Just a guess though...

Conny


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


jerome at mainguet

Nov 12, 2009, 9:42 AM

Post #5 of 6 (777 views)
Permalink
Re: Problems Panning/Clicking with GtkIconView [In reply to]

Hi,


> I am having a hell of a time trying to get an GtkIconView working correctly
> with the pannable area widget. Using hildon.GtkIconView I am able to pan by
> using the scrollwheel on my mouse, but if i click anywhere to start panning,
> it immediately activates whatever was clicked on. gtk.IconView does pretty
> much exactly the same thing. Removing the connect function obviously allows
> you to pan freely.

I've tested on a N900 ande it's exactly the same behavior.

Does anybody know how this could be achieved?

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


code177 at gmail

Nov 13, 2009, 12:30 PM

Post #6 of 6 (750 views)
Permalink
Re: Problems Panning/Clicking with GtkIconView [In reply to]

The solution to this, thanks to zaheerm on talk.maemo.org -
http://talk.maemo.org/showthread.php?t=34369:

----
1st change your event connection to be "item-activated" not "selection-changed"
2nd no need to set the selection mode
3rd don't add the grid with add_with_viewport, instead use add
----

Cheers!
Jon

On Mon, Nov 9, 2009 at 4:04 PM, Jonathan Blake <code177 [at] gmail> wrote:
> Hi everyone,
>
> I am having a hell of a time trying to get an GtkIconView working correctly
> with the pannable area widget. Using hildon.GtkIconView I am able to pan by
> using the scrollwheel on my mouse, but if i click anywhere to start panning,
> it immediately activates whatever was clicked on. gtk.IconView does pretty
> much exactly the same thing. Removing the connect function obviously allows
> you to pan freely.
>
> Code is as follows (I've left in various settings etc for completeness'
> sake):
> ------------
> pan_area = hildon.PannableArea()
> model = gtk.ListStore(str, gtk.gdk.Pixbuf)
>
> for item in xmlf:
>     thumbnail_data = gtk.gdk.pixbuf_new_from_file(
> cache_path_thumbs + item["filename"])
>     model.append([str(item['name']), thumbnail_data])
>
> grid = hildon.GtkIconView(gtk.HILDON_UI_MODE_NORMAL, model)
> grid.set_selection_mode(gtk.SELECTION_SINGLE)
> grid.set_pixbuf_column(1)
> grid.set_columns(4)
> grid.set_item_width(190)
> grid.set_spacing(thumbnail_spacing)
> grid.connect('selection-changed', self.thumbnailSelect, model, window)
> pan_area.add_with_viewport(grid)
> ------------
>
> Points of note: I'm using the Vmware SDK. I know that has a few bugs so
> maybe this is one of them. As mentioned, the scrollwheel does pan the area,
> so pannable area is working as intended.
>
> Does anyone have any ideas? this is a pretty critical issue and I don't know
> of anyone else who's managed to get this working.
>
> What am I doing wrong?
>
> Thanks!
_______________________________________________
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.