#26067 [Opn->Ana]: node_get_cell_style doesn't work

From: Date: Mon, 19 Jan 2004 05:17:36 +0000
Subject: #26067 [Opn->Ana]: node_get_cell_style doesn't work
References: 1  Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-610@lists.php.net to get a copy of this message
ID: 26067 Updated by: sfox@php.net Reported By: cweiske at cweiske dot de -Status: Open +Status: Analyzed Bug Type: PHP-GTK related Operating System: windows xp PHP Version: 4.3.3 New Comment: Actually it's returning a stdClass instead of a GtkStyle object - but only if the style hasn't been set using node_set_cell_style(). It looks like the style object isn't being initialised at the point of realization. The question is whether this is deliberate :) I'm still trying to verify this, one way or the other. BTW you're correct in assuming that the GtkCList equivalent works in much the same way; they use the same internal objects way deep in the mix (clistrow, cell). Previous Comments: ------------------------------------------------------------------------ [2004-01-17 11:34:39] sfox@php.net Apologies Christian, I didn't notice this report was outstanding until today's bug summary came through. Looking into it. ------------------------------------------------------------------------ [2003-11-01 00:25:50] cweiske at cweiske dot de Description: ------------ The "node_get_cell_style" of the GtkCTree widget does not work, it just returns NULL. The same problem should apply to the GtkCList. Reproduce code: --------------- <?php dl( "php_gtk." . ( strstr( PHP_OS, "WIN") ? "dll" : "so")); function delete_event() { return false; } function destroy() { Gtk::main_quit(); } $window = &new GtkWindow(); $window->set_default_size( 200, 200); $window->connect('destroy', 'destroy'); $window->connect('delete-event', 'delete_event'); $tree = &new GtkCTree( 1, 0, array( "Style")); $window->add( $tree); $window->show_all(); $node = $tree->insert_node( null, null, array( "Text"), 5, null, null, null, null, false, false); $nodestyle = $tree->node_get_cell_style( $node, 0); print_r( $nodestyle);//should be NOT null $col1 = &new GdkColor(0, 56000, 0); $nodestyle->base[GTK_STATE_NORMAL] = $col1; $tree->node_set_cell_style( $node, 0, $nodestyle); Gtk::main(); ?> Expected result: ---------------- the cell style of the first tree cell should have a nice color ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26067&edit=1

« previous php.gtk.dev (#610) next »