On Sun, Jun 26, 2005 at 04:00:39PM +0300, Nikos Kouremenos wrote: > On 6/26/05, Matthew Palmer <[EMAIL PROTECTED]> wrote: > > I'm trying to produce a menu effect in PyGTK similar to the Mozilla tab bar, > > where a right-click on the tab produces a popup menu to perform various > > actions on the tabs (and/or contents thereof). I can get most of the way > > (sort of) with a button-press-event handler, but there's a couple of things > > I can't manage to effect: (a) A right-click on the untabbed portion of the > > tab list still gives the menu, and (b) I can't work out which tab was > > clicked on. > (a) is how FFOX does it but I don't have any idea on this
Wow, I never realised FFox still brings up the menu when you click next to the tabs rather than on one. I feel better about this one, and I guess I can scrub it from the list of requirements, then. > (b) > pygtk2reference/class-gtknotebook.html#method-gtknotebook--get-current-page > you get 0 1 2 3 so you know which one is shown atm of the button_press_event I noticed that, and it got me really excited until I realised that the current page is going to be independent of where I click on the tab bar. (I've got a little test proggy here which demonstrates the effect). The switch-page and select-page signals don't help either. > > I thought I was on a winner with Notebook.append_page_menu(), but that turns > > out to do things totally different to what I thought (and hoped) it did. > That would rock. I think that there is not a signal you can catch and > override (like populate_menu) rest of list people: "am I wrong?" If > not I would suggest you bugrreport this Whoa... overriding the menu that's produced by Notebook... I *so* have to look into that. Anyone got any suggestions (or example code <hopeful grin>) > Matt I hope this helps It does. If only to know I'm not the only one who can't crack this nut... - Matt
signature.asc
Description: Digital signature
_______________________________________________ pygtk mailing list [email protected] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
