EggCrumbs for pygtk

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.

crumbs.py here

I still have a rendering issue as you can see below. Gotta figure out where that's happening.

Comments (9)

  1. 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.

    Wednesday, April 2, 2008 at 12:52 am #
  2. chergert wrote:

    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()

    Wednesday, April 2, 2008 at 6:28 am #
  3. 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().

    Thursday, April 3, 2008 at 12:43 am #
  4. chergert wrote:

    Aha! Thanks.

    Thursday, April 3, 2008 at 6:36 am #
  5. chergert wrote:

    If anyone is interested, I started on a GtkCellRenderer based crumbs system. It uses GtkListStore for crumb items.

    better-crumbs.py

    Thursday, April 3, 2008 at 9:47 am #
  6. Very cool. I was thinking something similar, possibly using a GtkTreeStore to create menus for the arrows.

    Thursday, April 3, 2008 at 10:47 pm #
  7. Sebas310 wrote:

    Is there any possibility of bringing this back up? All I’m getting is a 404.

    Saturday, April 10, 2010 at 12:29 pm #
  8. chergert wrote:

    Updated links in post/comments. I don’t own vwdude.com anymore.

    Saturday, April 10, 2010 at 1:45 pm #
  9. Sebas310 wrote:

    Thank you so much.

    Saturday, April 10, 2010 at 9:13 pm #