gtk_widget_add_accelerator



Hi All,

I am having trouble with adding acclerators.
I want the "Shift Ctrl Minus" key to map to some
event.

Here's what I am doing:

gchar * label = ...;
GtkWidget *menuItemWidget =
gtk_menu_item_new_with_mnemonic(label);
...
GdkAccelGroup *accel = ... ;
AccelKey = 45; //for "-" key
accelMod = GDK_CONTROL_MASK | GDK_SHIFT_MASK;

gtk_widget_add_accelerator(menuItemWidget, "activate",
accel, AccelKey, (GdkModifierType)accelMod,
GTK_ACCEL_VISIBLE);
			g_signal_connect(G_OBJECT(menuItemWidget),
"activate",
G_CALLBACK (ActivateCallback), (gpointer)somedata);

I also added an accelerator so that "Shit Ctrl +" key
is mapped to another event.

These two keys (ShiftCtrlPlus and ShiftCtrlMinus) are
part of menus and I can see the shortcuts as part of
the menu names but the "Shift Ctrl Minus" does not
work instead "Ctrl Minus" emits the signal. No such
problem exists for "Shift Ctrl Plus" key.

Any idea what might be going wrong?

Thanks



		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 



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