On Mon, 25 May 2009 06:46:34 +0300
> I did. See my message to the list from 21 May 2009 20:04 with theGtkFileChooserButton is just an GtkHBox object. You need to connect to
> subject "Doing right click on some widgets doesn't work". That
> program creates two buttons. One "normal" and one "file chooser
> button". I attach the same signals to them, but the signal handler
> for button-press-event is never called for the file chooser button. I
> thought I understood signals in gtk by now. But this one beats me...
the widget(s) in the GtkBox which receive events (ie which have a
GdkWindow object). For example amending your code for connecting to
w_fs_button to this works:
GList* children =
gtk_container_get_children(GTK_CONTAINER(w_fs_button));
for (children = g_list_first(children); children; children =
g_list_next(children)) {
g_signal_connect(children->data, "button-press-event",
G_CALLBACK(cb_button_press_event), NULL);However, I suggest you are a little more discriminating and look at the
}
code for GtkFileChooserButton to find out which widget in particular is
receiving events and connect to that one.
Chris