Revision: 3715 http://geany.svn.sourceforge.net/geany/?rev=3715&view=rev Author: eht16 Date: 2009-04-21 20:51:53 +0000 (Tue, 21 Apr 2009)
Log Message: ----------- Replace our own GEANY_KEYS_MODIFIER_MASK by gtk_accelerator_get_default_mod_mask() which gives the same result.
Modified Paths: -------------- trunk/ChangeLog trunk/src/callbacks.c trunk/src/editor.c trunk/src/keybindings.c trunk/src/keybindings.h trunk/src/prefs.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-04-19 18:14:12 UTC (rev 3714) +++ trunk/ChangeLog 2009-04-21 20:51:53 UTC (rev 3715) @@ -1,3 +1,11 @@ +2009-04-20 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/callbacks.c, src/editor.c, src/keybindings.c, src/keybindings.h, + src/prefs.c: + Replace our own GEANY_KEYS_MODIFIER_MASK by + gtk_accelerator_get_default_mod_mask() which gives the same result. + + 2009-04-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/dialogs.c:
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2009-04-19 18:14:12 UTC (rev 3714) +++ trunk/src/callbacks.c 2009-04-21 20:51:53 UTC (rev 3715) @@ -2139,7 +2139,7 @@ GdkEventKey *event, gpointer user_data) { - guint state = event->state & GEANY_KEYS_MODIFIER_MASK; + guint state = event->state & gtk_accelerator_get_default_mod_mask();
/* make pressing escape in the sidebar and toolbar focus the editor */ if (event->keyval == GDK_Escape && state == 0)
Modified: trunk/src/editor.c =================================================================== --- trunk/src/editor.c 2009-04-19 18:14:12 UTC (rev 3714) +++ trunk/src/editor.c 2009-04-21 20:51:53 UTC (rev 3715) @@ -203,7 +203,7 @@ (gint)event->x, (gint)event->y, FALSE); if (event->button == 1) { - guint state = event->state & GEANY_KEYS_MODIFIER_MASK; + guint state = event->state & gtk_accelerator_get_default_mod_mask();
if (event->type == GDK_BUTTON_PRESS && editor_prefs.disable_dnd) {
Modified: trunk/src/keybindings.c =================================================================== --- trunk/src/keybindings.c 2009-04-19 18:14:12 UTC (rev 3714) +++ trunk/src/keybindings.c 2009-04-21 20:51:53 UTC (rev 3715) @@ -1078,7 +1078,7 @@ document_check_disk_status(doc, FALSE);
keyval = ev->keyval; - state = ev->state & GEANY_KEYS_MODIFIER_MASK; + state = ev->state & gtk_accelerator_get_default_mod_mask();
/* hack to get around that CTRL+Shift+r results in GDK_R not GDK_r */ if ((ev->state & GDK_SHIFT_MASK) || (ev->state & GDK_LOCK_MASK))
Modified: trunk/src/keybindings.h =================================================================== --- trunk/src/keybindings.h 2009-04-19 18:14:12 UTC (rev 3714) +++ trunk/src/keybindings.h 2009-04-21 20:51:53 UTC (rev 3715) @@ -30,15 +30,7 @@ #ifndef GEANY_KEYBINDINGS_H #define GEANY_KEYBINDINGS_H 1
-/* allowed modifier keys (especially NOT Caps lock, no Num lock) */ -#if GTK_CHECK_VERSION(2, 10, 0) -# define GEANY_KEYS_MODIFIER_MASK (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK | \ - GDK_META_MASK | GDK_SUPER_MASK | GDK_HYPER_MASK) -#else -# define GEANY_KEYS_MODIFIER_MASK (GDK_SHIFT_MASK | GDK_CONTROL_MASK | GDK_MOD1_MASK) -#endif
- /** Function pointer type used for keybinding callbacks */ typedef void (*GeanyKeyCallback) (guint key_id);
Modified: trunk/src/prefs.c =================================================================== --- trunk/src/prefs.c 2009-04-19 18:14:12 UTC (rev 3714) +++ trunk/src/prefs.c 2009-04-21 20:51:53 UTC (rev 3715) @@ -1220,7 +1220,7 @@ gchar *str; gint state;
- state = event->state & GEANY_KEYS_MODIFIER_MASK; + state = event->state & gtk_accelerator_get_default_mod_mask();
if (event->keyval == GDK_Escape) return FALSE; /* close the dialog, don't allow escape when detecting keybindings. */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.