Re: Which signal is emitted when the arrow in GtkComboBoxEntry() is pressed?

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

 



Jan-Marek Glogowski wrote:
Hi Egon

This is a hack, but I it should work:

static void combo_toggle_func( GtkToggleButton
	*togglebutton, gpointer user_data )
{
	// Do your "menu" stuff
}

static void scan_children( GtkWidget *w,  gpointer data )
{
	if( GTK_IS_TOGGLE_BUTTON( w ) ) {
		g_print( "Found Button!\n" );
		g_signal_connect( w, "toggled",
			G_CALLBACK( combo_toggle_func ), NULL );
	}
}

gtk_container_forall( GTK_CONTAINER( my_combo ), scan_children, NULL );

I have also attached a patch to add a popup event (diff against v2.5.5).
Maybe you can try it and report results to the list, so it could be
included in the 2.6 release.

HTH

Jan-Marek

Thanks Jan-Marek,

I've experimented with the above 'hack'.
Unfortunately no toggle_button is found during the child-scan.
Actually the scan found only one widget in the gtkcomboboxentry, which to me seems quite strange as I would have expected at least two.
(Checke by setting another print-statement in the scan_children())


I haven't been able to determine which widget it actually detected, as I hevent found any good way of getting the type extracted from the widget in a human readable way.

Do you have any clue on what is going on here?

Best regards
Egon Andersen

(Also things like the GTK_IS_TOGGLE_BUTTON() macro is not found in the documents - okay, it is defined in the header-file, but it is missing in the GTK+ Reference Manual for GtkToggleButton)
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux