On 3 July 2011 01:25, Bill C <bi...@netspace.net.au> wrote: > On 03/07/11 07:40, Neil Munro wrote: >> >> Hi, I have used pygtk before so I am familiar with some of the basic >> concepts of gtk, but this is my first attempt with an actual gtk+ C >> application and I have run into a few issues. >> >> I have a notebook that I wish to have a close button on the page tabs >> that when clicked closes the tabs. >> >> I know that it's a bit off a faf to do as you don't know the page >> prior to the event. So you have to dynamically detect which tab is >> being closed by using a tab child widget. >> >> Now I believe I have done this in code, except it always returns -1 >> which then firmly tells me I have done something wrong. >> >> I have attached the code for your reference in the hopes that someone >> shall be able to point out my no doubt simple mistake. >> >> Many thanks in advance, >> Neil Munro >> >> >> _______________________________________________ >> gtk-app-devel-list mailing list >> gtk-app-devel-list@gnome.org >> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list > > I use the switch page signal to keep track of the displayed page, put a > button in the label of the page tab when I create it and delete the page > when it is clicked. > > All works without problems. Not even sure if I need to keep track of the > displayed page... May just be a hangover from development > > If you are doing this, then check your code again > > Rgds Bill > _______________________________________________ > gtk-app-devel-list mailing list > gtk-app-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list >
What if I, or more importantly another user, opt to close a tab that isn't currently selected? The current tab will be closed instead of the button they clicked, or have I misunderstood you? _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list