Branch: Tag:

2006-08-29

2006-08-29 12:15:07 by Lance Dillon <riffraff169@yahoo.com>

added ability to get the signal id assigned to a specific object when
signal_autoconnect() is called, with the addition of get_signal_id().

Rev: src/post_modules/GTK2/source/gladexml.pre:1.11

72:    (GClosureNotify)pgtk2_free_signal_data);    g_closure_set_marshal(gc,pgtk2_marshaller);    id=g_signal_connect_closure(G_OBJECT(object),signal_name,gc,1); +  g_object_set_data(G_OBJECT(object),"signal-data",b);   }   %}   
171:    }   }    + int get_signal_id(GTK2.Widget widget) + //! Used to get the signal id attached to a GladeXML object. + { +  pgtk2_verify_inited(); +  { +  int id; +  struct object *o1; +  GtkWidget *w; +  struct signal_data *sd; +  +  get_all_args("get_signal_id",args,"%o",&o1); +  w=GTK_WIDGET(get_gobject(o1)); +  if (!w) +  Pike_error("GladeXML->get_signal_id: Invalid argument 1, wanted GTK2 object of type WIDGET.\n"); +  sd=g_object_get_data(G_OBJECT(w),"signal-data"); +  if (sd) +  push_int(sd->signal_id); +  else +  push_int(-1); +  } + } +    void signal_autoconnect(mapping(string:function) callbacks, mixed data)   //! Try to connect functions to all signals in the interface. The mapping   //! should consist of handler name : function pairs. The data argument will