Lex Trotman wrote:
> While this works fine and the handlers are only one line each, another
> way would have been to use one handler and set different user_data for
> each menu item.
To be explicit, you can do:
g_signal_connect ((gpointer) indent_width_1, "activate",
G_CALLBACK (on_indent_width_activate),
GUINT_TO_POINTER (1));
g_signal_connect ((gpointer) indent_width_2, "activate",
G_CALLBACK (on_indent_width_activate),
GUINT_TO_POINTER (2));
and in the on_indent_width_activate() callback use
GPOINTER_TO_INT(user_data)
to get the int back.
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
Geany-devel mailing list
[email protected]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel