Active Topics

 


Reply
Thread Tools
Guest | Posts: n/a | Thanked: 0 times | Joined on
#1
I have a grid of thumbnail images in a hildonpannablearea. In order to make the images clickable, I've put them in eventBox()es.

However, it turns out - at least in the SDK - this disables the panning functionality of the pannablearea, because as soon as you click to pan, it activates the event.

If you're confused as to what I mean, think of the image gallery in the n900 promo material.

So. Is this a bug or am I doing something horribly wrong?

Anyone know of a workaround? I need to make these images clickable...

Thanks everyone!
 
yerga's Avatar
Posts: 696 | Thanked: 1,012 times | Joined on Mar 2006 @ Asturies, Spain
#2
A quick suggestion: GtkIconView + HildonPannableArea (I don't know if it will work though).
__________________
Daniel Martín Yerga
maemo.org profile
Twitter
 

The Following User Says Thank You to yerga For This Useful Post:
Guest | Posts: n/a | Thanked: 0 times | Joined on
#3
Thanks Yerga! I will try this and post a conclusion..
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#4
GTK IconView works!

Here's the basic concept incase anyone searches for it:
Code:
model = gtk.ListStore(str, gtk.gdk.Pixbuf) # str is going to be our id field
model.append([item['id'], pixbuf_data]) # add to list..
gallery = gtk.IconView(model) # make it into an icon view
gallery.connect('selection-changed', self.selectThumb, model) # add signal thingy

def selectThumb(self, icon_view, model=None): 
selected = icon_view.get_selected_items()
i = selected[0][0]
self.awesomeFunction(model[i][0]) # passes id to our function (opens new window)
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#5
Actually, I was wrong about this. It doesn't work. Although it now allows you to pan, it still activated whatever was clicked when panning was initiated when you let go.
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#6
I don't know if this helps, the api for HildonPannableArea describes a property velocity-fast-factor as
Minimum velocity that is considered 'fast': children widgets won't receive button presses. Expressed as a fraction of the maximum velocity.

nicolai
 
Posts: 654 | Thanked: 664 times | Joined on Feb 2009 @ Germany
#7
You could use GtkButtons with images inside a HildonPannableArea. That's probably not the style you're looking for, but it would get you started.

Also try asking this question on the developer mailing list. Some of the Hildon developers are there and usually provide good advice on problems like that.
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#8
Finally taken this to the maemo-developers list. Hopefully somebody there will have the answer. If so I'll post it.
 
Guest | Posts: n/a | Thanked: 0 times | Joined on
#9
The solution to this, for anyone searching, is here: http://talk.maemo.org/showthread.php?t=34369, thanks to zaheerm!
 
Reply

Tags
gtk, hildon, images, maemo 5, pannable


 
Forum Jump


All times are GMT. The time now is 08:00.