Fw: [PHP-GTK-DEV] messy hack

From: Date: Mon, 05 Sep 2005 16:43:46 +0000
Subject: Fw: [PHP-GTK-DEV] messy hack
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-1596@lists.php.net to get a copy of this message
OK, I looked again now and discovered the second parameter in gtk_button_new. I think what I'm asking, then, is whether that second parameter couldn't be made a more intuitive '1' by default, i.e. it's switch-off-able but is generally 'just there' in things like menu items, labels and buttons using the text parameter, and probably also in set_text(). I'm having trouble getting access to the C source for gtk+/win32 at present, so I've no idea whether that's going to render those widgets unstable. It _appears_ to work without problems here for GtkButton and GtkLabel. ----- Original Message ----- From: "Steph" <steph@zend.com> To: "PHP-GTK dev" <php-gtk-dev@lists.php.net> Cc: "Andrei" <andrei@gravitonic.com> Sent: Sunday, September 04, 2005 4:18 PM Subject: [PHP-GTK-DEV] messy hack > <?php > > $window = new GtkWindow('Testing stuff'); > $window->connect_object('destroy', array('gtk', 'main_quit')); > > $button = new GtkButton(''); > $label = $button->child; > $label->set_text_with_mnemonic('_Suck it and see'); > $window->add($button); > > $window->show_all(); > > gtk::main(); > > ?> > > It took a while to understand why use_underline is TRUE by default, but it > has to be better than working around it in userland. > > I think I can probably tackle those outstanding 'mnemonic' calls with my > copy/paste skills, there are a few incidences of it already in the source. > > Do you have any strong feelings about that approach, Andrei? > > - Steph > > -- > PHP-GTK Development Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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