[gimp] app: do not allow Alt+[0-9] shortcuts.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: do not allow Alt+[0-9] shortcuts.
- Date: Fri, 25 Nov 2016 04:59:48 +0000 (UTC)
commit 31ae4238d20a645670c273b1c533f56ad8caf065
Author: Jehan <jehan girinstud io>
Date: Fri Nov 25 05:41:23 2016 +0100
app: do not allow Alt+[0-9] shortcuts.
These are used for display switching, and even though you could
remap these shortcuts, it would work only until you close an image,
open a new one, or reorder tabs in SWM, in which case your shortcut
would end up forcefully overrided, which is a bad user experience.
If we want to give more flexibility and allow one to map these
shortcuts, we must also make sure the display showing actions won't
override customized shortcuts. In the meantime, it is better to
simply forbid these in our preferences.
app/widgets/gimpactionview.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/app/widgets/gimpactionview.c b/app/widgets/gimpactionview.c
index fa40d0c..da872fb 100644
--- a/app/widgets/gimpactionview.c
+++ b/app/widgets/gimpactionview.c
@@ -795,6 +795,17 @@ gimp_action_view_accel_edited (GtkCellRendererAccel *accel,
G_OBJECT (view), GIMP_MESSAGE_ERROR,
_("F1 cannot be remapped."));
}
+ else if (accel_key >= GDK_KEY_0 &&
+ accel_key <= GDK_KEY_9 &&
+ accel_mask == GDK_MOD1_MASK)
+ {
+ gimp_message (view->manager->gimp,
+ G_OBJECT (view), GIMP_MESSAGE_ERROR,
+ _("Alt+%d is used to switch to display %d and "
+ "cannot be remapped."),
+ accel_key - GDK_KEY_0,
+ accel_key == GDK_KEY_0 ? 10 : accel_key - GDK_KEY_0);
+ }
else if (! gtk_accel_map_change_entry (accel_path,
accel_key, accel_mask, FALSE))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]