Re: GtkBuilder Public API - Last call



On Wed, 13 Jun 2007, Johan Dahlin wrote:

Johan Dahlin wrote:
Christian Persch wrote:
Hi;

typedef void (*GtkBuilderConnectFunc) (GtkBuilder  *builder,
                                       const gchar *handler_name,
                                       GObject     *object,
                                       const gchar *signal_name,
                                       GObject     *connect_object,
                                       gboolean     after,
                                       gpointer     user_data);
Could we have "GConnectFlags flags" instead of "gboolean after" here, so
this could also support swapped handlers in future?

This was copied more or less directly from libglade, there's a certain
advantage of making this compatible with the existing code.


Well, actually swapped handlers are supported, using the object attribute, eg:

 <object class="GtkButton" id="button"/>
 <object class="GtkEntry" id="entry">
   <signal name="activate" handler="button_clicked" object="button"/>
 </object>

It definitely makes sense to support GConnectFlags though.

I thought there were other flags apart from after and swapped, so this is
not true, right?

there could conceivably be new flags in the future. also,
"object" is different from "swapped". the former should use
g_signal_connect_object which needs a GObject argument and
auto-disconnects the signal handler if the object argument
is disposed. the later also works for void* pointers.


Johan

---
ciaoTJ



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