From a6e663f936752ab3fc2835ea0680b651b7a2f3ca Mon Sep 17 00:00:00 2001 From: RamonUnch <74856804+RamonUnch@users.noreply.github.com> Date: Sat, 11 Mar 2023 08:49:40 +0100 Subject: [PATCH] Fix missing space before (empty) in a translation because in a ini file the spaces at the beginning of an item are ignored. --- languages.h | 2 +- tray.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/languages.h b/languages.h index 31aa30b4..2d60dc61 100644 --- a/languages.h +++ b/languages.h @@ -509,7 +509,7 @@ static const struct strings en_US = { /* about */ TEXT("&About"), /* open ini file */ TEXT("&Open ini file"), /* savezones */ TEXT("&Save test windows as snap layout"), - /* emptyzone */ TEXT(" (empty)"), + /* emptyzone */ TEXT("(empty)"), /* snaplayout */ TEXT("Snap layout &"), /* exit */ TEXT("E&xit"), diff --git a/tray.c b/tray.c index 1438b5c4..5838c56f 100644 --- a/tray.c +++ b/tray.c @@ -179,7 +179,7 @@ static void ClearAllZones() { int i; TCHAR txt[128], name[32]; - for (i = 0; i < 32; i++) { + for (i = 0; i < 2048; i++) { ZidxToZonestr(LayoutNumber, i, name); if (GetPrivateProfileString(TEXT("Zones"), name, TEXT(""), txt, ARR_SZ(txt), inipath)) { WritePrivateProfileString(TEXT("Zones"), name, TEXT(""), inipath); @@ -229,6 +229,7 @@ static void catFullLayoutName(TCHAR *txt, size_t len, int laynum) lstrcat_s(txt, len, Uint2lStr(numstr, HIWORD(rez))); lstrcat_s(txt, len, TEXT(")")); } else { + lstrcat_s(txt, len, TEXT(" ")); lstrcat_s(txt, len, l10n->menu_emptyzone); // (empty) } } else {