GtkColorButton proposal
| From: | Steph Fox | Date: | Sat, 17 Dec 2005 14:18:27 +0000 |
| Subject: | GtkColorButton proposal | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-2117@lists.php.net to get a copy of this message | ||
Hi all,
I'd like to kill off gtk_color_button_new_with_color() completely (put it in
the ignores) and instead have GdkColor as an optional param in the
GtkColorButton constructor.
I have a trivial patch to make GtkColorButton::get_color() work in the
expected manner too.
With both patches in, this test script currently works on my laptop:
<?php
function test_this($cb) {
$color = $cb->get_color();
var_dump($color);
}
$window = new GtkWindow();
$window->connect_simple('destroy', array('gtk', 'main_quit'));
$color = new GdkColor();
$red = $color->parse("red");
//$cb = new GtkColorButton($red); // either construction works
$cb = new GtkColorButton();
$cb->connect('clicked', 'test_this');
$window->add($cb);
$window->show_all();
gtk::main();
?>
Anyone have strong feelings for/against this?
- Steph