From 53670e813ec02739a1b5677e8454248a306888c3 Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Tue, 29 Jan 2008 12:16:41 -0800 Subject: [PATCH] [Keybinder] Add better validation The GTK+ documentation for gtk_accelerator_parse() is incorrect, so use the gtk_accelerator_valid() function to check if accelerators are invalid instead of following the documentation. --- tomboykeybinder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tomboykeybinder.c b/tomboykeybinder.c index d88daa3..f2854e9 100644 --- a/tomboykeybinder.c +++ b/tomboykeybinder.c @@ -96,7 +96,7 @@ do_grab_key (Binding *binding) gtk_accelerator_parse (binding->keystring, &keysym, &virtual_mods); - if (keysym == 0 && virtual_mods == 0) + if (!gtk_accelerator_valid(keysym, virtual_mods)) return FALSE; TRACE (g_print ("Got accel %d, %d\n", keysym, virtual_mods)); -- 2.34.1