Re: GtkNotebook with action on click of special tab
- From: Bernhard Schuster <schuster bernhard googlemail com>
- To: czermak netspace net au
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkNotebook with action on click of special tab
- Date: Wed, 27 Apr 2011 02:02:24 +0200
2011/4/27 Bill Czermak <czermak netspace net au>:
Hi Bernhard
Checked my code and last updated my notebook handling source last November.
ÂProbably written 6 months earlier, and changes were to restructure the way
I was using GTK, rather than change the notebook handling area. ÂSo I might
have forgotten a few implementation problems I solved at the time
I only use the switch-page signal and it displays fine for me Â(GTK2 on
Ubuntu 10.10). ÂDont use any other signals to handle notebook pages.
Set current page works as expected for me. ÂI recall I had a problem in that
if no data was displayed on the page, then the new page was not displayed...
Ânot what I expected, but fixed by setting up some data on the page.
I had this issue too, but that was easy to fix.
Some pesudocode to clearify:
callback on "page-switched":
{
create tab label
create tab child
show label
show child
spawn new tab
set the recently spawn tab to be the new current tab
}
The crux lies in the fact (I think) that this callback gets executed
on "page-switch" which itself changes the current tab
What I need this for? Imageine a plus on the last tab, as soon as you
click that tab head, a new tab with some other content spawns. (Just
in case someone cares)
Regards
Bernhard
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]