Re: [gtk-list] what are equiv of Motif actions?
- From: Damon Chaplin <damon karuna freeserve co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] what are equiv of Motif actions?
- Date: Sat, 05 Jun 1999 12:17:36 +0100
"Michael J. Hammel" wrote:
>
> Why does the following:
>
> gtk_widget_add_accelerator (menu_items, "activate",
> accel_group, GDK_t, GDK_Alt_L, GTK_ACCEL_VISIBLE );
>
> product "Shift Alt T" for a menu item. Shouldn't it show "Alt T" (ie
> lowercase T) instead? I don't want the Shift modifier with this
> accelerator.
The modifiers parameter should be a combination of GdkModifierType flags
(from gdk/gdktypes.h)
typedef enum
{
GDK_SHIFT_MASK = 1 << 0,
GDK_LOCK_MASK = 1 << 1,
GDK_CONTROL_MASK = 1 << 2,
GDK_MOD1_MASK = 1 << 3,
GDK_MOD2_MASK = 1 << 4,
GDK_MOD3_MASK = 1 << 5,
GDK_MOD4_MASK = 1 << 6,
GDK_MOD5_MASK = 1 << 7,
GDK_BUTTON1_MASK = 1 << 8,
GDK_BUTTON2_MASK = 1 << 9,
GDK_BUTTON3_MASK = 1 << 10,
GDK_BUTTON4_MASK = 1 << 11,
GDK_BUTTON5_MASK = 1 << 12,
GDK_RELEASE_MASK = 1 << 13,
GDK_MODIFIER_MASK = 0x3fff
} GdkModifierType;
So you probably wanted to do:
gtk_widget_add_accelerator (menu_items, "activate",
accel_group, GDK_t, GDK_MOD1_MASK, GTK_ACCEL_VISIBLE );
Damon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]