[Xfce4-commits] r23105 - xfwm4/trunk/mcs-plugin
Olivier Fourdan
olivier at xfce.org
Fri Sep 8 18:14:28 UTC 2006
Author: olivier
Date: 2006-09-08 18:14:26 +0000 (Fri, 08 Sep 2006)
New Revision: 23105
Modified:
xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c
Log:
React on key release so that we have the same behaviour as in the keyboard shortcut plugin
Modified: xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c
===================================================================
--- xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c 2006-09-08 05:45:30 UTC (rev 23104)
+++ xfwm4/trunk/mcs-plugin/xfwm4_shortcuteditor.c 2006-09-08 18:14:26 UTC (rev 23105)
@@ -682,7 +682,6 @@
guint keyval;
guint modifiers;
gchar *accelerator;
- gint i;
gchar **shortcuts;
gchar **current_shortcut;
@@ -733,15 +732,8 @@
modifiers = event->state & (~consumed_modifiers | GDK_MODIFIER_MASK);
modifiers = modifiers & gtk_accelerator_get_default_mod_mask ();
accelerator = gtk_accelerator_name (keyval, modifiers);
+ shortcuts = g_strsplit_set (accelerator, "<>", 0);
- for (i = 0; i < strlen (accelerator); i++)
- {
- if (accelerator[i] == '>')
- accelerator[i] = '<';
- }
-
- shortcuts = g_strsplit (accelerator, "<", 0);
-
current_shortcut = shortcuts;
while (*current_shortcut)
{
@@ -878,7 +870,7 @@
GTK_BUTTONBOX_SPREAD);
/* Connect signals */
- g_signal_connect (G_OBJECT (dialog), "key-press-event", G_CALLBACK (cb_compose_shortcut), itf);
+ g_signal_connect (G_OBJECT (dialog), "key-release-event", G_CALLBACK (cb_compose_shortcut), itf);
/* Take control on the keyboard */
if (gdk_keyboard_grab (gtk_widget_get_root_window (dialog), TRUE,
More information about the Xfce4-commits
mailing list