|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54236 GtkNotebook does not always remove pages
Submitted: 2011-03-12 13:27 UTC Modified: 2011-03-12 15:09 UTC
From: ptlis at ptlis dot net Assigned:
Status: Not a bug Package: PHP-GTK related
PHP Version: 5.3.5 OS: Ubuntu 10.4 32bit
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ptlis at ptlis dot net
New email:
PHP Version: OS:


 [2011-03-12 13:27 UTC] ptlis at ptlis dot net
I can't find any documentation regarding how gtk+ handles notebook page removal; if the page indexes are meant to be re-ordered on page removal this bug is bogus.

Pages are not always removed if you call GtkNotebook::remove_page(), and whether they are removed or not seems dependant upon the order in which the pages were appended / removed, see the below example. If the line to remove the 3rd page is moved from the last page to be removed to the first the below test case finishes successfully, in it's current configuration however it fails without error.

Test script:

	function removed(GtkNotebook $notebook, GtkWidget $child, $index) {
		echo "tab index $index removed\n";

	$window		= new GtkWindow();
	$window->set_size_request(400, 400);

	$notebook	= new GtkNoteBook();
	$notebook->connect("page-removed", 'removed');

	$vbox		= new GtkVbox();
	$vbox->add(new GtkLabel('tab contents'));
	$tab1Index	= $notebook->append_page($vbox, new GtkLabel('Tab1'));
	$vbox		= new GtkVbox();
	$vbox->add(new GtkLabel('tab contents'));
	$tab2Index	= $notebook->append_page($vbox, new GtkLabel('Tab2'));
	$vbox		= new GtkVbox();
	$vbox->add(new GtkLabel('tab contents'));
	$tab3Index	= $notebook->append_page($vbox, new GtkLabel('Tab3'));
	$vbox		= new GtkVbox();
	$vbox->add(new GtkLabel('tab contents'));
	$tab4Index	= $notebook->append_page($vbox, new GtkLabel('Tab4'));




Expected result:
All three pages of the notebook should be removed & the page-removed signal should fire three times.

Actual result:
Only the first two pages are removed with two page-removed signals fired, the third removal fails silently.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-12 15:09 UTC]
-Status: Open +Status: Bogus
 [2011-03-12 15:09 UTC]
This is entirely controlled "upstream"

That is the gtk+ libraries decide how this is handled - if you think this is a bug in the gtk libraries please head to and file a bug there

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun May 28 21:03:43 2023 UTC