GNOME Bugzilla – Bug 345992
notebook shows incorrect page
Last modified: 2006-06-30 08:00:22 UTC
Please describe the problem: when i create a notebook, and call append_page(my widget(...)) to append two pages, the notebook's tabs shows first page, but notebook's widget shown is the one of the second page. Steps to reproduce: 1. call twice: m_Notebook.append_page(*manage(new GuiWidgetWave(ch,gfr)), us); 2. look at the gui 3. Actual results: the notebook shows the second widget, but the tab activated is the first. you can switch to tab #1 and back to tab #0 to see first widget. Expected results: the notebook shows the first widget Does this happen every time? yes Other information: there is a workaround: after appending the widgets call: m_Notebook.set_current_page(-1); m_Notebook.set_current_page(0);
Thanks for the report. Could you create a small test case, please? And xactly what version of gtkmm are yoo using?
Created attachment 68189 [details] source code and Makefile for the bug .tar.gz with source code and Makefile showing the bug.
here is the test case... i tried with labels but it worked well. with this subclass of Gtk::DrawingArea shows the bug. i compiled it with gtkmm version 2.4.10 in debian sarge 3.1r0a with X11R6. i attach file gtkmm-2.4.10-bug.tar.gz in order to test it: tar xzf gtkmm-2.4.10-bug.tar.gz cd gtkmm-2.4.10-bug make ./gui_main and then press "open" i see a tab labeled "/" with a drawn line like this "\" press second tab. i see the same. press first tab "/". i see what should be seen at first, a drawn line like this "/" sorry if the size of the test case is too big... thanks [sorry, this might be send with the attachment...]
Thanks. This seems to work fine for me on Ubuntu Dapper (with gtkmm 2.8.8). I always see / on the tab and / on the page, or \ on the tab and \ on the page. Maybe this is a GTK+ bug that was fixed in a later version. GTK+ 2.4 is quite old. If you can not upgrade, you could try to ask the people on gtk-list@gnome.org to backport a fix. Otherwise, you can use your workaround, with a comment in your code saying that it is fixed in a later version.
And please reopen this bug if I have misunderstood.