I'm trying to add an accelerator to a "Play" GTK+ 3.0 menu item using the following C code:
gtk_widget_add_accelerator(play, "activate", accel_group, GDK_KEY_F5, NULL, GTK_ACCEL_VISIBLE);
I want the "Play" menu item to be activated when the user presses the F5 key. However, when I try to compile I get the following error:
/usr/include/gtk-3.0/gtk/gtkwidget.h:504:9: note: expected 'GdkModifierType' but argument is of type 'void *'
I don't want to add a modifier, just have the menu item activate when the user presses the F5 key. I realized that I can pass a 0
as the argument (since GdkModifierType
is just a binary mask), but is there a preferred way over this solution -- perhaps a preprocessor macro called GDK_NONE_MASK
or something to that effect?