|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54175 GtkCellRendererCombo changed signal missing GtkTreeIter parameter on callback
Submitted: 2011-03-06 16:21 UTC Modified: 2011-03-06 17:05 UTC
From: ptlis at ptlis dot net Assigned:
Status: Not a bug Package: PHP-GTK related
PHP Version: 5.3.5 OS: Linux
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-06 16:21 UTC] ptlis at ptlis dot net
The changed signal should provide a GtkTreeIter as documented here:

Without this parameter passed to callbacks there is no sane mechanism to get data from other columns in the GtkListStore.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-03-06 16:54 UTC] ptlis at ptlis dot net
Basic test case of what should occur:


	class test {
		protected	$str;

		public function __construct($str) {
			$this->str	= $str;

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

	// Tree Model
	$treeModel	= new GtkTreeStore(GObject::TYPE_STRING);
	$treeModel->append(null, array('foo'));

	// Tree View
	$treeView	= new GtkTreeView();

	// Combo Model
	$comboModel	= new GtkListStore(GObject::TYPE_STRING, GObject::TYPE_PHP_VALUE);
	$comboModel->append(array('foo', new test('foo')));
	$comboModel->append(array('bar', new test('bar')));
	$comboModel->append(array('baz', new test('baz')));

	// Combo renderer
	$renderer			= new GtkCellRendererCombo();
	$renderer->set_property('model', $comboModel);
	$renderer->set_property('text-column', 0);
	$renderer->set_property('editable', true);
	$renderer->set_property('has-entry', false);
	$column				= new GtkTreeViewColumn('column:', $renderer, 'text', 0);

    $renderer->connect('edited', 'combo_change');

	function combo_change(GtkCellRendererText $cell, $path, $selectionText/*, GtkTreeIter $treeIter*/) {
		$class	= $cell->model->get_value($treeIter->iter, 1);
		echo 'changed' . "\n";

 [2011-03-06 17:05 UTC]
-Status: Open +Status: Bogus
 [2011-03-06 17:05 UTC]
You're using the 'edited' signal - not the 'changed' signal. For the 'changed' 
signal, the GtkTreeIter is the third argument passed to the callback.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 16:01:29 2024 UTC