[Xfce4-commits] <terminal:master> Don't accept accelerators that are not accepted by Gtk (bug #3524).

Nick Schermer noreply at xfce.org
Sat Oct 10 15:48:02 CEST 2009


Updating branch refs/heads/master
         to fedcf6e836fae86c875e4b18d517a9e96edeca9c (commit)
       from c8a44ef4fed233e62953c11137988027717cc475 (commit)

commit fedcf6e836fae86c875e4b18d517a9e96edeca9c
Author: Nick Schermer <nick at xfce.org>
Date:   Sat Oct 10 15:46:04 2009 +0200

    Don't accept accelerators that are not accepted by Gtk (bug #3524).

 terminal/terminal-shortcut-editor.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/terminal/terminal-shortcut-editor.c b/terminal/terminal-shortcut-editor.c
index be3766a..7602ae8 100644
--- a/terminal/terminal-shortcut-editor.c
+++ b/terminal/terminal-shortcut-editor.c
@@ -445,6 +445,11 @@ terminal_shortcut_editor_compose (GtkWidget              *dialog,
   modifiers = event->state & (~consumed_modifiers | GDK_MODIFIER_MASK);
   modifiers = modifiers & gtk_accelerator_get_default_mod_mask ();
 
+  /* check if the accelerator will be actually be handed by gtk in the
+   *  interface, see http://bugzilla.xfce.org/show_bug.cgi?id=3524 */
+  if (!gtk_accelerator_valid (keyval, modifiers))
+    return TRUE;
+
   accelerator = gtk_accelerator_name (keyval, modifiers);
   if (exo_str_is_equal (accelerator, "<Alt>c"))
     {



More information about the Xfce4-commits mailing list