Re: Gtk2 1.152 (unstable) available



On Tue, 2007-07-03 at 09:17 +1200, Grant McLean wrote:

One piece of functionality from GladeXML that isn't explicitly mentioned
in your description is:

  $builder->connect_signals ($user_data, $object)
    When invoked like this, Gtk2::Builder will connect signals to
    method calls against the object $object.

Oops.  The functionality is already there (and is exercised in the
tests), but I forgot to mention it in the docs.  Fixed in CVS.  Thanks.

Also I looked briefly at the C API docs for GtkBuilder and it says:

  GtkBuilder also provides an interface by which it can look up the
  signal handler names in the program's symbol table and automatically
  connect as many handlers up as it can that way.

This seems to refer to gtk_builder_connect_signals.  It doesn't really
do what you mean, I think.  It merely iterates over the handler names
specified in the UI description and tries to find that handler in the
application's symbol table.  So it's basically the same as
$builder->connect_signals ($data) in Perl.

Is that type of functionality supported by the Perl bindings?  What I'm
envisaging is defining a UI in Glade but not specifying any signal
handler details.  Then having some auto connect method in the builder
package scan the object for methods matching a certain naming convention
and then hooking up the appropriate signals.  So handling an additional
signal would simply require the developer to add another method to the
object class.

This does sound interesting.  Is their enough interest to justify
putting this directly into Gtk2?

-- 
Bye,
-Torsten




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]