On Tue, 2008-02-26 at 14:19 +0100, Germán Diago wrote:
> Hello. I'm implementing an application in gtkmm. I want to add support for
> dynamic signal
> connection from a glade file in C++ (which is not supported by the C++
> bindings).
> 
> I'd like to know if there is a way, once a glade file has been instantiated,
> to obtain information about
> the signals and handlers attached to every widget from the Gobject objects
> and how I should do it.
> 
> I tried to  do like this:
> 
> 
> guint nids = 0;
> guint * ids = g_signal_list_ids(g_type_from_name("GtkButton"), &nids);
> 
>  std::cout << nids << std::endl;
>  std::cout << g_signal_name(ids[23]) << std::endl;
> 
> 
> but if I use GtkButton, nids == 0. However, when I use "GtkWidget" I get
> a 67 and signals can be get with the function g_signal_names(ids[i]);
> 
> This code is to get available signals, but not the real connections between
> objects. Can help, please?

The get_signals() code here might provide some hints:
http://svn.gnome.org/viewvc/glibmm/trunk/tools/extra_defs_gen/generate_extra_defs.cc?view=markup

I am not at all optimistic that we can do autoconnection, but I am happy
that you are trying.

-- 
[EMAIL PROTECTED]
www.murrayc.com
www.openismus.com
> 

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to