On Wed, 23 May 2007 16:18:41 +0200, Enrico Tröger wrote > On Wed, 23 May 2007 10:12:31 -0400, "danielg RHCE" <[EMAIL PROTECTED]> > wrote: > > > Legacy code I'm trying to update and I've been out of the programming > > thing for a while. > > > > I have a popup menu with this item in it: > > menuitem = gtk_item_factory_get_item (ifactory, "/Refresh > > Tree"); gtk_widget_set_sensitive (menuitem, FALSE); > > > > I'm looking at the gtk class reference and find this: > > _______________________________ > > [...] > > _____________________________________ > > > > Now, how would I use that signal somewhere else in the code to call > > for a refresh? > Why don't you just call the callback function which is connected to the > signal? > Or use g_signal_emit() or g_signal_emit_by_name() to "emulate" a > click on the menu item.
That's exactly what I'm trying to do, simulate a menu item click. Same set of questions, though. I don't know how to use it. I see the page: _____________________________________ g_signal_emit_by_name () void g_signal_emit_by_name (gpointer instance, const gchar *detailed_signal, ...); Emits a signal. Note that g_signal_emit_by_name() resets the return value to the default if no handlers are connected, in contrast to g_signal_emitv(). instance : the instance the signal is being emitted on. detailed_signal : a string of the form "signal-name::detail". ... : parameters to be passed to the signal, followed by a location for the return value. If the return type of the signal is G_TYPE_NONE, the return value location can be omitted. ______________________________________ But I've been out of it so long I'm not sure how to make use of that. _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list