wmaker: Do not allocate memory for a temporary string for the Window Shortcut menu
commitfbec3a728f9505267f04d68b5c7e267f562665b0
authorChristophe CURIS <christophe.curis@free.fr>
Sun, 16 May 2021 13:47:16 +0000 (16 15:47 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 18 May 2021 16:49:17 +0000 (18 17:49 +0100)
tree48c1098a2113c34a1544f65cb0abd23f895a084f
parent944bb49997ed04093cf64cdd045e6b2362307b7c
wmaker: Do not allocate memory for a temporary string for the Window Shortcut menu

When creating the list of possible shortcut for windows to populate the
window menu, a temporary buffer was allocated to hold that string.

As this allocation participates to memory fragmentation, this patch makes
use of storage on the stack instead which is also faster.

Took opportunity to include the shortcut number (%i) in the string to be
translated, because it is unlikely that adding that number at the end of
the string is right in all languages. Updated french translation because
it is the only one I am confident with.

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
po/fr.po
src/winmenu.c