From d1268539bef3c67cf23bc0ca63c1b146fb122f25 Mon Sep 17 00:00:00 2001 From: Alexandre Savard <alexandre.savard@savoirfairelinux.com> Date: Thu, 22 Jul 2010 18:43:55 -0400 Subject: [PATCH] [#3218] Fix shortcuts logic --- sflphone-client-gnome/src/shortcuts.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/sflphone-client-gnome/src/shortcuts.c b/sflphone-client-gnome/src/shortcuts.c index ff55a97ab2..652d4496ea 100644 --- a/sflphone-client-gnome/src/shortcuts.c +++ b/sflphone-client-gnome/src/shortcuts.c @@ -402,6 +402,7 @@ shortcuts_initialize_bindings () action = shortcutsKeysElement->data; maskAndKey = g_strdup (g_hash_table_lookup (shortcutsMap, action)); + DEBUG("-------------------- maskAndKey %s", maskAndKey); token1 = strtok (maskAndKey, "x"); token2 = strtok (NULL, "x"); @@ -409,22 +410,12 @@ shortcuts_initialize_bindings () key = 0; // Value not setted - if (token1 == NULL) - { - // Nothing to do - } - // Backward compatibility (no mask defined) - if (token1 != NULL && token2 == NULL) - { - key = atoi (token1); - mask = 0; - } - // Regular case - else - { - mask = atoi (token1); - key = atoi (token2); - } + if (token1 && token2){ + DEBUG("token1 %s, token2 %s", token1, token2); + + mask = atoi (token1); + key = atoi (token2); + } if (key != 0) initialize_binding (action, key, mask); -- GitLab