[Xfce4-commits] <libxfce4ui:master> Don't remove keyboard shortcut when entered twice (bug #8749).

Jérôme Guelfucci noreply at xfce.org
Sat Nov 24 01:06:01 CET 2012


Updating branch refs/heads/master
         to 2ef1c9713fdbf6a27a3c90544dc1c5ed52d75fa5 (commit)
       from c540a83f7f8f6d84e137764c3c627421e4384fe9 (commit)

commit 2ef1c9713fdbf6a27a3c90544dc1c5ed52d75fa5
Author: Jérôme Guelfucci <jeromeg at xfce.org>
Date:   Sat Nov 24 01:02:13 2012 +0100

    Don't remove keyboard shortcut when entered twice (bug #8749).
    
    We know reject the shortcut the second time during the validation step.

 libxfce4kbd-private/xfce-shortcuts.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/libxfce4kbd-private/xfce-shortcuts.c b/libxfce4kbd-private/xfce-shortcuts.c
index b98898b..fa417c9 100644
--- a/libxfce4kbd-private/xfce-shortcuts.c
+++ b/libxfce4kbd-private/xfce-shortcuts.c
@@ -90,7 +90,15 @@ xfce_shortcut_conflict_dialog (const gchar *owner,
     return GTK_RESPONSE_ACCEPT;
 
   if (g_utf8_collate (owner, other) == 0 && g_utf8_collate (owner_action, other_action) == 0)
-    return GTK_RESPONSE_ACCEPT;
+    {
+      /* This shortcut already exists in the provider, we don't want it twice */
+
+      /* Warn the user */
+      xfce_dialog_show_warning (NULL, _("Please use another key combination."),
+                                _("%s already triggers this action."), shortcut);
+
+      return GTK_RESPONSE_REJECT;
+    }
 
   title = g_strdup_printf (_("Conflicting actions for %s"), shortcut);
 


More information about the Xfce4-commits mailing list