Ported the crumbs widget to pygtk like I said I would. Changed a few things along the way to make it look better (well, that's subjective, but still).
Thanks you Mark Nicolosi for the scroll-event patch.
I still have a rendering issue as you can see below. Gotta figure out where that's happening.


Comments (9)
Hey Christian, me again
I’ve noticed a small bug. Occasionally a crumb gets stuck in the “hover” state. I think this is because it doesn’t always get the motion-notify events. This happens in both versions. I overrode OnLeaveNotifyEvent() to fix this.
Hrmm, whats your code look like? I had it in the pygtk version, and it still gets sticky sometimes.
def do_leave_notify_event(self, evnt):
self._hover = None
self.queue_draw()
For the C# version (I’m not sure how well this will format):
protected override bool OnLeaveNotifyEvent (EventCrossing evnt)
{
if (evnt.Mode == CrossingMode.Normal) {
this.m_Hover = null;
this.QueueDraw ();
}
return base.OnLeaveNotifyEvent (evnt);
}
You have to make sure evnt.Mode == CrossingMode.Normal… otherwise you’ll get leave events when a crumb is clicked on.
Also you have to add Gdk.EventMask.LeaveNotifyMask to attributes in OnRealized().
Aha! Thanks.
If anyone is interested, I started on a GtkCellRenderer based crumbs system. It uses GtkListStore for crumb items.
better-crumbs.py
Very cool. I was thinking something similar, possibly using a GtkTreeStore to create menus for the arrows.
Is there any possibility of bringing this back up? All I’m getting is a 404.
Updated links in post/comments. I don’t own vwdude.com anymore.
Thank you so much.