Bug 677987 - Don't allow to assign keybindings with arrow keys...

Disable assigning arrow-key bindings in gimpactionview.c
This commit is contained in:
Michael Natterer
2012-07-26 18:33:05 +02:00
parent 078128bb09
commit decc03ae04

View File

@ -23,6 +23,7 @@
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpwidgets/gimpwidgets.h"
@ -760,7 +761,15 @@ gimp_action_view_accel_edited (GtkCellRendererAccel *accel,
if (! accel_path)
return;
if (! accel_key)
if (! accel_key ||
/* Don't allow arrow keys, they are all swallowed by the canvas
* and cannot be invoked anyway
*/
accel_key == GDK_KEY_Left ||
accel_key == GDK_KEY_Right ||
accel_key == GDK_KEY_Up ||
accel_key == GDK_KEY_Down)
{
gimp_message_literal (view->manager->gimp,
G_OBJECT (view), GIMP_MESSAGE_ERROR,