From 6d75b08fbc8789442fe133cbf8da64f057ddf4a2 Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Wed, 24 Jun 2015 21:23:07 +0000 Subject: [PATCH] Duplicate layer : Add keyboard shortcut, update help file for button git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2120 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/helpfile.h | 8 ++++++++ src/hotkeys.c | 9 +++++++++ src/hotkeys.h | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/helpfile.h b/src/helpfile.h index 2ae19ae1..474ceb2d 100644 --- a/src/helpfile.h +++ b/src/helpfile.h @@ -313,6 +313,7 @@ static const T_Help_table helptable_help[] = HELP_TEXT ("") HELP_LINK (" Menu : %s", 0x100+BUTTON_LAYER_MENU) HELP_LINK (" Add new : %s", 0x100+BUTTON_LAYER_ADD) + HELP_LINK (" Duplicate : %s", 0x200+BUTTON_LAYER_ADD) HELP_LINK (" Delete : %s", 0x100+BUTTON_LAYER_REMOVE) HELP_LINK (" Merge : %s", 0x100+BUTTON_LAYER_MERGE) HELP_LINK (" Move up : %s", 0x100+BUTTON_LAYER_UP) @@ -2918,11 +2919,18 @@ static const T_Help_table helptable_layeradd[] = HELP_TITLE("ADD LAYER") HELP_TEXT ("") + HELP_BOLD ("LEFT CLICK") HELP_LINK ("(Key:%s)",0x100+BUTTON_LAYER_ADD) HELP_TEXT ("") HELP_TEXT ("Add a new layer above the current one,") HELP_TEXT ("and selects this new (empty) layer for") HELP_TEXT ("editing.") + HELP_TEXT ("") + HELP_BOLD ("RIGHT CLICK") + HELP_LINK ("(Key:%s)",0x200+BUTTON_LAYER_ADD) + HELP_TEXT ("") + HELP_TEXT ("Add a new layer, as a copy of the current") + HELP_TEXT ("layer.") }; static const T_Help_table helptable_layerdel[] = diff --git a/src/hotkeys.c b/src/hotkeys.c index 838acaaf..6a26182a 100644 --- a/src/hotkeys.c +++ b/src/hotkeys.c @@ -1563,6 +1563,14 @@ T_Key_config ConfigKey[NB_SHORTCUTS] = { true, SDLK_INSERT|MOD_ALT, // Alt + Insert 0}, + {209, + "Duplicate layer", + "Adds a new layer on top of the", + "active one. The new layer is a copy", + "of the current one.", + true, + 0, // No shortcut + 0}, {176, "Delete a layer", "Delete the current layer.", @@ -1997,6 +2005,7 @@ word Ordering[NB_SHORTCUTS]= SPECIAL_LAYER8_SELECT, SPECIAL_LAYER8_TOGGLE, 0x100+BUTTON_LAYER_ADD, + 0x200+BUTTON_LAYER_ADD, 0x100+BUTTON_LAYER_REMOVE, 0x100+BUTTON_LAYER_MERGE, 0x100+BUTTON_LAYER_UP, diff --git a/src/hotkeys.h b/src/hotkeys.h index 0e7d4e8e..d84f5344 100644 --- a/src/hotkeys.h +++ b/src/hotkeys.h @@ -33,7 +33,7 @@ #endif #include -#define NB_SHORTCUTS 209 ///< Number of actions that can have a key combination associated to it. +#define NB_SHORTCUTS 210 ///< Number of actions that can have a key combination associated to it. /*** Types definitions and structs ***/