diff --git a/altsnap.c b/altsnap.c index 89a64e7..a34547f 100644 --- a/altsnap.c +++ b/altsnap.c @@ -126,7 +126,7 @@ int UnhookSystem() if (!keyhook) { // System not hooked return 1; } else if (!UnhookWindowsHookEx(keyhook) && showerror) { - MessageBox(NULL, l10n->unhook_error, TEXT(APP_NAMEA), + MessageBox(NULL, l10n->MiscUnhookError, TEXT(APP_NAMEA), MB_ICONINFORMATION|MB_OK|MB_TOPMOST|MB_SETFOREGROUND); } keyhook = NULL; @@ -189,25 +189,25 @@ void ShowSClickMenu(HWND hwnd, LPARAM param) UCHAR action; WORD mf; TCHAR *str; } mnlst[] = { /* hide, action, MF_FLAG/CHECKED, menu string */ - { AC_ALWAYSONTOP, CHK(LP_TOPMOST), l10n->input_actions_alwaysontop }, - { AC_BORDERLESS, CHK(LP_BORDERLESS), l10n->input_actions_borderless }, - { AC_CENTER, MF_STRING, l10n->input_actions_center}, - { AC_ROLL, CHK(LP_ROLLED), l10n->input_actions_roll}, - { AC_LOWER, MF_STRING, l10n->input_actions_lower}, - { AC_MAXHV, MF_STRING, l10n->input_actions_maximizehv}, - { AC_MINALL, MF_STRING, l10n->input_actions_minallother}, - { AC_SIDESNAP, MF_STRING, l10n->input_actions_sidesnap}, + { AC_ALWAYSONTOP, CHK(LP_TOPMOST), l10n->InputActionAlwaysOnTop }, + { AC_BORDERLESS, CHK(LP_BORDERLESS), l10n->InputActionBorderless }, + { AC_CENTER, MF_STRING, l10n->InputActionCenter}, + { AC_ROLL, CHK(LP_ROLLED), l10n->InputActionRoll}, + { AC_LOWER, MF_STRING, l10n->InputActionLower}, + { AC_MAXHV, MF_STRING, l10n->InputActionMaximizeHV}, + { AC_MINALL, MF_STRING, l10n->InputActionMinAllOther}, + { AC_SIDESNAP, MF_STRING, l10n->InputActionSideSnap}, { 0, MF_SEPARATOR, NULL }, /* ------------------------ */ - { AC_MAXIMIZE, CHK(LP_MAXIMIZED), l10n->input_actions_maximize}, - { AC_MINIMIZE, MF_STRING, l10n->input_actions_minimize}, - { AC_CLOSE, MF_STRING, l10n->input_actions_close}, + { AC_MAXIMIZE, CHK(LP_MAXIMIZED), l10n->InputActionMaximize}, + { AC_MINIMIZE, MF_STRING, l10n->InputActionMinimize}, + { AC_CLOSE, MF_STRING, l10n->InputActionClose}, { 0, MF_SEPARATOR, NULL }, /* ------------------------ */ - { AC_KILL, MF_STRING, l10n->input_actions_kill}, + { AC_KILL, MF_STRING, l10n->InputActionKill}, { 0, MF_SEPARATOR, NULL }, /* ------------------------ */ - { AC_MOVEONOFF, CHK(LP_MOVEONOFF), l10n->input_actions_moveonoff}, + { AC_MOVEONOFF, CHK(LP_MOVEONOFF), l10n->InputActionMoveOnOff}, { 0, MF_SEPARATOR, NULL }, /* ------------------------ */ - { show_oriclick, MF_STRING, l10n->input_actions_oriclick}, - { AC_NONE, MF_STRING, l10n->input_actions_nothing}, + { show_oriclick, MF_STRING, l10n->InputActionOriClick}, + { AC_NONE, MF_STRING, l10n->InputActionNothing}, }; #undef CHK #undef K @@ -365,7 +365,7 @@ LRESULT CALLBACK WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) DestroyWindow(hwnd); } else if (wmId == SWM_SAVEZONES) { TCHAR txt[256]; - lstrcpy_s(txt, ARR_SZ(txt), l10n->zone_confirmation); + lstrcpy_s(txt, ARR_SZ(txt), l10n->MiscZoneConfirmation); lstrcat_s(txt, ARR_SZ(txt), TEXT("\n\n")); catFullLayoutName(txt, ARR_SZ(txt), LayoutNumber); int ret = MessageBox(NULL, txt, TEXT(APP_NAMEA), MB_OKCANCEL); @@ -440,7 +440,8 @@ int WINAPI tWinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, TCHAR *params, int LOG("\n\nALTSNAP STARTED"); GetModuleFileName(NULL, inipath, ARR_SZ(inipath)); inipath[MAX_PATH-1] = '\0'; - lstrcpy_s(&inipath[lstrlen(inipath)-3], 4, TEXT("ini")); + size_t inipath_len = lstrlen(inipath)-3; + lstrcpy_s(&inipath[inipath_len], 4, TEXT("ini")); if (INVALID_FILE_ATTRIBUTES == GetFileAttributes(inipath) && GetEnvironmentVariable(TEXT("APPDATA"), NULL, 0)) { // .ini file is not in current directorry, and APPDATA exists @@ -453,7 +454,10 @@ int WINAPI tWinMain(HINSTANCE hInst, HINSTANCE hPrevInstance, TCHAR *params, int LOG("CreateDirectory(%S)", userini); } // Full user ini name. - lstrcat_s(userini, ARR_SZ(userini), TEXT("\\AltSnap.ini")); + //lstrcat_s(userini, ARR_SZ(userini), TEXT("\\AltSnap.ini")); + TCHAR *inifilename = inipath + inipath_len-3; + while (inifilename >= inipath && *inifilename != '\\') inifilename--; + lstrcat_s(userini, ARR_SZ(userini), inifilename); if (INVALID_FILE_ATTRIBUTES == GetFileAttributes(userini)) { // Copy AltSnap.dni (Default ini file) if no ini present lstrcpy_s(&inipath[lstrlen(inipath)-3], 4, TEXT("dni")); diff --git a/config.c b/config.c index 9a5ef08..a388878 100644 --- a/config.c +++ b/config.c @@ -105,7 +105,7 @@ static BOOL ElevateNow(int showconfig) if (ret > 32) { PostMessage(g_hwnd, WM_CLOSE, 0, 0); } else { - MessageBox(NULL, l10n->general_elevation_aborted, TEXT(APP_NAMEA), MB_ICONINFORMATION | MB_OK); + MessageBox(NULL, l10n->GeneralElevationAborted, TEXT(APP_NAMEA), MB_ICONINFORMATION | MB_OK); } return FALSE; } @@ -179,19 +179,19 @@ static void MoveButtonUporDown(WORD id, WINDOWPLACEMENT *wndpl, int diffrows) static void UpdateStrings() { // Update window title - PropSheet_SetTitle(g_cfgwnd, 0, l10n->title); + PropSheet_SetTitle(g_cfgwnd, 0, l10n->ConfigTitle); // Update tab titles // tc = PropSheet_GetTabControl(g_cfgwnd); HWND tc = (HWND)SendMessage(g_cfgwnd, PSM_GETTABCONTROL, 0, 0); int numrows_prev = TabCtrl_GetRowCount(tc); const TCHAR *titles[6]; - titles[0] = l10n->tab_general; - titles[1] = l10n->tab_mouse; - titles[2] = l10n->tab_keyboard; - titles[3] = l10n->tab_blacklist; - titles[4] = l10n->tab_advanced; - titles[5] = l10n->tab_about; + titles[0] = l10n->ConfigTabGeneral; + titles[1] = l10n->ConfigTabMouse; + titles[2] = l10n->ConfigTabKeyboard; + titles[3] = l10n->ConfigTabBlacklist; + titles[4] = l10n->ConfigTabAdvanced; + titles[5] = l10n->ConfigTabAbout; size_t i; for (i = 0; i < ARR_SZ(titles); i++) { TCITEM ti; @@ -392,6 +392,18 @@ static HWND CreateInfoTip(HWND hDlg, int toolID, const TCHAR * const pszText) toolInfo.uFlags = TTF_IDISHWND | TTF_SUBCLASS ; toolInfo.uId = (UINT_PTR)hwndTool; toolInfo.lpszText = (TCHAR * const)pszText; + + TCHAR buf[16]; + if (GetClassName(hwndTool, buf, ARR_SZ(buf)) > 0 + && !lstrcmp(TEXT("Static"), buf)) { + // Use the RECT for STATIC controls + toolInfo.uFlags = TTF_SUBCLASS; + GetWindowRect(hwndTool, &toolInfo.rect); + POINT pt = {0,0}; + ScreenToClient(hDlg, &pt); + OffsetRect(&toolInfo.rect, pt.x, pt.y); + } + SendMessage(hwndTip, TTM_ADDTOOL, 0, (LPARAM)&toolInfo); SendMessage(hwndTip, TTM_SETDELAYTIME, TTDT_AUTOPOP, MAKELONG(32767,0)); RECT rc; GetClientRect(hDlg, &rc); @@ -405,7 +417,7 @@ static void UpdateDialogStrings(HWND hwnd, const struct dialogstring * const str unsigned i; for (i=0; i < size; i++) { SetDlgItemText(hwnd, strlst[i].idc, L10NSTR(strlst[i].l10nidx)); - //CreateInfoTip(hwnd, strlst[i].idc, L10NSTR(strlst[i].l10nidx)); + CreateInfoTip(hwnd, strlst[i].idc, L10NSTR(strlst[i].l10nidx + 1)); } } // Options to bead or written... @@ -497,28 +509,28 @@ INT_PTR CALLBACK GeneralPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA #undef V static const struct dialogstring strlst[] = { - { IDC_GENERAL_BOX, L10NIDX(general_box) }, - { IDC_AUTOFOCUS, L10NIDX(general_autofocus) }, - { IDC_AERO, L10NIDX(general_aero) }, - { IDC_SMARTAERO, L10NIDX(general_smartaero) }, - { IDC_SMARTERAERO, L10NIDX(general_smarteraero) }, - { IDC_STICKYRESIZE, L10NIDX(general_stickyresize) }, - { IDC_INACTIVESCROLL, L10NIDX(general_inactivescroll) }, - { IDC_MDI, L10NIDX(general_mdi) }, - { IDC_AUTOSNAP_HEADER, L10NIDX(general_autosnap) }, - { IDC_LANGUAGE_HEADER, L10NIDX(general_language) }, - { IDC_USEZONES, L10NIDX(general_usezones) }, - { IDC_PIERCINGCLICK, L10NIDX(general_piercingclick) }, - { IDC_RESIZEALL, L10NIDX(general_resizeall) }, - { IDC_RESIZECENTER, L10NIDX(general_resizecenter) }, - { IDC_RZCENTER_NORM, L10NIDX(general_resizecenter_norm) }, - { IDC_RZCENTER_BR, L10NIDX(general_resizecenter_br) }, - { IDC_RZCENTER_MOVE, L10NIDX(general_resizecenter_move) }, - { IDC_RZCENTER_CLOSE, L10NIDX(general_resizecenter_close) }, - { IDC_AUTOSTART_BOX, L10NIDX(general_autostart_box) }, - { IDC_AUTOSTART, L10NIDX(general_autostart) }, - { IDC_AUTOSTART_HIDE, L10NIDX(general_autostart_hide) }, - { IDC_AUTOSTART_ELEVATE,L10NIDX(general_autostart_elevate) } + { IDC_GENERAL_BOX, L10NIDX(GeneralBox) }, + { IDC_AUTOFOCUS, L10NIDX(GeneralAutoFocus) }, + { IDC_AERO, L10NIDX(GeneralAero) }, + { IDC_SMARTAERO, L10NIDX(GeneralSmartAero) }, + { IDC_SMARTERAERO, L10NIDX(GeneralSmarterAero) }, + { IDC_STICKYRESIZE, L10NIDX(GeneralStickyResize) }, + { IDC_INACTIVESCROLL, L10NIDX(GeneralInactiveScroll) }, + { IDC_MDI, L10NIDX(GeneralMDI) }, + { IDC_AUTOSNAP_HEADER, L10NIDX(GeneralAutoSnap) }, + { IDC_LANGUAGE_HEADER, L10NIDX(GeneralLanguage) }, + { IDC_USEZONES, L10NIDX(GeneralUseZones) }, + { IDC_PIERCINGCLICK, L10NIDX(GeneralPiercingClick) }, + { IDC_RESIZEALL, L10NIDX(GeneralResizeAll) }, + { IDC_RESIZECENTER, L10NIDX(GeneralResizeCenter) }, + { IDC_RZCENTER_NORM, L10NIDX(GeneralResizeCenterNorm) }, + { IDC_RZCENTER_BR, L10NIDX(GeneralResizeCenterBr) }, + { IDC_RZCENTER_MOVE, L10NIDX(GeneralResizeCenterMove) }, + { IDC_RZCENTER_CLOSE, L10NIDX(GeneralResizeCenterClose) }, + { IDC_AUTOSTART_BOX, L10NIDX(GeneralAutostartBox) }, + { IDC_AUTOSTART, L10NIDX(GeneralAutostart) }, + { IDC_AUTOSTART_HIDE, L10NIDX(GeneralAutostartHide) }, + { IDC_AUTOSTART_ELEVATE,L10NIDX(GeneralAutostartElevate) } }; int updatestrings = 0; @@ -539,7 +551,7 @@ INT_PTR CALLBACK GeneralPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA if (langinfo) { for (i = 0; i < nlanguages; i++) { CB_AddString(control, langinfo[i].lang); - if (langinfo[i].code && !lstrcmpi(l10n->code, langinfo[i].code) ) { + if (langinfo[i].code && !lstrcmpi(l10n->Code, langinfo[i].code) ) { CB_SetCurSel(control, i); } } @@ -570,7 +582,7 @@ INT_PTR CALLBACK GeneralPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA } } else if (id == IDC_AUTOSTART_ELEVATE) { if (val && IsUACEnabled()) { - MessageBox(NULL, l10n->general_autostart_elevate_tip, TEXT(APP_NAMEA), MB_ICONINFORMATION | MB_OK); + MessageBox(NULL, l10n->GeneralAutostartElevateTip, TEXT(APP_NAMEA), MB_ICONINFORMATION | MB_OK); } } else if (id == IDC_ELEVATE) { return ElevateNow(1); @@ -603,17 +615,17 @@ INT_PTR CALLBACK GeneralPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA // Load selected Language int i = CB_GetCurSelId(IDC_LANGUAGE); - if (i < nlanguages && langinfo && lstrcmp(l10n->code, langinfo[i].code)) { + if (i < nlanguages && langinfo && lstrcmp(l10n->Code, langinfo[i].code)) { LoadTranslation(langinfo[i].fn); #ifdef UNICODE wchar_t curlang[16]; GetCUserLanguage_xx_XX(curlang); - if (!lstrcmpi(l10n->code, curlang)) // Use Auto if selected language is the current user's one. + if (!lstrcmpi(l10n->Code, curlang)) // Use Auto if selected language is the current user's one. WritePrivateProfileString(TEXT("General"), TEXT("Language"), TEXT("Auto"), inipath); else - WritePrivateProfileString(TEXT("General"), TEXT("Language"), l10n->code, inipath); + WritePrivateProfileString(TEXT("General"), TEXT("Language"), l10n->Code, inipath); #else - WritePrivateProfileString(TEXT("General"), TEXT("Language"), l10n->code, inipath); + WritePrivateProfileString(TEXT("General"), TEXT("Language"), l10n->Code, inipath); #endif updatestrings = 1; UpdateStrings(); @@ -634,15 +646,15 @@ INT_PTR CALLBACK GeneralPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA UpdateDialogStrings(hwnd, strlst, ARR_SZ(strlst)); // spetial case... //CreateToolTip(IDC_AUTOFOCUS, hwnd, TEXT("String\nExample")); - SetDlgItemText(hwnd, IDC_ELEVATE, elevated?l10n->general_elevated: l10n->general_elevate); + SetDlgItemText(hwnd, IDC_ELEVATE, elevated?l10n->GeneralElevated: l10n->GeneralElevate); // AutoSnap HWND control = GetDlgItem(hwnd, IDC_AUTOSNAP); CB_ResetContent(control); - CB_AddString(control, l10n->general_autosnap0); - CB_AddString(control, l10n->general_autosnap1); - CB_AddString(control, l10n->general_autosnap2); - CB_AddString(control, l10n->general_autosnap3); + CB_AddString(control, l10n->GeneralAutoSnap0); + CB_AddString(control, l10n->GeneralAutoSnap1); + CB_AddString(control, l10n->GeneralAutoSnap2); + CB_AddString(control, l10n->GeneralAutoSnap3); TCHAR txt[8]; GetPrivateProfileString(TEXT("General"), TEXT("AutoSnap"), TEXT("0"), txt, ARR_SZ(txt), inipath); CB_SetCurSel(control, strtoi(txt)); @@ -824,42 +836,42 @@ INT_PTR CALLBACK MousePageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }; #define COMMON_ACTIONS \ - {TEXT("Close"), L10NIDX(input_actions_close) }, \ - {TEXT("Kill"), L10NIDX(input_actions_kill) }, \ - {TEXT("Minimize"), L10NIDX(input_actions_minimize) }, \ - {TEXT("Maximize"), L10NIDX(input_actions_maximize) }, \ - {TEXT("Lower"), L10NIDX(input_actions_lower) }, \ - {TEXT("Focus"), L10NIDX(input_actions_focus) }, \ - {TEXT("NStacked"), L10NIDX(input_actions_nstacked) }, \ - {TEXT("PStacked"), L10NIDX(input_actions_pstacked) }, \ - {TEXT("StackList"), L10NIDX(input_actions_stacklist) }, \ - {TEXT("StackList2"), L10NIDX(input_actions_stacklist2) }, \ - {TEXT("AltTabList"), L10NIDX(input_actions_alttablist) }, \ - {TEXT("AltTabFullList"), L10NIDX(input_actions_alttabfulllist) }, \ - {TEXT("Roll"), L10NIDX(input_actions_roll) }, \ - {TEXT("AlwaysOnTop"), L10NIDX(input_actions_alwaysontop) }, \ - {TEXT("Borderless"), L10NIDX(input_actions_borderless) }, \ - {TEXT("Center"), L10NIDX(input_actions_center) }, \ - {TEXT("MaximizeHV"), L10NIDX(input_actions_maximizehv) }, \ - {TEXT("SideSnap"), L10NIDX(input_actions_sidesnap) }, \ - {TEXT("ExtendSnap"), L10NIDX(input_actions_extendsnap) }, \ - {TEXT("ExtendTNEdge"),L10NIDX(input_actions_extendtnedge) }, \ - {TEXT("MoveTNEdge"), L10NIDX(input_actions_movetnedge) }, \ - {TEXT("MinAllOther"), L10NIDX(input_actions_minallother) }, \ - {TEXT("Mute"), L10NIDX(input_actions_mute) }, \ - {TEXT("Menu"), L10NIDX(input_actions_menu) }, \ + {TEXT("Close"), L10NIDX(InputActionClose) }, \ + {TEXT("Kill"), L10NIDX(InputActionKill) }, \ + {TEXT("Minimize"), L10NIDX(InputActionMinimize) }, \ + {TEXT("Maximize"), L10NIDX(InputActionMaximize) }, \ + {TEXT("Lower"), L10NIDX(InputActionLower) }, \ + {TEXT("Focus"), L10NIDX(InputActionFocus) }, \ + {TEXT("NStacked"), L10NIDX(InputActionNStacked) }, \ + {TEXT("PStacked"), L10NIDX(InputActionPStacked) }, \ + {TEXT("StackList"), L10NIDX(InputActionStackList) }, \ + {TEXT("StackList2"), L10NIDX(InputActionStackList2) }, \ + {TEXT("AltTabList"), L10NIDX(InputActionAltTabList) }, \ + {TEXT("AltTabFullList"), L10NIDX(InputActionAltTabFullList) }, \ + {TEXT("Roll"), L10NIDX(InputActionRoll) }, \ + {TEXT("AlwaysOnTop"), L10NIDX(InputActionAlwaysOnTop) }, \ + {TEXT("Borderless"), L10NIDX(InputActionBorderless) }, \ + {TEXT("Center"), L10NIDX(InputActionCenter) }, \ + {TEXT("MaximizeHV"), L10NIDX(InputActionMaximizeHV) }, \ + {TEXT("SideSnap"), L10NIDX(InputActionSideSnap) }, \ + {TEXT("ExtendSnap"), L10NIDX(InputActionExtendSnap) }, \ + {TEXT("ExtendTNEdge"),L10NIDX(InputActionExtendTNEdge) }, \ + {TEXT("MoveTNEdge"), L10NIDX(InputActionMoveTNEdge) }, \ + {TEXT("MinAllOther"), L10NIDX(InputActionMinAllOther) }, \ + {TEXT("Mute"), L10NIDX(InputActionMute) }, \ + {TEXT("Menu"), L10NIDX(InputActionMenu) }, \ static const struct actiondl mouse_actions[] = { // Specific to the Primary/Alternate/Titlebar // And not available for the MoveUp/ResizeUp - {TEXT("Move"), L10NIDX(input_actions_move) }, - {TEXT("Resize"), L10NIDX(input_actions_resize) }, - {TEXT("Restore"), L10NIDX(input_actions_restore) }, + {TEXT("Move"), L10NIDX(InputActionMove) }, + {TEXT("Resize"), L10NIDX(InputActionResize) }, + {TEXT("Restore"), L10NIDX(InputActionRestore) }, // Common mouse actions COMMON_ACTIONS - {TEXT("Nothing"), L10NIDX(input_actions_nothing) }, + {TEXT("Nothing"), L10NIDX(InputActionNothing) }, {NULL, 0} }; @@ -890,18 +902,18 @@ INT_PTR CALLBACK MousePageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM }; static const struct actiondl scroll_actions[] = { - {TEXT("AltTab"), L10NIDX(input_actions_alttab) }, - {TEXT("Volume"), L10NIDX(input_actions_volume) }, - {TEXT("Transparency"), L10NIDX(input_actions_transparency) }, - {TEXT("Zoom"), L10NIDX(input_actions_zoom) }, - {TEXT("Zoom2"), L10NIDX(input_actions_zoom2) }, - {TEXT("Lower"), L10NIDX(input_actions_lower) }, - {TEXT("Roll"), L10NIDX(input_actions_roll) }, - {TEXT("Maximize"), L10NIDX(input_actions_maximize) }, - {TEXT("NPStacked"), L10NIDX(input_actions_npstacked) }, - {TEXT("NPStacked2"), L10NIDX(input_actions_npstacked2) }, - {TEXT("HScroll"), L10NIDX(input_actions_hscroll) }, - {TEXT("Nothing"), L10NIDX(input_actions_nothing) }, + {TEXT("AltTab"), L10NIDX(InputActionAltTab) }, + {TEXT("Volume"), L10NIDX(InputActionVolume) }, + {TEXT("Transparency"), L10NIDX(InputActionTransparency) }, + {TEXT("Zoom"), L10NIDX(InputActionZoom) }, + {TEXT("Zoom2"), L10NIDX(InputActionZoom2) }, + {TEXT("Lower"), L10NIDX(InputActionLower) }, + {TEXT("Roll"), L10NIDX(InputActionRoll) }, + {TEXT("Maximize"), L10NIDX(InputActionMaximize) }, + {TEXT("NPStacked"), L10NIDX(InputActionNStacked) }, + {TEXT("NPStacked2"), L10NIDX(InputActionNStacked2) }, + {TEXT("HScroll"), L10NIDX(InputActionHScroll) }, + {TEXT("Nothing"), L10NIDX(InputActionNothing) }, {NULL, 0} }; @@ -974,32 +986,32 @@ INT_PTR CALLBACK MousePageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM // Update text static const struct dialogstring strlst[] = { - { IDC_MBA1, L10NIDX(input_mouse_btac1 ) }, - { IDC_MBA2, L10NIDX(input_mouse_btac2 ) }, - { IDC_INTTB, L10NIDX(input_mouse_inttb ) }, - { IDC_WHILEM, L10NIDX(input_mouse_whilem ) }, - { IDC_WHILER, L10NIDX(input_mouse_whiler ) }, - - { IDC_MOUSE_BOX, L10NIDX(input_mouse_box ) }, - { IDC_LMB_HEADER, L10NIDX(input_mouse_lmb ) }, - { IDC_MMB_HEADER, L10NIDX(input_mouse_mmb ) }, - { IDC_RMB_HEADER, L10NIDX(input_mouse_rmb ) }, - { IDC_MB4_HEADER, L10NIDX(input_mouse_mb4 ) }, - { IDC_MB5_HEADER, L10NIDX(input_mouse_mb5 ) }, - { IDC_SCROLL_HEADER, L10NIDX(input_mouse_scroll ) }, - { IDC_HSCROLL_HEADER, L10NIDX(input_mouse_hscroll ) }, - { IDC_MOVEUP_HEADER, L10NIDX(input_mouse_moveup ) }, - { IDC_RESIZEUP_HEADER, L10NIDX(input_mouse_resizeup ) }, - { IDC_TTBACTIONS_BOX, L10NIDX(input_mouse_ttbactions_box ) }, - { IDC_TTBACTIONSNA, L10NIDX(input_mouse_ttbactionsna ) }, - { IDC_TTBACTIONSWA, L10NIDX(input_mouse_ttbactionswa ) }, - - { IDC_HOTCLICKS_BOX, L10NIDX(input_hotclicks_box ) }, - { IDC_HOTCLICKS_MORE, L10NIDX(input_hotclicks_more ) }, - { IDC_MMB_HC, L10NIDX(input_mouse_mmb_hc ) }, - { IDC_MB4_HC, L10NIDX(input_mouse_mb4_hc ) }, - { IDC_MB5_HC, L10NIDX(input_mouse_mb5_hc ) }, - { IDC_LONGCLICKMOVE, L10NIDX(input_mouse_longclickmove ) }, + { IDC_MOUSE_BOX, L10NIDX(InputMouseBox ) }, + { IDC_MBA1, L10NIDX(InputMouseBtAc1 ) }, + { IDC_MBA2, L10NIDX(InputMouseBtAc2 ) }, + { IDC_INTTB, L10NIDX(InputMouseINTTB ) }, + { IDC_WHILEM, L10NIDX(InputMouseWhileM ) }, + { IDC_WHILER, L10NIDX(InputMouseWhileR ) }, + + { IDC_LMB_HEADER, L10NIDX(InputMouseLMB ) }, + { IDC_MMB_HEADER, L10NIDX(InputMouseMMB ) }, + { IDC_RMB_HEADER, L10NIDX(InputMouseRMB ) }, + { IDC_MB4_HEADER, L10NIDX(InputMouseMB4 ) }, + { IDC_MB5_HEADER, L10NIDX(InputMouseMB5 ) }, + { IDC_SCROLL_HEADER, L10NIDX(InputMouseScroll ) }, + { IDC_HSCROLL_HEADER, L10NIDX(InputMouseHScroll ) }, + { IDC_MOVEUP_HEADER, L10NIDX(InputMouseMoveUp ) }, + { IDC_RESIZEUP_HEADER, L10NIDX(InputMouseResizeUp ) }, + { IDC_TTBACTIONS_BOX, L10NIDX(InputMouseTTBActionBox ) }, + { IDC_TTBACTIONSNA, L10NIDX(InputMouseTTBActionNA ) }, + { IDC_TTBACTIONSWA, L10NIDX(InputMouseTTBActionWA ) }, + + { IDC_HOTCLICKS_BOX, L10NIDX(InputHotclicksBox ) }, + { IDC_HOTCLICKS_MORE, L10NIDX(InputHotclicksMore ) }, + { IDC_MMB_HC, L10NIDX(InputMouseMMBHC ) }, + { IDC_MB4_HC, L10NIDX(InputMouseMB4HC ) }, + { IDC_MB5_HC, L10NIDX(InputMouseMB5HC ) }, + { IDC_LONGCLICKMOVE, L10NIDX(InputMouseLongClickMove ) }, }; UpdateDialogStrings(hwnd, strlst, ARR_SZ(strlst)); } @@ -1118,95 +1130,95 @@ INT_PTR CALLBACK KeyboardPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR { 0, 0 } }; static const struct actiondl kb_actions[] = { - {TEXT("Move"), L10NIDX(input_actions_move) }, - {TEXT("Resize"), L10NIDX(input_actions_resize) }, - {TEXT("Close"), L10NIDX(input_actions_close) }, - {TEXT("Minimize"), L10NIDX(input_actions_minimize) }, - {TEXT("Maximize"), L10NIDX(input_actions_maximize) }, - {TEXT("Lower"), L10NIDX(input_actions_lower) }, - {TEXT("Roll"), L10NIDX(input_actions_roll) }, - {TEXT("AlwaysOnTop"), L10NIDX(input_actions_alwaysontop) }, - {TEXT("Borderless"), L10NIDX(input_actions_borderless) }, - {TEXT("Center"), L10NIDX(input_actions_center) }, - {TEXT("MaximizeHV"), L10NIDX(input_actions_maximizehv) }, - {TEXT("MinAllOther"), L10NIDX(input_actions_minallother) }, - {TEXT("Menu"), L10NIDX(input_actions_menu) }, - {TEXT("Nothing"), L10NIDX(input_actions_nothing) }, + {TEXT("Move"), L10NIDX(InputActionMove) }, + {TEXT("Resize"), L10NIDX(InputActionResize) }, + {TEXT("Close"), L10NIDX(InputActionClose) }, + {TEXT("Minimize"), L10NIDX(InputActionMinimize) }, + {TEXT("Maximize"), L10NIDX(InputActionMaximize) }, + {TEXT("Lower"), L10NIDX(InputActionLower) }, + {TEXT("Roll"), L10NIDX(InputActionRoll) }, + {TEXT("AlwaysOnTop"), L10NIDX(InputActionAlwaysOnTop) }, + {TEXT("Borderless"), L10NIDX(InputActionBorderless) }, + {TEXT("Center"), L10NIDX(InputActionCenter) }, + {TEXT("MaximizeHV"), L10NIDX(InputActionMaximizeHV) }, + {TEXT("MinAllOther"), L10NIDX(InputActionMinAllOther) }, + {TEXT("Menu"), L10NIDX(InputActionMenu) }, + {TEXT("Nothing"), L10NIDX(InputActionNothing) }, {NULL, 0} }; static const struct actiondl kbshortcut_actions[] = { - {TEXT("Kill"), L10NIDX(input_actions_kill) }, - {TEXT("Pause"), L10NIDX(input_actions_pause) }, - {TEXT("Resume"), L10NIDX(input_actions_resume) }, - {TEXT("ASOnOff"), L10NIDX(input_actions_asonoff) }, - {TEXT("Lower"), L10NIDX(input_actions_lower) }, - {TEXT("Roll"), L10NIDX(input_actions_roll) }, - {TEXT("AlwaysOnTop"), L10NIDX(input_actions_alwaysontop) }, - {TEXT("Borderless"), L10NIDX(input_actions_borderless) }, - {TEXT("Center"), L10NIDX(input_actions_center) }, - {TEXT("Mute"), L10NIDX(input_actions_mute) }, - {TEXT("Menu"), L10NIDX(input_actions_menu) }, - - {TEXT("NStacked"), L10NIDX(input_actions_nstacked) }, - {TEXT("NStacked2"), L10NIDX(input_actions_nstacked2) }, - {TEXT("PStacked"), L10NIDX(input_actions_pstacked) }, - {TEXT("PStacked2"), L10NIDX(input_actions_pstacked2) }, - {TEXT("StackList"), L10NIDX(input_actions_stacklist) }, - {TEXT("StackList2"), L10NIDX(input_actions_stacklist2) }, - {TEXT("AltTabList"), L10NIDX(input_actions_alttablist) }, - {TEXT("AltTabFullList"),L10NIDX(input_actions_alttabfulllist) }, - - {TEXT("ExtendTNEdge"),L10NIDX(input_actions_extendtnedge) }, - {TEXT("XTNLEdge"), L10NIDX(input_actions_xtnledge) }, - {TEXT("XTNTEdge"), L10NIDX(input_actions_xtntedge) }, - {TEXT("XTNREdge"), L10NIDX(input_actions_xtnredge) }, - {TEXT("XTNBEdge"), L10NIDX(input_actions_xtnbedge) }, - {TEXT("MoveTNEdge"), L10NIDX(input_actions_movetnedge) }, - {TEXT("MTNLEdge"), L10NIDX(input_actions_mtnledge) }, - {TEXT("MTNTEdge"), L10NIDX(input_actions_mtntedge) }, - {TEXT("MTNREdge"), L10NIDX(input_actions_mtnredge) }, - {TEXT("MTNBEdge"), L10NIDX(input_actions_mtnbedge) }, - - {TEXT("MLZone"), L10NIDX(input_actions_mlzone) }, - {TEXT("MTZone"), L10NIDX(input_actions_mtzone) }, - {TEXT("MRZone"), L10NIDX(input_actions_mrzone) }, - {TEXT("MBZone"), L10NIDX(input_actions_mbzone) }, - {TEXT("XLZone"), L10NIDX(input_actions_xlzone) }, - {TEXT("XTZone"), L10NIDX(input_actions_xtzone) }, - {TEXT("XRZone"), L10NIDX(input_actions_xrzone) }, - {TEXT("XBZone"), L10NIDX(input_actions_xbzone) }, - - {TEXT("StepL"), L10NIDX(input_actions_stepl) }, - {TEXT("StepT"), L10NIDX(input_actions_stept) }, - {TEXT("StepR"), L10NIDX(input_actions_stepr) }, - {TEXT("StepB"), L10NIDX(input_actions_stepb) }, - {TEXT("SStepL"), L10NIDX(input_actions_sstepl) }, - {TEXT("SStepT"), L10NIDX(input_actions_sstept) }, - {TEXT("SStepR"), L10NIDX(input_actions_sstepr) }, - {TEXT("SStepB"), L10NIDX(input_actions_sstepb) }, - - {TEXT("FocusL"), L10NIDX(input_actions_focusl) }, - {TEXT("FocusT"), L10NIDX(input_actions_focust) }, - {TEXT("FocusR"), L10NIDX(input_actions_focusr) }, - {TEXT("FocusB"), L10NIDX(input_actions_focusb) }, + {TEXT("Kill"), L10NIDX(InputActionKill) }, + {TEXT("Pause"), L10NIDX(InputActionPause) }, + {TEXT("Resume"), L10NIDX(InputActionResume) }, + {TEXT("ASOnOff"), L10NIDX(InputActionASOnOff) }, + {TEXT("Lower"), L10NIDX(InputActionLower) }, + {TEXT("Roll"), L10NIDX(InputActionRoll) }, + {TEXT("AlwaysOnTop"), L10NIDX(InputActionAlwaysOnTop) }, + {TEXT("Borderless"), L10NIDX(InputActionBorderless) }, + {TEXT("Center"), L10NIDX(InputActionCenter) }, + {TEXT("Mute"), L10NIDX(InputActionMute) }, + {TEXT("Menu"), L10NIDX(InputActionMenu) }, + + {TEXT("NStacked"), L10NIDX(InputActionNStacked) }, + {TEXT("NStacked2"), L10NIDX(InputActionNStacked2) }, + {TEXT("PStacked"), L10NIDX(InputActionPStacked) }, + {TEXT("PStacked2"), L10NIDX(InputActionPStacked2) }, + {TEXT("StackList"), L10NIDX(InputActionStackList) }, + {TEXT("StackList2"), L10NIDX(InputActionStackList2) }, + {TEXT("AltTabList"), L10NIDX(InputActionAltTabList) }, + {TEXT("AltTabFullList"),L10NIDX(InputActionAltTabFullList) }, + + {TEXT("ExtendTNEdge"),L10NIDX(InputActionExtendTNEdge) }, + {TEXT("XTNLEdge"), L10NIDX(InputActionXTNLEdge) }, + {TEXT("XTNTEdge"), L10NIDX(InputActionXTNTEdge) }, + {TEXT("XTNREdge"), L10NIDX(InputActionXTNREdge) }, + {TEXT("XTNBEdge"), L10NIDX(InputActionXTNBEdge) }, + {TEXT("MoveTNEdge"), L10NIDX(InputActionMoveTNEdge) }, + {TEXT("MTNLEdge"), L10NIDX(InputActionMTNLEdge) }, + {TEXT("MTNTEdge"), L10NIDX(InputActionMTNTEdge) }, + {TEXT("MTNREdge"), L10NIDX(InputActionMTNREdge) }, + {TEXT("MTNBEdge"), L10NIDX(InputActionMTNBEdge) }, + + {TEXT("MLZone"), L10NIDX(InputActionMLZone) }, + {TEXT("MTZone"), L10NIDX(InputActionMTZone) }, + {TEXT("MRZone"), L10NIDX(InputActionMRZone) }, + {TEXT("MBZone"), L10NIDX(InputActionMBZone) }, + {TEXT("XLZone"), L10NIDX(InputActionXLZone) }, + {TEXT("XTZone"), L10NIDX(InputActionXTZone) }, + {TEXT("XRZone"), L10NIDX(InputActionXRZone) }, + {TEXT("XBZone"), L10NIDX(InputActionXBZone) }, + + {TEXT("StepL"), L10NIDX(InputActionStepL) }, + {TEXT("StepT"), L10NIDX(InputActionStepT) }, + {TEXT("StepR"), L10NIDX(InputActionStepR) }, + {TEXT("StepB"), L10NIDX(InputActionStepB) }, + {TEXT("SStepL"), L10NIDX(InputActionSStepL) }, + {TEXT("SStepT"), L10NIDX(InputActionSStepT) }, + {TEXT("SStepR"), L10NIDX(InputActionSStepR) }, + {TEXT("SStepB"), L10NIDX(InputActionSStepB) }, + + {TEXT("FocusL"), L10NIDX(InputActionFocusL) }, + {TEXT("FocusT"), L10NIDX(InputActionFocusT) }, + {TEXT("FocusR"), L10NIDX(InputActionFocusR) }, + {TEXT("FocusB"), L10NIDX(InputActionFocusB) }, {NULL, 0} }; // Hotkeys static const struct actiondl togglekeys[] = { - {TEXT(""), L10NIDX(input_actions_nothing)}, - {TEXT("A4 A5"), L10NIDX(input_hotkeys_alt)}, - {TEXT("5B 5C"), L10NIDX(input_hotkeys_winkey)}, - {TEXT("A2 A3"), L10NIDX(input_hotkeys_ctrl)}, - {TEXT("A0 A1"), L10NIDX(input_hotkeys_shift)}, - {TEXT("A4"), L10NIDX(input_hotkeys_leftalt)}, - {TEXT("A5"), L10NIDX(input_hotkeys_rightalt)}, - {TEXT("5B"), L10NIDX(input_hotkeys_leftwinkey)}, - {TEXT("5C"), L10NIDX(input_hotkeys_rightwinkey)}, - {TEXT("A2"), L10NIDX(input_hotkeys_leftctrl)}, - {TEXT("A3"), L10NIDX(input_hotkeys_rightctrl)}, - {TEXT("A0"), L10NIDX(input_hotkeys_leftshift)}, - {TEXT("A1"), L10NIDX(input_hotkeys_rightshift)}, + {TEXT(""), L10NIDX(InputActionNothing)}, + {TEXT("A4 A5"), L10NIDX(InputHotkeysAlt)}, + {TEXT("5B 5C"), L10NIDX(InputHotkeysWinkey)}, + {TEXT("A2 A3"), L10NIDX(InputHotkeysCtrl)}, + {TEXT("A0 A1"), L10NIDX(InputHotkeysShift)}, + {TEXT("A4"), L10NIDX(InputHotkeysLeftAlt)}, + {TEXT("A5"), L10NIDX(InputHotkeysRightAlt)}, + {TEXT("5B"), L10NIDX(InputHotkeysLeftWinkey)}, + {TEXT("5C"), L10NIDX(InputHotkeysRightWinkey)}, + {TEXT("A2"), L10NIDX(InputHotkeysLeftCtrl)}, + {TEXT("A3"), L10NIDX(InputHotkeysRightCtrl)}, + {TEXT("A0"), L10NIDX(InputHotkeysLeftShift)}, + {TEXT("A1"), L10NIDX(InputHotkeysRightShift)}, {NULL, 0}, }; static const struct optlst optlst[] = { @@ -1365,31 +1377,31 @@ INT_PTR CALLBACK KeyboardPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR // Update text static const struct dialogstring strlst[] = { - { IDC_KEYBOARD_BOX, L10NIDX(tab_keyboard) }, - { IDC_SCROLLLOCKSTATE, L10NIDX(input_scrolllockstate) }, - { IDC_UNIKEYHOLDMENU, L10NIDX(input_unikeyholdmenu) }, - { IDC_HOTKEYS_BOX, L10NIDX(input_hotkeys_box) }, - { IDC_MODKEY_H, L10NIDX(input_hotkeys_modkey) }, - - { IDC_ALT, L10NIDX(input_hotkeys_alt) }, - { IDC_SHIFT, L10NIDX(input_hotkeys_shift) }, - { IDC_CONTROL, L10NIDX(input_hotkeys_ctrl) }, - { IDC_WINKEY, L10NIDX(input_hotkeys_winkey) }, - { IDC_SHORTCUTS_H, L10NIDX(input_hotkeys_shortcuts) }, - { IDC_SHORTCUTS_PICK, L10NIDX(input_hotkeys_shortcutspick) }, - { IDC_SHORTCUTS_CLEAR, L10NIDX(input_hotkeys_shortcutsclear) }, - { IDC_SHORTCUTS_SET, L10NIDX(input_hotkeys_shortcutset) }, - { IDC_USEPTWINDOW, L10NIDX(input_hotkeys_useptwindow) }, - { IDC_LEFTALT, L10NIDX(input_hotkeys_leftalt) }, - { IDC_RIGHTALT, L10NIDX(input_hotkeys_rightalt) }, - { IDC_LEFTWINKEY, L10NIDX(input_hotkeys_leftwinkey) }, - { IDC_RIGHTWINKEY, L10NIDX(input_hotkeys_rightwinkey) }, - { IDC_LEFTCTRL, L10NIDX(input_hotkeys_leftctrl) }, - { IDC_RIGHTCTRL, L10NIDX(input_hotkeys_rightctrl) }, - { IDC_HOTKEYS_MORE, L10NIDX(input_hotkeys_more) }, - { IDC_KEYCOMBO, L10NIDX(input_keycombo) }, - { IDC_GRABWITHALT_H, L10NIDX(input_grabwithalt) }, - { IDC_GRABWITHALTB_H, L10NIDX(input_grabwithaltb) } + { IDC_KEYBOARD_BOX, L10NIDX(ConfigTabKeyboard) }, + { IDC_SCROLLLOCKSTATE, L10NIDX(InputScrollLockState) }, + { IDC_UNIKEYHOLDMENU, L10NIDX(InputUniKeyHoldMenu) }, + { IDC_HOTKEYS_BOX, L10NIDX(InputHotkeysBox) }, + { IDC_MODKEY_H, L10NIDX(InputHotkeysModKey) }, + + { IDC_ALT, L10NIDX(InputHotkeysAlt) }, + { IDC_SHIFT, L10NIDX(InputHotkeysShift) }, + { IDC_CONTROL, L10NIDX(InputHotkeysCtrl) }, + { IDC_WINKEY, L10NIDX(InputHotkeysWinkey) }, + { IDC_SHORTCUTS_H, L10NIDX(InputHotkeysShortcuts) }, + { IDC_SHORTCUTS_PICK, L10NIDX(InputHotkeysShortcutsPick) }, + { IDC_SHORTCUTS_CLEAR, L10NIDX(InputHotkeysShortcutsClear) }, + { IDC_SHORTCUTS_SET, L10NIDX(InputHotkeysShortcutsSet) }, + { IDC_USEPTWINDOW, L10NIDX(InputHotkeysUsePtWindow) }, + { IDC_LEFTALT, L10NIDX(InputHotkeysLeftAlt) }, + { IDC_RIGHTALT, L10NIDX(InputHotkeysRightAlt) }, + { IDC_LEFTWINKEY, L10NIDX(InputHotkeysLeftWinkey) }, + { IDC_RIGHTWINKEY, L10NIDX(InputHotkeysRightWinkey) }, + { IDC_LEFTCTRL, L10NIDX(InputHotkeysLeftCtrl) }, + { IDC_RIGHTCTRL, L10NIDX(InputHotkeysRightCtrl) }, + { IDC_HOTKEYS_MORE, L10NIDX(InputHotkeysMore) }, + { IDC_KEYCOMBO, L10NIDX(InputKeyCombo) }, + { IDC_GRABWITHALT_H, L10NIDX(InputGrabWithAlt) }, + { IDC_GRABWITHALTB_H, L10NIDX(InputGrabWithAltB) } }; UpdateDialogStrings(hwnd, strlst, ARR_SZ(strlst)); @@ -1475,13 +1487,13 @@ INT_PTR CALLBACK BlacklistPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPA if (pnmh->code == PSN_SETACTIVE) { // Update text static const struct dialogstring strlst[] = { - { IDC_BLACKLIST_BOX , L10NIDX(blacklist_box ) }, - { IDC_PROCESSBLACKLIST_HEADER, L10NIDX(blacklist_processblacklist ) }, - { IDC_BLACKLIST_HEADER , L10NIDX(blacklist_blacklist ) }, - { IDC_SCROLLLIST_HEADER , L10NIDX(blacklist_scrolllist ) }, - { IDC_MDISBL_HEADER , L10NIDX(blacklist_mdis ) }, - { IDC_PAUSEBL_HEADER , L10NIDX(blacklist_pause ) }, - { IDC_FINDWINDOW_BOX , L10NIDX(blacklist_findwindow_box ) } + { IDC_BLACKLIST_BOX , L10NIDX(BlacklistBox ) }, + { IDC_PROCESSBLACKLIST_HEADER, L10NIDX(BlacklistProcessBlacklist ) }, + { IDC_BLACKLIST_HEADER , L10NIDX(BlacklistBlacklist ) }, + { IDC_SCROLLLIST_HEADER , L10NIDX(BlacklistScrolllist ) }, + { IDC_MDISBL_HEADER , L10NIDX(BlacklistMDIs ) }, + { IDC_PAUSEBL_HEADER , L10NIDX(BlacklistPause ) }, + { IDC_FINDWINDOW_BOX , L10NIDX(BlacklistFindWindowBox ) } }; UpdateDialogStrings(hwnd, strlst, ARR_SZ(strlst)); // Enable or disable buttons if needed @@ -1581,13 +1593,13 @@ INT_PTR CALLBACK AboutPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM LPNMHDR pnmh = (LPNMHDR) lParam; if (pnmh->code == PSN_SETACTIVE) { // Update text - SetDlgItemText(hwnd, IDC_ABOUT_BOX, l10n->about_box); - SetDlgItemText(hwnd, IDC_VERSION, l10n->about_version); + SetDlgItemText(hwnd, IDC_ABOUT_BOX, l10n->AboutBox); + SetDlgItemText(hwnd, IDC_VERSION, l10n->AboutVersion); SetDlgItemText(hwnd, IDC_URL, TEXT("https://github.com/RamonUnch/AltSnap")); - SetDlgItemText(hwnd, IDC_AUTHOR, l10n->about_author); - SetDlgItemText(hwnd, IDC_AUTHOR2, l10n->about_author2); - SetDlgItemText(hwnd, IDC_LICENSE, l10n->about_license); - SetDlgItemText(hwnd, IDC_TRANSLATIONS_BOX, l10n->about_translation_credit); + SetDlgItemText(hwnd, IDC_AUTHOR, l10n->AboutAuthor); + SetDlgItemText(hwnd, IDC_AUTHOR2, l10n->AboutAuthor2); + SetDlgItemText(hwnd, IDC_LICENSE, l10n->AboutLicense); + SetDlgItemText(hwnd, IDC_TRANSLATIONS_BOX, l10n->AboutTranslationCredit); TCHAR txt[1024] = TEXT(""); int i; @@ -1745,6 +1757,24 @@ LRESULT CALLBACK TestWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara lks->idx = idx; } break; + case WM_MOVE: + case WM_SIZE: { + TCHAR num[INT_DIGITS*4+4+1]; + TCHAR title[256+INT_DIGITS*4+4]; + RECT rc; + GetWindowRectL(hwnd, &rc); + lstrcpy_noaccel(title, l10n->AdvancedTestWindow, ARR_SZ(title)); + lstrcat_s(title, ARR_SZ(title), TEXT(": ")); + lstrcat_s(title, ARR_SZ(title), RectToStr(&rc, num)); + + lstrcat_s(title, ARR_SZ(title), TEXT(" (")); + lstrcat_s(title, ARR_SZ(title), Int2lStr(num, rc.right-rc.left)); + lstrcat_s(title, ARR_SZ(title), TEXT("x")); + lstrcat_s(title, ARR_SZ(title), Int2lStr(num, rc.bottom-rc.top)); + lstrcat_s(title, ARR_SZ(title), TEXT(")")); + SetWindowText(hwnd, title); + + }break; case WM_PAINT: { if(!GetUpdateRect(hwnd, NULL, FALSE)) return 0; /* We must keep track of pens and delete them. */ @@ -1879,7 +1909,7 @@ LRESULT CALLBACK TestWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara RECT trc = {lineheight/2, crc.bottom-lineheight*(MAXLINES-i), crc.right, crc.bottom}; DrawText(hdc, lastkey[didx], lstrlen(lastkey[didx]), &trc, DT_NOCLIP|DT_TABSTOP); } - TCHAR *str = l10n->zone_testwinhelp; + TCHAR *str = l10n->MiscZoneTestWinHelp; if (UseZones&1) { RECT trc2 = { lineheight/2, lineheight/2, crc.right, splitheight }; DrawText(hdc, str, lstrlen(str), &trc2, DT_NOCLIP|DT_TABSTOP); @@ -1936,7 +1966,7 @@ static HWND NewTestWindow() RegisterClassEx(&wndd); } TCHAR wintitle[256]; - lstrcpy_noaccel(wintitle, l10n->advanced_testwindow, ARR_SZ(wintitle)); + lstrcpy_noaccel(wintitle, l10n->AdvancedTestWindow, ARR_SZ(wintitle)); testwnd = CreateWindowEx(0 , TEXT(APP_NAMEA)TEXT("-Test"), wintitle , WS_OVERLAPPEDWINDOW @@ -2012,29 +2042,29 @@ INT_PTR CALLBACK AdvancedPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR if (pnmh->code == PSN_SETACTIVE) { // Update text static const struct dialogstring strlst[] = { - { IDC_METRICS_BOX, L10NIDX(advanced_metrics_box ) }, - { IDC_CENTERFRACTION_H, L10NIDX(advanced_centerfraction ) }, - { IDC_AEROHOFFSET_H, L10NIDX(advanced_aerohoffset ) }, - { IDC_AEROVOFFSET_H, L10NIDX(advanced_aerovoffset ) }, - { IDC_SNAPTHRESHOLD_H, L10NIDX(advanced_snapthreshold ) }, - { IDC_AEROTHRESHOLD_H, L10NIDX(advanced_aerothreshold ) }, - { IDC_SNAPGAP_H, L10NIDX(advanced_snapgap ) }, - { IDC_AEROSPEED_H, L10NIDX(advanced_aerospeed ) }, - { IDC_MOVETRANS_H, L10NIDX(advanced_movetrans ) }, - { IDC_TESTWINDOW, L10NIDX(advanced_testwindow ) }, - - { IDC_BEHAVIOR_BOX, L10NIDX(advanced_behavior_box ) }, - { IDC_MULTIPLEINSTANCES,L10NIDX(advanced_multipleinstances ) }, - { IDC_AUTOREMAXIMIZE, L10NIDX(advanced_autoremaximize ) }, - { IDC_AEROTOPMAXIMIZES, L10NIDX(advanced_aerotopmaximizes ) }, - { IDC_AERODBCLICKSHIFT, L10NIDX(advanced_aerodbclickshift ) }, - { IDC_MAXWITHLCLICK, L10NIDX(advanced_maxwithlclick ) }, - { IDC_RESTOREONCLICK, L10NIDX(advanced_restoreonclick ) }, - { IDC_FULLSCREEN, L10NIDX(advanced_fullscreen ) }, - { IDC_BLMAXIMIZED, L10NIDX(advanced_blmaximized ) }, - { IDC_FANCYZONE, L10NIDX(advanced_fancyzone ) }, - { IDC_NORESTORE, L10NIDX(advanced_norestore ) }, - { IDC_TOPMOSTINDICATOR, L10NIDX(advanced_topmostindicator ) }, + { IDC_METRICS_BOX, L10NIDX(AdvancedMetricsBox ) }, + { IDC_CENTERFRACTION_H, L10NIDX(AdvancedCenterFraction ) }, + { IDC_AEROHOFFSET_H, L10NIDX(AdvancedAeroHoffset ) }, + { IDC_AEROVOFFSET_H, L10NIDX(AdvancedAeroVoffset ) }, + { IDC_SNAPTHRESHOLD_H, L10NIDX(AdvancedSnapThreshold ) }, + { IDC_AEROTHRESHOLD_H, L10NIDX(AdvancedAeroThreshold ) }, + { IDC_SNAPGAP_H, L10NIDX(AdvancedSnapGap ) }, + { IDC_AEROSPEED_H, L10NIDX(AdvancedAeroSpeed ) }, + { IDC_MOVETRANS_H, L10NIDX(AdvancedMoveTrans ) }, + { IDC_TESTWINDOW, L10NIDX(AdvancedTestWindow ) }, + + { IDC_BEHAVIOR_BOX, L10NIDX(AdvancedBehaviorBox ) }, + { IDC_MULTIPLEINSTANCES,L10NIDX(AdvancedMultipleInstances ) }, + { IDC_AUTOREMAXIMIZE, L10NIDX(AdvancedAutoRemaximize ) }, + { IDC_AEROTOPMAXIMIZES, L10NIDX(AdvancedAeroTopMaximizes ) }, + { IDC_AERODBCLICKSHIFT, L10NIDX(AdvancedAeroDBClickShift ) }, + { IDC_MAXWITHLCLICK, L10NIDX(AdvancedMaxWithLClick ) }, + { IDC_RESTOREONCLICK, L10NIDX(AdvancedRestoreOnClick ) }, + { IDC_FULLSCREEN, L10NIDX(AdvancedFullScreen ) }, + { IDC_BLMAXIMIZED, L10NIDX(AdvancedBLMaximized ) }, + { IDC_FANCYZONE, L10NIDX(AdvancedFancyZone ) }, + { IDC_NORESTORE, L10NIDX(AdvancedNoRestore ) }, + { IDC_TOPMOSTINDICATOR, L10NIDX(AdvancedTopmostIndicator ) }, }; UpdateDialogStrings(hwnd, strlst, ARR_SZ(strlst)); diff --git a/hooks.c b/hooks.c index accfbdb..19012fb 100644 --- a/hooks.c +++ b/hooks.c @@ -3918,6 +3918,8 @@ static void CenterWindow(HWND hwnd, unsigned flags) //#define EVENT_HOOK // TODO: Event Hook #ifdef EVENT_HOOK +#include "thunks.c" + static HWND GetPinWindow(HWND owner); static BOOL CALLBACK PostPinWindowsProcMessage(HWND hwnd, LPARAM lp); static void CALLBACK HandleWinEvent( @@ -3925,20 +3927,23 @@ static void CALLBACK HandleWinEvent( LONG idObject, LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime) { - HWND pinhwnd = (HWND) hook; // 1st param... - if (hwnd - && (event == EVENT_OBJECT_DESTROY || event == EVENT_OBJECT_LOCATIONCHANGE - || event == EVENT_SYSTEM_FOREGROUND || event == 0xB || event == 0xA) - && idChild == INDEXID_CONTAINER - && idObject == OBJID_WINDOW) { - if (pinhwnd && GetParent(pinhwnd) == hwnd) { - //TCHAR txt[32]; - //MessageBox(NULL, itostr(event, txt, 16), NULL, 0); - PostMessage(pinhwnd, WM_TIMER, 0, 0); + HWND pinhwnd = (HWND) hook; // 1st param, THUNKED... + if (hwnd && idChild == INDEXID_CONTAINER && idObject == OBJID_WINDOW) { + switch(event) { + case EVENT_OBJECT_DESTROY: + PostMessage(pinhwnd, WM_CLOSE, 0, 0); + break; + case EVENT_OBJECT_LOCATIONCHANGE: + case EVENT_SYSTEM_FOREGROUND: +// case EVENT_SYSTEM_MOVESIZEEND: +// case EVENT_SYSTEM_MOVESIZESTART: + if (pinhwnd && GetParent(pinhwnd) == hwnd) { + //TCHAR txt[32]; + //MessageBox(NULL, itostr(event, txt, 16), NULL, 0); + PostMessage(pinhwnd, WM_TIMER, 0, 0); + } } } -// if(event == 0xB || event == 0xA) -// LOGA("event = %x", event); } #endif // EVENT_HOOK @@ -3964,52 +3969,13 @@ static LRESULT CALLBACK PinWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) RemoveProp(owner, TEXT(APP_NAMEA)TEXT("-Pin")); if (prop && threadid && lpdwProcessId) { - #if defined(_M_AMD64) || defined(WIN64) - #define THUNK_SIZE 22 - #else - #define THUNK_SIZE 13 - #endif - BYTE *thunk = (BYTE*)VirtualAlloc( NULL, THUNK_SIZE, MEM_COMMIT, PAGE_READWRITE ); - if (!thunk) break; - // Replace the first parameter with the handle of the PinWindow. - // FIXME: Handle MIPS/Alpha/PowerPC/ia-64/ARM/ARM64... - #if defined(_M_AMD64) || defined(WIN64) - // AMD x86_64 windows : rcx, rdx, r8, r9 (ints). - // xmm0, xmm1, xmm2, xmm3, floating points - // Then push right to left. - // ---------------------------------- - // ; mov rcx hwnd - // ; mov rax Procedure - // ; jmp rax - *(WORD *)(thunk+ 0) = 0xB948; - *(HWND *)(thunk+ 2) = hwnd; // <- Replace 1st param - *(WORD *)(thunk+10) = 0xB848; - *(void **)(thunk+12) = (LONG_PTR*)HandleWinEvent; - *(WORD *)(thunk+20) = 0xE0FF; - #elif defined(_M_IX86) - // i386 __stdcall: push right to left - // ---------------------------------- - // ; mov dword ptr [esp+4] hwnd - // ; jmp Procedure - *(DWORD *)(thunk+0) = 0x042444C7; - *(HWND *)(thunk+4) = hwnd; // <- Replace 1st param - *(BYTE *)(thunk+8) = 0xE9; - *(DWORD *)(thunk+9) = (BYTE*)((void*)HandleWinEvent)-(thunk+13); - #else - #error Unsupported CPU type, implement thunking or undefine EVENT_HOOK. - #endif - DWORD oldprotect; - // Restrict thunk to execute only. - BOOL ret = VirtualProtect(thunk, THUNK_SIZE, PAGE_EXECUTE, &oldprotect); - if (!ret) break; - FlushInstructionCache(GetCurrentProcess(), thunk, THUNK_SIZE); - + void *thunk = AllocThunk((LONG_PTR)HandleWinEvent, hwnd); HWINEVENTHOOK hook = SetWinEventHook( //EVENT_OBJECT_DESTROY, EVENT_OBJECT_LOCATIONCHANGE, // Range of events=8001-800Bh 0, EVENT_OBJECT_LOCATIONCHANGE, NULL, // Handle to DLL. - (WINEVENTPROC)thunk, // The callback function (thunked) + (WINEVENTPROC)(UINT_PTR)thunk, // The callback function (thunked) lpdwProcessId, threadid, // Process and thread IDs of interest (0 = all) WINEVENT_OUTOFCONTEXT // Flags. ); @@ -4017,12 +3983,13 @@ static LRESULT CALLBACK PinWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) SetWindowLongPtr(hwnd, 0+2*sizeof(LONG_PTR), (LONG_PTR)thunk); // save thunk if (hook) { PostMessage(hwnd, WM_TIMER, 0, 0); - break; } + else // fallback + SetTimer(hwnd, 1, conf.PinRate, NULL); } + else #endif // EVENT_HOOK SetTimer(hwnd, 1, conf.PinRate, NULL); - } break; case WM_DPICHANGED: { // Reset the oldstyle, so we have to recalculate size/offset @@ -4151,7 +4118,7 @@ static LRESULT CALLBACK PinWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp) if (hook) UnhookWinEvent(hook); // Free the thunk. BYTE *thunk = (BYTE *)GetWindowLongPtr(hwnd, 0+2*sizeof(LONG_PTR)); - if (thunk) VirtualFree(thunk, 0, MEM_RELEASE); + if (thunk) ReleaseThunk(thunk); #endif // EVENT_HOOK // Remove topmost flag if the pin gets destroyed. HWND ow; diff --git a/languages.c b/languages.c index ad717cd..e4cedc2 100644 --- a/languages.c +++ b/languages.c @@ -62,17 +62,11 @@ static void lstrcpy_resolve(TCHAR *__restrict__ dest, const TCHAR *__restrict__ ///////////////////////////////////////////////////////////////////////////// // -static void LoadTranslation(const TCHAR *__restrict__ ini) +static void LoadTranslationOrTT(const TCHAR *__restrict__ ini, const TCHAR * __restrict__ section_name, int offset) { - size_t i; - if (!ini) { - l10n = (struct strings *)&en_US; - return; - } else if( INVALID_FILE_ATTRIBUTES == GetFileAttributes(ini) ) { - return; - } // if english is not seleced then we have to allocate l10_ini strings struct // and we have to read the ini file... + size_t i; DWORD ret; DWORD tsectionlen=16383; TCHAR *tsection = NULL; @@ -81,20 +75,24 @@ static void LoadTranslation(const TCHAR *__restrict__ ini) TCHAR *tmp = (TCHAR *)realloc(tsection, tsectionlen*sizeof(TCHAR)); if(!tmp) { free(tsection); return; } tsection = tmp; - ret = GetPrivateProfileSection(TEXT("Translation"), tsection, tsectionlen, ini); + ret = GetPrivateProfileSection(section_name, tsection, tsectionlen, ini); } while (ret == tsectionlen-2); - if (!ret) return; + + if (!ret) + tsection[0] = tsection[1] = TEXT('\0'); if(!l10n_ini) l10n_ini = (struct strings *)calloc(1, sizeof(struct strings)); if(!l10n_ini) return; // Unable to allocate mem + for (i=0; i < ARR_SZ(l10n_inimapping); i++) { // Get pointer to default English string to be used if ini entry doesn't exist - const TCHAR *const def = ((TCHAR **)&en_US)[i]; + const TCHAR *const def = ((TCHAR **)&en_US)[i*2+offset]; const TCHAR *txt = GetSectionOptionCStr(tsection, l10n_inimapping[i], def); + if(!txt) continue; TCHAR buf[128]; - TCHAR **deststr = &((TCHAR **)l10n_ini)[i]; - if (deststr == &l10n_ini->about_version) { + TCHAR **deststr = &((TCHAR **)l10n_ini)[i*2+offset]; + if (deststr == &l10n_ini->AboutVersion) { // Append version number to version.... lstrcpy_s(buf, ARR_SZ(buf), txt); lstrcat_s(buf, ARR_SZ(buf), TEXT(" ") TEXT(APP_VERSION)); @@ -106,6 +104,20 @@ static void LoadTranslation(const TCHAR *__restrict__ ini) l10n = l10n_ini; free(tsection); // free the cached Translation section. } + +static void LoadTranslation(const TCHAR *__restrict__ ini) +{ + if (!ini) { + l10n = (struct strings *)&en_US; + return; + } else if( INVALID_FILE_ATTRIBUTES == GetFileAttributes(ini) ) { + return; + } + + LoadTranslationOrTT(ini, TEXT("Translation"), 0); + LoadTranslationOrTT(ini, TEXT("ToolTips"), 1); +} + struct langinfoitem *langinfo = NULL; int nlanguages; @@ -122,10 +134,10 @@ void ListAllTranslations() // First element langinfo = (struct langinfoitem *)malloc( sizeof(struct langinfoitem) ); if (!langinfo) return; - langinfo[0].code = en_US.code; - langinfo[0].lang_english = en_US.lang_english; - langinfo[0].lang = en_US.lang; - langinfo[0].author = en_US.author; + langinfo[0].code = en_US.Code; + langinfo[0].lang_english = en_US.LangEnglish; + langinfo[0].lang = en_US.Lang; + langinfo[0].author = en_US.Author; langinfo[0].fn = NULL; nlanguages = 1; @@ -188,7 +200,7 @@ void ListAllTranslations() } ///////////////////////////////////////////////////////////////////////////// -// Helper function to get +// Helper function to get static int GetCUserLanguage_xx_XX(wchar_t txt[AT_LEAST 16]) { txt[0] = L'\0'; diff --git a/languages.h b/languages.h index 79d4a62..fca06a0 100644 --- a/languages.h +++ b/languages.h @@ -29,267 +29,268 @@ struct langinfoitem { }; #define LANGUAGE_MAP \ - LNGVALUE(code, "Code", TEXT("en-US")) \ - LNGVALUE(lang_english, "LangEnglish", TEXT("English")) \ - LNGVALUE(lang, "Lang", TEXT("English")) \ - LNGVALUE(author, "Author", TEXT("Stefan Sundin, RamonUnch")) \ + LNGVALUE(Code, TEXT("en-US"), NULL) \ + LNGVALUE(LangEnglish, TEXT("English"), NULL) \ + LNGVALUE(Lang, TEXT("English"), NULL) \ + LNGVALUE(Author, TEXT("Stefan Sundin, RamonUnch"), NULL) \ /* Menu */ \ - LNGVALUE(menu_enable, "MenuEnable", TEXT("&Enable")) \ - LNGVALUE(menu_disable, "MenuDisable", TEXT("&Disable")) \ - LNGVALUE(menu_hide, "MenuHideTray", TEXT("&Hide tray")) \ - LNGVALUE(menu_config, "MenuConfigure", TEXT("&Configure...")) \ - LNGVALUE(menu_about, "MenuAbout", TEXT("&About")) \ - LNGVALUE(menu_openinifile, "MenuOpenIniFile", TEXT("&Open ini file")) \ - LNGVALUE(menu_savezones, "MenuSaveZones", TEXT("&Save test windows as snap layout")) \ - LNGVALUE(menu_emptyzone, "MenuEmptyZone", TEXT("(empty)")) \ - LNGVALUE(menu_snaplayout, "MenuSnapLayout", TEXT("Snap layout &")) \ - LNGVALUE(menu_editlayout, "MenuEditLayout", TEXT("Edi&t snap layout")) \ - LNGVALUE(menu_closeallzones,"MenuCloseAllZones", TEXT("C&lose all test windows")) \ - LNGVALUE(menu_exit, "MenuExit", TEXT("E&xit")) \ + LNGVALUE(MenuEnable, TEXT("&Enable"), NULL) \ + LNGVALUE(MenuDisable, TEXT("&Disable"), NULL) \ + LNGVALUE(MenuHideTray, TEXT("&Hide tray"), NULL) \ + LNGVALUE(MenuConfigure, TEXT("&Configure..."), NULL) \ + LNGVALUE(MenuAbout, TEXT("&About"), NULL) \ + LNGVALUE(MenuOpenIniFile, TEXT("&Open ini file"), NULL) \ + LNGVALUE(MenuSaveZones, TEXT("&Save test windows as snap layout"), NULL) \ + LNGVALUE(MenuEmptyZone, TEXT("(empty)"), NULL) \ + LNGVALUE(MenuSnapLayout, TEXT("Snap layout &"), NULL) \ + LNGVALUE(MenuEditLayout, TEXT("Edi&t snap layout"), NULL) \ + LNGVALUE(MenuCloseAllZones,TEXT("C&lose all test windows"), NULL) \ + LNGVALUE(MenuExit, TEXT("E&xit"), NULL) \ /* Config Title and Tabs */ \ - LNGVALUE(title, "ConfigTitle", APP_NAME TEXT(" Configuration")) \ - LNGVALUE(tab_general, "ConfigTabGeneral", TEXT("General")) \ - LNGVALUE(tab_mouse, "ConfigTabMouse", TEXT("Mouse")) \ - LNGVALUE(tab_keyboard, "ConfigTabKeyboard", TEXT("Keyboard")) \ - LNGVALUE(tab_blacklist, "ConfigTabBlacklist", TEXT("Blacklist")) \ - LNGVALUE(tab_advanced, "ConfigTabAdvanced", TEXT("Advanced")) \ - LNGVALUE(tab_about, "ConfigTabAbout", TEXT("About")) \ + LNGVALUE(ConfigTitle, APP_NAME TEXT(" Configuration"), NULL) \ + LNGVALUE(ConfigTabGeneral, TEXT("General"), NULL) \ + LNGVALUE(ConfigTabMouse, TEXT("Mouse"), NULL) \ + LNGVALUE(ConfigTabKeyboard, TEXT("Keyboard"), NULL) \ + LNGVALUE(ConfigTabBlacklist, TEXT("Blacklist"), NULL) \ + LNGVALUE(ConfigTabAdvanced, TEXT("Advanced"), NULL) \ + LNGVALUE(ConfigTabAbout, TEXT("About"), NULL) \ /* General Box */ \ - LNGVALUE(general_box, "GeneralBox", TEXT("General settings")) \ - LNGVALUE(general_autofocus, "GeneralAutoFocus", TEXT("&Focus windows when dragging.\nYou can also press Ctrl to focus windows.")) \ - LNGVALUE(general_aero, "GeneralAero", TEXT("Mimi&c Aero Snap")) \ - LNGVALUE(general_smartaero, "GeneralSmartAero", TEXT("Smart Aero Sna&p dimensions")) \ - LNGVALUE(general_smarteraero, "GeneralSmarterAero", TEXT("Smarter Aer&o Snap dimensions")) \ - LNGVALUE(general_stickyresize, "GeneralStickyResize", TEXT("Resi&ze other snapped windows with Shift")) \ - LNGVALUE(general_inactivescroll, "GeneralInactiveScroll", TEXT("&Scroll inactive windows")) \ - LNGVALUE(general_mdi, "GeneralMDI", TEXT("&MDI support")) \ - LNGVALUE(general_autosnap, "GeneralAutoSnap", TEXT("S&nap window edges to:")) \ - LNGVALUE(general_autosnap0, "GeneralAutoSnap0", TEXT("Disabled")) \ - LNGVALUE(general_autosnap1, "GeneralAutoSnap1", TEXT("To screen borders")) \ - LNGVALUE(general_autosnap2, "GeneralAutoSnap2", TEXT("+ outside of windows")) \ - LNGVALUE(general_autosnap3, "GeneralAutoSnap3", TEXT("+ inside of windows")) \ - LNGVALUE(general_language, "GeneralLanguage", TEXT("&Language:")) \ - LNGVALUE(general_fullwin, "GeneralFullWin", TEXT("&Drag full windows")) \ - LNGVALUE(general_usezones, "GeneralUseZones", TEXT("Snap to Layo&ut with Shift (configure with tray menu)")) \ - LNGVALUE(general_piercingclick, "GeneralPiercingClick", TEXT("Avoi&d blocking Alt+Click (disables AltSnap double-clicks)")) \ - LNGVALUE(general_resizeall, "GeneralResizeAll", TEXT("&Resize all windows")) \ - LNGVALUE(general_resizecenter, "GeneralResizeCenter", TEXT("Center resize mode")) \ - LNGVALUE(general_resizecenter_norm, "GeneralResizeCenterNorm", TEXT("All d&irections")) \ - LNGVALUE(general_resizecenter_br, "GeneralResizeCenterBr", TEXT("&Bottom right")) \ - LNGVALUE(general_resizecenter_move, "GeneralResizeCenterMove", TEXT("Mo&ve")) \ - LNGVALUE(general_resizecenter_close,"GeneralResizeCenterClose",TEXT("Clos&est side")) \ - LNGVALUE(general_autostart_box, "GeneralAutostartBox", TEXT("Autostart")) \ - LNGVALUE(general_autostart, "GeneralAutostart", TEXT("S&tart ") APP_NAME TEXT(" when logging on")) \ - LNGVALUE(general_autostart_hide, "GeneralAutostartHide", TEXT("&Hide tray")) \ - LNGVALUE(general_autostart_elevate, "GeneralAutostartElevate", TEXT("&Elevate to administrator privileges")) \ - LNGVALUE(general_autostart_elevate_tip, "GeneralAutostartElevateTip", TEXT("Note that a UAC prompt will appear every time you log in, unless you disable UAC completely or use the Task Scheduler.\nTo setup a Scheduled task for this purpose, you can use the sch_On.bat batch files in Altsnap's folder.")) \ - LNGVALUE(general_elevate, "GeneralElevate", TEXT("E&levate")) \ - LNGVALUE(general_elevated, "GeneralElevated", TEXT("Elevated")) \ - LNGVALUE(general_elevation_aborted, "GeneralElevationAborted", TEXT("Elevation aborted.")) \ + LNGVALUE(GeneralBox, TEXT("General settings"), NULL) \ + LNGVALUE(GeneralAutoFocus, TEXT("&Focus windows when dragging.\nYou can also press Ctrl to focus windows."), NULL) \ + LNGVALUE(GeneralAero, TEXT("Mimi&c Aero Snap"), NULL) \ + LNGVALUE(GeneralSmartAero, TEXT("Smart Aero Sna&p dimensions"), NULL) \ + LNGVALUE(GeneralSmarterAero, TEXT("Smarter Aer&o Snap dimensions"), NULL) \ + LNGVALUE(GeneralStickyResize, TEXT("Resi&ze other snapped windows with Shift"), NULL) \ + LNGVALUE(GeneralInactiveScroll, TEXT("&Scroll inactive windows"), NULL) \ + LNGVALUE(GeneralMDI, TEXT("&MDI support"), NULL) \ + LNGVALUE(GeneralAutoSnap, TEXT("S&nap window edges to:"), NULL) \ + LNGVALUE(GeneralAutoSnap0, TEXT("Disabled"), NULL) \ + LNGVALUE(GeneralAutoSnap1, TEXT("To screen borders"), NULL) \ + LNGVALUE(GeneralAutoSnap2, TEXT("+ outside of windows"), NULL) \ + LNGVALUE(GeneralAutoSnap3, TEXT("+ inside of windows"), NULL) \ + LNGVALUE(GeneralLanguage, TEXT("&Language:"), NULL) \ + LNGVALUE(GeneralFullWin, TEXT("&Drag full windows"), NULL) \ + LNGVALUE(GeneralUseZones, TEXT("Snap to Layo&ut with Shift (configure with tray menu)"), TEXT("This option will mimick FancyZones\r\nOpen TestWindows to set up the zones\n Look at the tray icon menu")) \ + LNGVALUE(GeneralPiercingClick, TEXT("Avoi&d blocking Alt+Click (disables AltSnap double-clicks)"), NULL) \ + LNGVALUE(GeneralResizeAll, TEXT("&Resize all windows"), NULL) \ + LNGVALUE(GeneralResizeCenter, TEXT("Center resize mode"), NULL) \ + LNGVALUE(GeneralResizeCenterNorm, TEXT("All d&irections"), NULL) \ + LNGVALUE(GeneralResizeCenterBr, TEXT("&Bottom right"), NULL) \ + LNGVALUE(GeneralResizeCenterMove, TEXT("Mo&ve"), NULL) \ + LNGVALUE(GeneralResizeCenterClose,TEXT("Clos&est side"), NULL) \ + LNGVALUE(GeneralAutostartBox, TEXT("Autostart"), NULL) \ + LNGVALUE(GeneralAutostart, TEXT("S&tart ") APP_NAME TEXT(" when logging on"), NULL) \ + LNGVALUE(GeneralAutostartHide, TEXT("&Hide tray"), NULL) \ + LNGVALUE(GeneralAutostartElevate, TEXT("&Elevate to administrator privileges"), NULL) \ + LNGVALUE(GeneralAutostartElevateTip, TEXT("Note that a UAC prompt will appear every time you log in, unless you disable UAC completely or use the Task Scheduler.\nTo setup a Scheduled task for this purpose, you can use the sch_On.bat batch files in Altsnap's folder."), NULL) \ + LNGVALUE(GeneralElevate, TEXT("E&levate"), NULL) \ + LNGVALUE(GeneralElevated, TEXT("Elevated"), NULL) \ + LNGVALUE(GeneralElevationAborted, TEXT("Elevation aborted."), NULL) \ /* Keyboard & Mouse tabs */ \ - LNGVALUE(input_mouse_box, "InputMouseBox", TEXT("Mouse actions")) \ - LNGVALUE(input_mouse_btac1, "InputMouseBtAc1", TEXT("&1. Primary")) \ - LNGVALUE(input_mouse_btac2, "InputMouseBtAc2", TEXT("&2. Alternate")) \ - LNGVALUE(input_mouse_inttb, "InputMouseINTTB", TEXT("&Title bar")) \ - LNGVALUE(input_mouse_whilem, "InputMouseWhileM", TEXT("Whil&e moving")) \ - LNGVALUE(input_mouse_whiler, "InputMouseWhileR", TEXT("While resi&zing")) \ - LNGVALUE(input_mouse_lmb, "InputMouseLMB", TEXT("Left mouse &button:")) \ - LNGVALUE(input_mouse_mmb, "InputMouseMMB", TEXT("&Middle mouse button:")) \ - LNGVALUE(input_mouse_rmb, "InputMouseRMB", TEXT("Ri&ght mouse button:")) \ - LNGVALUE(input_mouse_mb4, "InputMouseMB4", TEXT("Mouse button &4:")) \ - LNGVALUE(input_mouse_mb5, "InputMouseMB5", TEXT("Mouse button &5:")) \ - LNGVALUE(input_mouse_scroll, "InputMouseScroll", TEXT("&Scroll wheel:")) \ - LNGVALUE(input_mouse_hscroll, "InputMouseHScroll", TEXT("Scroll wheel (&horizontal):")) \ - LNGVALUE(input_mouse_moveup, "InputMouseMoveUp", TEXT("Long &drag-free Move:")) \ - LNGVALUE(input_mouse_resizeup,"InputMouseResizeUp",TEXT("Long drag-&free Resize:")) \ - LNGVALUE(input_mouse_ttbactions_box, "InputMouseTTBActionBox", TEXT("Use specific actions when clicking the Title bar")) \ - LNGVALUE(input_mouse_ttbactionsna, "InputMouseTTBActionNA", TEXT("Without hot&key")) \ - LNGVALUE(input_mouse_ttbactionswa, "InputMouseTTBActionWA", TEXT("&With hotkey")) \ - LNGVALUE(input_mouse_mmb_hc, "InputMouseMMBHC", TEXT("M&iddle mouse button")) \ - LNGVALUE(input_mouse_mb4_hc, "InputMouseMB4HC", TEXT("M&ouse button 4")) \ - LNGVALUE(input_mouse_mb5_hc, "InputMouseMB5HC", TEXT("Mo&use button 5")) \ - LNGVALUE(input_mouse_longclickmove, "InputMouseLongClickMove", TEXT("Mo&ve windows with a long left-click")) \ - LNGVALUE(input_scrolllockstate, "InputScrollLockState", TEXT("Suspend/Resume AltSnap based on &Scroll lock state")) \ - LNGVALUE(input_unikeyholdmenu, "InputUniKeyHoldMenu", TEXT("Pop&up an extended character menu when holding an alphabetic key down")) \ - LNGVALUE(input_keycombo, "InputKeyCombo", TEXT("Use two keys &combo to activate")) \ - LNGVALUE(input_grabwithalt, "InputGrabWithAlt", TEXT("&Action without click:")) \ - LNGVALUE(input_grabwithaltb, "InputGrabWithAltB", TEXT("Acti&on without click (alt):")) \ - LNGVALUE(input_actions_move, "InputActionMove", TEXT("Move window")) \ - LNGVALUE(input_actions_resize, "InputActionResize", TEXT("Resize window")) \ - LNGVALUE(input_actions_restore, "InputActionRestore", TEXT("Restore window")) \ - LNGVALUE(input_actions_close, "InputActionClose", TEXT("&Close window")) \ - LNGVALUE(input_actions_kill, "InputActionKill", TEXT("&Kill program")) \ - LNGVALUE(input_actions_pause, "InputActionPause", TEXT("Pause program")) \ - LNGVALUE(input_actions_resume, "InputActionResume", TEXT("Resume program")) \ - LNGVALUE(input_actions_asonoff, "InputActionASOnOff", TEXT("S&uspend/Resume AltSnap")) \ - LNGVALUE(input_actions_moveonoff, "InputActionMoveOnOff", TEXT("Movement dis&abled")) \ - LNGVALUE(input_actions_minimize, "InputActionMinimize", TEXT("Mi&nimize window")) \ - LNGVALUE(input_actions_maximize, "InputActionMaximize", TEXT("Ma&ximize window")) \ - LNGVALUE(input_actions_lower, "InputActionLower", TEXT("&Lower window")) \ - LNGVALUE(input_actions_focus, "InputActionFocus", TEXT("Focus window")) \ - LNGVALUE(input_actions_nstacked, "InputActionNStacked", TEXT("Next stacked window")) \ - LNGVALUE(input_actions_nstacked2, "InputActionNStacked2", TEXT("Next laser stacked window")) \ - LNGVALUE(input_actions_pstacked, "InputActionPStacked", TEXT("Previous stacked window")) \ - LNGVALUE(input_actions_pstacked2, "InputActionPStacked2", TEXT("Previous laser stacked window")) \ - LNGVALUE(input_actions_npstacked, "InputActionNPStacked", TEXT("Next/Prev stacked window")) \ - LNGVALUE(input_actions_npstacked2, "InputActionNPStacked2", TEXT("Next/Prev laser stacked window")) \ - LNGVALUE(input_actions_stacklist, "InputActionStackList", TEXT("Stacked windows list")) \ - LNGVALUE(input_actions_stacklist2, "InputActionStackList2", TEXT("Laser stacked windows list")) \ - LNGVALUE(input_actions_alttablist, "InputActionAltTabList", TEXT("Windows list")) \ - LNGVALUE(input_actions_alttabfulllist, "InputActionAltTabFullList", TEXT("All windows list")) \ - LNGVALUE(input_actions_mlzone, "InputActionMLZone", TEXT("Move to the left zone")) \ - LNGVALUE(input_actions_mtzone, "InputActionMTZone", TEXT("Move to the top zone")) \ - LNGVALUE(input_actions_mrzone, "InputActionMRZone", TEXT("Move to the right zone")) \ - LNGVALUE(input_actions_mbzone, "InputActionMBZone", TEXT("Move to the bottom zone")) \ - LNGVALUE(input_actions_xlzone, "InputActionXLZone", TEXT("Extend to the left zone")) \ - LNGVALUE(input_actions_xtzone, "InputActionXTZone", TEXT("Extend to the top zone")) \ - LNGVALUE(input_actions_xrzone, "InputActionXRZone", TEXT("Extend to the right zone")) \ - LNGVALUE(input_actions_xbzone, "InputActionXBZone", TEXT("Extend to the bottom zone")) \ - LNGVALUE(input_actions_xtnledge, "InputActionXTNLEdge", TEXT("Extend to the next left edge")) \ - LNGVALUE(input_actions_xtntedge, "InputActionXTNTEdge", TEXT("Extend to the next top edge")) \ - LNGVALUE(input_actions_xtnredge, "InputActionXTNREdge", TEXT("Extend to the next right edge")) \ - LNGVALUE(input_actions_xtnbedge, "InputActionXTNBEdge", TEXT("Extend to the next bottom edge")) \ - LNGVALUE(input_actions_mtnledge, "InputActionMTNLEdge", TEXT("Move to the next left edge")) \ - LNGVALUE(input_actions_mtntedge, "InputActionMTNTEdge", TEXT("Move to the next top edge")) \ - LNGVALUE(input_actions_mtnredge, "InputActionMTNREdge", TEXT("Move to the next right edge")) \ - LNGVALUE(input_actions_mtnbedge, "InputActionMTNBEdge", TEXT("Move to the next bottom edge")) \ - LNGVALUE(input_actions_stepl, "InputActionStepl", TEXT("Step left")) \ - LNGVALUE(input_actions_stept, "InputActionStepT", TEXT("Step up")) \ - LNGVALUE(input_actions_stepr, "InputActionStepR", TEXT("Step right")) \ - LNGVALUE(input_actions_stepb, "InputActionStepB", TEXT("Step down")) \ - LNGVALUE(input_actions_sstepl, "InputActionSStepl", TEXT("Small step left")) \ - LNGVALUE(input_actions_sstept, "InputActionSStepT", TEXT("Small step up")) \ - LNGVALUE(input_actions_sstepr, "InputActionSStepR", TEXT("Small step right")) \ - LNGVALUE(input_actions_sstepb, "InputActionSStepB", TEXT("Small step down")) \ - LNGVALUE(input_actions_focusl, "InputActionFocusL", TEXT("Focus left window")) \ - LNGVALUE(input_actions_focust, "InputActionFocusT", TEXT("Focus top window")) \ - LNGVALUE(input_actions_focusr, "InputActionFocusR", TEXT("Focus right window")) \ - LNGVALUE(input_actions_focusb, "InputActionFocusB", TEXT("Focus bottom window")) \ - LNGVALUE(input_actions_roll, "InputActionRoll", TEXT("&Roll/Unroll window")) \ - LNGVALUE(input_actions_alwaysontop, "InputActionAlwaysOnTop", TEXT("Toggle always on &top")) \ - LNGVALUE(input_actions_borderless, "InputActionBorderless", TEXT("Toggle &borderless")) \ - LNGVALUE(input_actions_center, "InputActionCenter", TEXT("C&enter window on screen")) \ - LNGVALUE(input_actions_oriclick, "InputActionOriClick", TEXT("Send ori&ginal click")) \ - LNGVALUE(input_actions_nothing, "InputActionNothing", TEXT("Nothing")) \ - LNGVALUE(input_actions_alttab, "InputActionAltTab", TEXT("Alt+Tab")) \ - LNGVALUE(input_actions_volume, "InputActionVolume", TEXT("Volume")) \ - LNGVALUE(input_actions_mute, "InputActionMute", TEXT("Mute &sounds")) \ - LNGVALUE(input_actions_menu, "InputActionMenu", TEXT("Action menu")) \ - LNGVALUE(input_actions_maximizehv, "InputActionMaximizeHV", TEXT("Maximize &Vertically")) \ - LNGVALUE(input_actions_sidesnap, "InputActionSideSnap", TEXT("&Snap to monitor side/corner")) \ - LNGVALUE(input_actions_extendsnap , "InputActionExtendSnap", TEXT("Extend to monitor side/corner")) \ - LNGVALUE(input_actions_extendtnedge, "InputActionExtendTNEdge", TEXT("Extend to next edge")) \ - LNGVALUE(input_actions_movetnedge, "InputActionMoveTNEdge", TEXT("Move to next edge")) \ - LNGVALUE(input_actions_minallother, "InputActionMinAllOther", TEXT("Minimize &other windows")) \ - LNGVALUE(input_actions_transparency, "InputActionTransparency", TEXT("Transparency")) \ - LNGVALUE(input_actions_zoom, "InputActionZoom", TEXT("Zoom window")) \ - LNGVALUE(input_actions_zoom2, "InputActionZoom2", TEXT("Zoom window 2")) \ - LNGVALUE(input_actions_hscroll, "InputActionHScroll", TEXT("Horizontal scroll")) \ + LNGVALUE(InputMouseBox, TEXT("Mouse actions"), NULL) \ + LNGVALUE(InputMouseBtAc1, TEXT("&1. Primary"), TEXT("Action performed with Hotkey")) \ + LNGVALUE(InputMouseBtAc2, TEXT("&2. Alternate"), TEXT("Action performed with Hotkey + Modifier key (see Keyboard tab)")) \ + LNGVALUE(InputMouseINTTB, TEXT("&Title bar"), TEXT("Action performed when clicking on the title bar")) \ + LNGVALUE(InputMouseWhileM, TEXT("Whil&e moving"), NULL) \ + LNGVALUE(InputMouseWhileR, TEXT("While resi&zing"), NULL) \ + LNGVALUE(InputMouseLMB, TEXT("Left mouse &button:"), NULL) \ + LNGVALUE(InputMouseMMB, TEXT("&Middle mouse button:"), NULL) \ + LNGVALUE(InputMouseRMB, TEXT("Ri&ght mouse button:"), NULL) \ + LNGVALUE(InputMouseMB4, TEXT("Mouse button &4:"), NULL) \ + LNGVALUE(InputMouseMB5, TEXT("Mouse button &5:"), NULL) \ + LNGVALUE(InputMouseScroll, TEXT("&Scroll wheel:"), NULL) \ + LNGVALUE(InputMouseHScroll, TEXT("Scroll wheel (&horizontal):"), NULL) \ + LNGVALUE(InputMouseMoveUp, TEXT("Long &drag-free Move:"), NULL) \ + LNGVALUE(InputMouseResizeUp,TEXT("Long drag-&free Resize:"), NULL) \ + LNGVALUE(InputMouseTTBActionBox, TEXT("Use specific actions when clicking the Title bar"), NULL) \ + LNGVALUE(InputMouseTTBActionNA, TEXT("Without hot&key"), NULL) \ + LNGVALUE(InputMouseTTBActionWA, TEXT("&With hotkey"), NULL) \ + LNGVALUE(InputMouseMMBHC, TEXT("M&iddle mouse button"), NULL) \ + LNGVALUE(InputMouseMB4HC, TEXT("M&ouse button 4"), NULL) \ + LNGVALUE(InputMouseMB5HC, TEXT("Mo&use button 5"), NULL) \ + LNGVALUE(InputMouseLongClickMove, TEXT("Mo&ve windows with a long left-click"), NULL) \ + LNGVALUE(InputScrollLockState, TEXT("Suspend/Resume AltSnap based on &Scroll lock state"), NULL) \ + LNGVALUE(InputUniKeyHoldMenu, TEXT("Pop&up an extended character menu when holding an alphabetic key down"), NULL) \ + LNGVALUE(InputKeyCombo, TEXT("Use two keys &combo to activate"), NULL) \ + LNGVALUE(InputGrabWithAlt, TEXT("&Action without click:"), NULL) \ + LNGVALUE(InputGrabWithAltB, TEXT("Acti&on without click (alt):"), NULL) \ \ - LNGVALUE(input_hotkeys_box, "InputHotkeysBox", TEXT("Hotkeys")) \ - LNGVALUE(input_hotkeys_modkey, "InputHotkeysModKey", TEXT("Modifier key for al&ternate action:")) \ - LNGVALUE(input_hotclicks_box, "InputHotclicksBox", TEXT("Hotclick (activate with a click)")) \ - LNGVALUE(input_hotclicks_more, "InputHotclicksMore", TEXT("A checked button can be combined with an action but it will always be blocked in this case.")) \ - LNGVALUE(input_hotkeys_alt, "InputHotkeysAlt", TEXT("Alt")) \ - LNGVALUE(input_hotkeys_winkey, "InputHotkeysWinkey", TEXT("Winkey")) \ - LNGVALUE(input_hotkeys_ctrl, "InputHotkeysCtrl", TEXT("Ctrl")) \ - LNGVALUE(input_hotkeys_shift, "InputHotkeysShift", TEXT("Shift")) \ - LNGVALUE(input_hotkeys_shortcuts, "InputHotkeysShortcuts", TEXT("S&hortcut for action:")) \ - LNGVALUE(input_hotkeys_shortcutspick, "InputHotkeysShortcutsPick", TEXT("Pick &keys")) \ - LNGVALUE(input_hotkeys_shortcutsclear, "InputHotkeysShortcutsClear", TEXT("Clear ke&ys")) \ - LNGVALUE(input_hotkeys_shortcutset, "InputHotkeysShortcutsSet", TEXT("Sa&ve")) \ - LNGVALUE(input_hotkeys_useptwindow, "InputHotkeysUsePtWindow", TEXT("Apply to the &pointed window")) \ - LNGVALUE(input_hotkeys_leftalt, "InputHotkeysLeftAlt", TEXT("L&eft Alt")) \ - LNGVALUE(input_hotkeys_rightalt, "InputHotkeysRightAlt", TEXT("&Right Alt")) \ - LNGVALUE(input_hotkeys_leftwinkey, "InputHotkeysLeftWinkey", TEXT("Left &Winkey")) \ - LNGVALUE(input_hotkeys_rightwinkey, "InputHotkeysRightWinkey", TEXT("Right W&inkey")) \ - LNGVALUE(input_hotkeys_leftctrl, "InputHotkeysLeftCtrl", TEXT("&Left Ctrl")) \ - LNGVALUE(input_hotkeys_rightctrl, "InputHotkeysRightCtrl", TEXT("Ri&ght Ctrl")) \ - LNGVALUE(input_hotkeys_leftshift, "InputHotkeysLeftShift", TEXT("Left Shift")) \ - LNGVALUE(input_hotkeys_rightshift, "InputHotkeysRightShift", TEXT("Right Shift")) \ - LNGVALUE(input_hotkeys_more, "InputHotkeysMore", TEXT("You can add any key by editing the ini file.\nUse the shift key to snap windows to each other.")) \ + LNGVALUE(InputActionMove, TEXT("Move window"), NULL) \ + LNGVALUE(InputActionResize, TEXT("Resize window"), NULL) \ + LNGVALUE(InputActionRestore, TEXT("Restore window"), NULL) \ + LNGVALUE(InputActionClose, TEXT("&Close window"), NULL) \ + LNGVALUE(InputActionKill, TEXT("&Kill program"), NULL) \ + LNGVALUE(InputActionPause, TEXT("Pause program"), NULL) \ + LNGVALUE(InputActionResume, TEXT("Resume program"), NULL) \ + LNGVALUE(InputActionASOnOff, TEXT("S&uspend/Resume AltSnap"), NULL) \ + LNGVALUE(InputActionMoveOnOff, TEXT("Movement dis&abled"), NULL) \ + LNGVALUE(InputActionMinimize, TEXT("Mi&nimize window"), NULL) \ + LNGVALUE(InputActionMaximize, TEXT("Ma&ximize window"), NULL) \ + LNGVALUE(InputActionLower, TEXT("&Lower window"), NULL) \ + LNGVALUE(InputActionFocus, TEXT("Focus window"), NULL) \ + LNGVALUE(InputActionNStacked, TEXT("Next stacked window"), NULL) \ + LNGVALUE(InputActionNStacked2, TEXT("Next laser stacked window"), NULL) \ + LNGVALUE(InputActionPStacked, TEXT("Previous stacked window"), NULL) \ + LNGVALUE(InputActionPStacked2, TEXT("Previous laser stacked window"), NULL) \ + LNGVALUE(InputActionNPStacked, TEXT("Next/Prev stacked window"), NULL) \ + LNGVALUE(InputActionNPStacked2, TEXT("Next/Prev laser stacked window"), NULL) \ + LNGVALUE(InputActionStackList, TEXT("Stacked windows list"), NULL) \ + LNGVALUE(InputActionStackList2, TEXT("Laser stacked windows list"), NULL) \ + LNGVALUE(InputActionAltTabList, TEXT("Windows list"), NULL) \ + LNGVALUE(InputActionAltTabFullList, TEXT("All windows list"), NULL) \ + LNGVALUE(InputActionMLZone, TEXT("Move to the left zone"), NULL) \ + LNGVALUE(InputActionMTZone, TEXT("Move to the top zone"), NULL) \ + LNGVALUE(InputActionMRZone, TEXT("Move to the right zone"), NULL) \ + LNGVALUE(InputActionMBZone, TEXT("Move to the bottom zone"), NULL) \ + LNGVALUE(InputActionXLZone, TEXT("Extend to the left zone"), NULL) \ + LNGVALUE(InputActionXTZone, TEXT("Extend to the top zone"), NULL) \ + LNGVALUE(InputActionXRZone, TEXT("Extend to the right zone"), NULL) \ + LNGVALUE(InputActionXBZone, TEXT("Extend to the bottom zone"), NULL) \ + LNGVALUE(InputActionXTNLEdge, TEXT("Extend to the next left edge"), NULL) \ + LNGVALUE(InputActionXTNTEdge, TEXT("Extend to the next top edge"), NULL) \ + LNGVALUE(InputActionXTNREdge, TEXT("Extend to the next right edge"), NULL) \ + LNGVALUE(InputActionXTNBEdge, TEXT("Extend to the next bottom edge"), NULL) \ + LNGVALUE(InputActionMTNLEdge, TEXT("Move to the next left edge"), NULL) \ + LNGVALUE(InputActionMTNTEdge, TEXT("Move to the next top edge"), NULL) \ + LNGVALUE(InputActionMTNREdge, TEXT("Move to the next right edge"), NULL) \ + LNGVALUE(InputActionMTNBEdge, TEXT("Move to the next bottom edge"), NULL) \ + LNGVALUE(InputActionStepL, TEXT("Step left"), NULL) \ + LNGVALUE(InputActionStepT, TEXT("Step up"), NULL) \ + LNGVALUE(InputActionStepR, TEXT("Step right"), NULL) \ + LNGVALUE(InputActionStepB, TEXT("Step down"), NULL) \ + LNGVALUE(InputActionSStepL, TEXT("Small step left"), NULL) \ + LNGVALUE(InputActionSStepT, TEXT("Small step up"), NULL) \ + LNGVALUE(InputActionSStepR, TEXT("Small step right"), NULL) \ + LNGVALUE(InputActionSStepB, TEXT("Small step down"), NULL) \ + LNGVALUE(InputActionFocusL, TEXT("Focus left window"), NULL) \ + LNGVALUE(InputActionFocusT, TEXT("Focus top window"), NULL) \ + LNGVALUE(InputActionFocusR, TEXT("Focus right window"), NULL) \ + LNGVALUE(InputActionFocusB, TEXT("Focus bottom window"), NULL) \ + LNGVALUE(InputActionRoll, TEXT("&Roll/Unroll window"), NULL) \ + LNGVALUE(InputActionAlwaysOnTop, TEXT("Toggle always on &top"), NULL) \ + LNGVALUE(InputActionBorderless, TEXT("Toggle &borderless"), NULL) \ + LNGVALUE(InputActionCenter, TEXT("C&enter window on screen"), NULL) \ + LNGVALUE(InputActionOriClick, TEXT("Send ori&ginal click"), NULL) \ + LNGVALUE(InputActionNothing, TEXT("Nothing"), NULL) \ + LNGVALUE(InputActionAltTab, TEXT("Alt+Tab"), NULL) \ + LNGVALUE(InputActionVolume, TEXT("Volume"), NULL) \ + LNGVALUE(InputActionMute, TEXT("Mute &sounds"), NULL) \ + LNGVALUE(InputActionMenu, TEXT("Action menu"), NULL) \ + LNGVALUE(InputActionMaximizeHV, TEXT("Maximize &Vertically"), NULL) \ + LNGVALUE(InputActionSideSnap, TEXT("&Snap to monitor side/corner"), NULL) \ + LNGVALUE(InputActionExtendSnap , TEXT("Extend to monitor side/corner"), NULL) \ + LNGVALUE(InputActionExtendTNEdge, TEXT("Extend to next edge"), NULL) \ + LNGVALUE(InputActionMoveTNEdge, TEXT("Move to next edge"), NULL) \ + LNGVALUE(InputActionMinAllOther, TEXT("Minimize &other windows"), NULL) \ + LNGVALUE(InputActionTransparency, TEXT("Transparency"), NULL) \ + LNGVALUE(InputActionZoom, TEXT("Zoom window"), NULL) \ + LNGVALUE(InputActionZoom2, TEXT("Zoom window 2"), NULL) \ + LNGVALUE(InputActionHScroll, TEXT("Horizontal scroll"), NULL) \ + \ + LNGVALUE(InputHotkeysBox, TEXT("Hotkeys"), NULL) \ + LNGVALUE(InputHotkeysModKey, TEXT("Modifier key for al&ternate action:"), NULL) \ + LNGVALUE(InputHotclicksBox, TEXT("Hotclick (activate with a click)"), NULL) \ + LNGVALUE(InputHotclicksMore, TEXT("A checked button can be combined with an action but it will always be blocked in this case."), NULL) \ + LNGVALUE(InputHotkeysAlt, TEXT("Alt"), NULL) \ + LNGVALUE(InputHotkeysWinkey, TEXT("Winkey"), NULL) \ + LNGVALUE(InputHotkeysCtrl, TEXT("Ctrl"), NULL) \ + LNGVALUE(InputHotkeysShift, TEXT("Shift"), NULL) \ + LNGVALUE(InputHotkeysShortcuts, TEXT("S&hortcut for action:"), NULL) \ + LNGVALUE(InputHotkeysShortcutsPick, TEXT("Pick &keys"), NULL) \ + LNGVALUE(InputHotkeysShortcutsClear, TEXT("Clear ke&ys"), NULL) \ + LNGVALUE(InputHotkeysShortcutsSet, TEXT("Sa&ve"), NULL) \ + LNGVALUE(InputHotkeysUsePtWindow, TEXT("Apply to the &pointed window"), NULL) \ + LNGVALUE(InputHotkeysLeftAlt, TEXT("L&eft Alt"), NULL) \ + LNGVALUE(InputHotkeysRightAlt, TEXT("&Right Alt"), NULL) \ + LNGVALUE(InputHotkeysLeftWinkey, TEXT("Left &Winkey"), NULL) \ + LNGVALUE(InputHotkeysRightWinkey, TEXT("Right W&inkey"), NULL) \ + LNGVALUE(InputHotkeysLeftCtrl, TEXT("&Left Ctrl"), NULL) \ + LNGVALUE(InputHotkeysRightCtrl, TEXT("Ri&ght Ctrl"), NULL) \ + LNGVALUE(InputHotkeysLeftShift, TEXT("Left Shift"), NULL) \ + LNGVALUE(InputHotkeysRightShift, TEXT("Right Shift"), NULL) \ + LNGVALUE(InputHotkeysMore, TEXT("You can add any key by editing the ini file.\nUse the shift key to snap windows to each other."), NULL) \ /* Blacklits Tab*/ \ - LNGVALUE(blacklist_box, "BlacklistBox", TEXT("Blacklist settings")) \ - LNGVALUE(blacklist_processblacklist, "BlacklistProcessBlacklist", TEXT("&Process blacklist:")) \ - LNGVALUE(blacklist_blacklist, "BlacklistBlacklist", TEXT("&Windows blacklist:")) \ - LNGVALUE(blacklist_scrolllist, "BlacklistScrolllist", TEXT("Windows that should ignore &scroll action:")) \ - LNGVALUE(blacklist_mdis, "BlacklistMDIs", TEXT("&MDIs not to be treated as such:")) \ - LNGVALUE(blacklist_pause, "BlacklistPause", TEXT("Processes not to be pa&used or killed:")) \ - LNGVALUE(blacklist_findwindow_box, "BlacklistFindWindowBox", TEXT("Identify window")) \ + LNGVALUE(BlacklistBox, TEXT("Blacklist settings"), NULL) \ + LNGVALUE(BlacklistProcessBlacklist, TEXT("&Process blacklist:"), TEXT("Globally applies\r\nComa separated blacklist entries\r\nFormats:\r\nexename.exe\r\ntitle|class\r\nexename.exe:title|class\r\nyou can use the * as a joker ie:\r\n*|Notepad, Photoshop.exe, explorer.exe*|#32770")) \ + LNGVALUE(BlacklistBlacklist, TEXT("&Windows blacklist:"), NULL) \ + LNGVALUE(BlacklistScrolllist, TEXT("Windows that should ignore &scroll action:"), NULL) \ + LNGVALUE(BlacklistMDIs, TEXT("&MDIs not to be treated as such:"), NULL) \ + LNGVALUE(BlacklistPause, TEXT("Processes not to be pa&used or killed:"), NULL) \ + LNGVALUE(BlacklistFindWindowBox, TEXT("Identify window"), NULL) \ /* Advanced Tab */ \ - LNGVALUE(advanced_metrics_box, "AdvancedMetricsBox", TEXT("Metrics")) \ - LNGVALUE(advanced_centerfraction, "AdvancedCenterFraction", TEXT("&Center/Sides fraction (%):")) \ - LNGVALUE(advanced_aerohoffset, "AdvancedAeroHoffset", TEXT("Aero offset(%) &Horizontal:")) \ - LNGVALUE(advanced_aerovoffset, "AdvancedAeroVoffset", TEXT("&Vertical:")) \ - LNGVALUE(advanced_snapthreshold, "AdvancedSnapThreshold", TEXT("&Snap Threshold (pixels):")) \ - LNGVALUE(advanced_aerothreshold, "AdvancedAeroThreshold", TEXT("A&ero Threshold (pixels):")) \ - LNGVALUE(advanced_snapgap, "AdvancedSnapGap", TEXT("Snapping &gap (pixels):")) \ - LNGVALUE(advanced_aerospeed, "AdvancedAeroSpeed", TEXT("Ma&x snapping speed (pixels):")) \ - LNGVALUE(advanced_testwindow, "AdvancedTestWindow", TEXT("Test &Window")) \ - LNGVALUE(advanced_movetrans, "AdvancedMoveTrans", TEXT("Opacit&y when moving:")) \ - LNGVALUE(advanced_behavior_box, "AdvancedBehaviorBox", TEXT("Behavior")) \ - LNGVALUE(advanced_multipleinstances,"AdvancedMultipleInstances",TEXT("Allow multiple &instances of AltSnap")) \ - LNGVALUE(advanced_autoremaximize, "AdvancedAutoRemaximize", TEXT("Automatically &remaximize windows when changing monitor")) \ - LNGVALUE(advanced_aerotopmaximizes, "AdvancedAeroTopMaximizes", TEXT("&Maximize windows snapped at top")) \ - LNGVALUE(advanced_aerodbclickshift, "AdvancedAeroDBClickShift", TEXT("Invert shift &behavior for double-click aero snapping")) \ - LNGVALUE(advanced_maxwithlclick, "AdvancedMaxWithLClick", TEXT("&Toggle maximize state with the resize button while moving")) \ - LNGVALUE(advanced_restoreonclick, "AdvancedRestoreOnClick", TEXT("Rest&ore window with single click like original AltDrag")) \ - LNGVALUE(advanced_fullscreen, "AdvancedFullScreen", TEXT("Enable on &full screen windows")) \ - LNGVALUE(advanced_blmaximized, "AdvancedBLMaximized", TEXT("&Disable AltSnap on Maximized windows")) \ - LNGVALUE(advanced_fancyzone, "AdvancedFancyZone", TEXT("Restore Fancy&Zones snapped windows")) \ - LNGVALUE(advanced_norestore, "AdvancedNoRestore", TEXT("Never restore AltSna&pped windows")) \ - LNGVALUE(advanced_topmostindicator, "AdvancedTopmostIndicator", TEXT("Show an i&ndicator on always on top windows")) \ + LNGVALUE(AdvancedMetricsBox, TEXT("Metrics"), NULL) \ + LNGVALUE(AdvancedCenterFraction, TEXT("&Center/Sides fraction (%):"), NULL) \ + LNGVALUE(AdvancedAeroHoffset, TEXT("Aero offset(%) &Horizontal:"), NULL) \ + LNGVALUE(AdvancedAeroVoffset, TEXT("&Vertical:"), NULL) \ + LNGVALUE(AdvancedSnapThreshold, TEXT("&Snap Threshold (pixels):"), NULL) \ + LNGVALUE(AdvancedAeroThreshold, TEXT("A&ero Threshold (pixels):"), NULL) \ + LNGVALUE(AdvancedSnapGap, TEXT("Snapping &gap (pixels):"), NULL) \ + LNGVALUE(AdvancedAeroSpeed, TEXT("Ma&x snapping speed (pixels):"), NULL) \ + LNGVALUE(AdvancedTestWindow, TEXT("Test &Window"), NULL) \ + LNGVALUE(AdvancedMoveTrans, TEXT("Opacit&y when moving:"), NULL) \ + LNGVALUE(AdvancedBehaviorBox, TEXT("Behavior"), NULL) \ + LNGVALUE(AdvancedMultipleInstances,TEXT("Allow multiple &instances of AltSnap"), NULL) \ + LNGVALUE(AdvancedAutoRemaximize, TEXT("Automatically &remaximize windows when changing monitor"), NULL) \ + LNGVALUE(AdvancedAeroTopMaximizes, TEXT("&Maximize windows snapped at top"), NULL) \ + LNGVALUE(AdvancedAeroDBClickShift, TEXT("Invert shift &behavior for double-click aero snapping"), NULL) \ + LNGVALUE(AdvancedMaxWithLClick, TEXT("&Toggle maximize state with the resize button while moving"), NULL) \ + LNGVALUE(AdvancedRestoreOnClick, TEXT("Rest&ore window with single click like original AltDrag"), NULL) \ + LNGVALUE(AdvancedFullScreen, TEXT("Enable on &full screen windows"), NULL) \ + LNGVALUE(AdvancedBLMaximized, TEXT("&Disable AltSnap on Maximized windows"), NULL) \ + LNGVALUE(AdvancedFancyZone, TEXT("Restore Fancy&Zones snapped windows"), NULL) \ + LNGVALUE(AdvancedNoRestore, TEXT("Never restore AltSna&pped windows"), NULL) \ + LNGVALUE(AdvancedTopmostIndicator, TEXT("Show an i&ndicator on always on top windows"), NULL) \ /* About Tab */ \ - LNGVALUE(about_box, "AboutBox", TEXT("About ") APP_NAME ) \ - LNGVALUE(about_version, "AboutVersion", TEXT("Version ") TEXT( APP_VERSION )) \ - LNGVALUE(about_author, "AboutAuthor", TEXT("Created by Stefan Sundin")) \ - LNGVALUE(about_author2, "AboutAuthor2", TEXT("Maintained by Raymond Gillibert")) \ - LNGVALUE(about_license, "AboutLicense", APP_NAME TEXT(" is free and open source software!\nFeel free to redistribute!")) \ - LNGVALUE(about_translation_credit, "AboutTranslationCredit", TEXT("Translation credit")) \ + LNGVALUE(AboutBox, TEXT("About ") APP_NAME , NULL) \ + LNGVALUE(AboutVersion, TEXT("Version ") TEXT( APP_VERSION ), NULL) \ + LNGVALUE(AboutAuthor, TEXT("Created by Stefan Sundin"), NULL) \ + LNGVALUE(AboutAuthor2, TEXT("Maintained by Raymond Gillibert"), NULL) \ + LNGVALUE(AboutLicense, APP_NAME TEXT(" is free and open source software!\nFeel free to redistribute!"), NULL) \ + LNGVALUE(AboutTranslationCredit, TEXT("Translation credit"), NULL) \ /* Misc */ \ - LNGVALUE(unhook_error, "MiscUnhookError", TEXT("There was an error disabling AltDrag. This was most likely caused by Windows having already disabled AltDrag's hooks.\n\nIf this is the first time this has happened, you can safely ignore it and continue using AltDrag.\n\nIf this is happening repeatedly, you can read on the website how to prevent this from happening again (look for 'AltDrag mysteriously stops working' in the documentation).")) \ - LNGVALUE(zone_confirmation, "MiscZoneConfirmation", TEXT("Erase old snap layout and save current Test Windows positions as the new snap layout?")) \ - LNGVALUE(zone_testwinhelp, "MiscZoneTestWinHelp", TEXT("To setup Snap layout:\n1) Open several of those Test Windows\n2) Dispose them as you please\n3) Hit the *&Save test windows as snap layout* option in the tray menu")) \ + LNGVALUE(MiscUnhookError, TEXT("There was an error disabling AltDrag. This was most likely caused by Windows having already disabled AltDrag's hooks.\n\nIf this is the first time this has happened, you can safely ignore it and continue using AltDrag.\n\nIf this is happening repeatedly, you can read on the website how to prevent this from happening again (look for 'AltDrag mysteriously stops working' in the documentation)."), NULL) \ + LNGVALUE(MiscZoneConfirmation, TEXT("Erase old snap layout and save current Test Windows positions as the new snap layout?"), NULL) \ + LNGVALUE(MiscZoneTestWinHelp, TEXT("To setup Snap layout:\n1) Open several of those Test Windows\n2) Dispose them as you please\n3) Hit the *&Save test windows as snap layout* option in the tray menu"), NULL) \ /* Extended character list for each virtual key */ \ - LNGVALUE(a, "A", TEXT("àáâäæãåª%āăąǎǟǡǣǻǽȁȃȧ|Ȧḁ%ⱥ|Ⱥɐ|Ɐɑ|Ɑɒ|Ɒⲁ|Ⲁⓐ")) \ - LNGVALUE(b, "B", TEXT("%ƀɓƃƅɃ%ɓḃḅḇⓑ")) \ - LNGVALUE(c, "C", TEXT("碩%ćĉċčƈḉȼ|Ȼɕⓒ")) \ - LNGVALUE(d, "D", TEXT("ð%ďđɖɗƌƍḋḍḏḑḓdžDždzDzȡȸⓓ")) \ - LNGVALUE(e, "E", TEXT("èéêë€%ēĕėęěǝəɛȅȇḕḗḙḛȩ|Ȩḝɇ|Ɇⱸⓔ")) \ - LNGVALUE(f, "F", TEXT("ƒ%ḟɸⱷⓕ%♩♪♮♭♯♬♫")) \ - LNGVALUE(g, "G", TEXT("%ǵǧḡɠɣǥⓖ")) \ - LNGVALUE(h, "H", TEXT("%ĥħƕǶḣḥḧḩḫȟ|Ȟⱨ|Ⱨⱶ|Ⱶẖⓗ")) \ - LNGVALUE(i, "I", TEXT("ìíîï%ĩīĭǐȉȋįİıijɩɨḭḯⓘ")) \ - LNGVALUE(j, "J", TEXT("%ĵǰȷɉ|Ɉⓙ")) \ - LNGVALUE(k, "K", TEXT("%ķĸƙǩḱḳⱪ|Ⱪꝁ|Ꝁʞ|Ʞⓚ")) \ - LNGVALUE(l, "L", TEXT("£%ĺļľŀłƛljLjȴƚ|Ƚⱡ|Ⱡɫ|Ɫḷḹḻḽⓛ")) \ - LNGVALUE(m, "M", TEXT("µ%ḿṁṃɱ|Ɱɯⓜ")) \ - LNGVALUE(n, "N", TEXT("ñ%ńņňʼnŋɲƞ|ȠnjNjǹȵ%ṅṇṉṋⓝ")) \ - LNGVALUE(o, "O", TEXT("òóôöœõø°%ōŏő%ɔɵơƣǒǫǭǿȍȏȣ|Ȣȫ|Ȫȭ|Ȭȯ|Ȯȱ|Ȱṍṏṑṓ%ⱺⓞ")) \ - LNGVALUE(p, "P", TEXT("¶þ·•%ƥᵽ|Ᵽṕṗⓟ")) \ - LNGVALUE(q, "Q", TEXT("¿¤‰‘’“”„…–—«»‹›%ȹɋ|Ɋⓠ")) \ - LNGVALUE(r, "R", TEXT("®%ŕŗřƦȑȓṙṛṝṟɍ|Ɍɽ|Ɽⱹⓡ")) \ - LNGVALUE(s, "S", TEXT("šß§%śŝşſ%ƨʃƪș|Șȿ|Ȿ%ṡṣṥṧṩⓢ")) \ - LNGVALUE(t, "T", TEXT("†‡™%ţťŧƫƭʈț|Țȶⱦ|Ⱦ%ṫṭṯṱẗⓣ")) \ - LNGVALUE(u, "U", TEXT("ùúûü%ũūůŭűų%ưʊǔǖǘǚǜȕȗʉ|Ʉ%ṳṵṷṹṻⓤ")) \ - LNGVALUE(v, "V", TEXT("%ʋɅⱱⱴ%ṽṿⓥ")) \ - LNGVALUE(w, "W", TEXT("%ẁẃŵẅⱳ|Ⱳ%ẇẉⓦ")) \ - LNGVALUE(x, "X", TEXT("±×÷¬%ẋẍⓧ")) \ - LNGVALUE(y, "Y", TEXT("ýÿ¥%ŷẏȳ|Ȳƴɏ|Ɏⓨ")) \ - LNGVALUE(z, "Z", TEXT("ž%źẑżẓẕ%ƶʒƹƺǯȥ|Ȥɀ|Ɀⱬ|Ⱬⓩ")) + LNGVALUE(a, TEXT("àáâäæãåª%āăąǎǟǡǣǻǽȁȃȧ|Ȧḁ%ⱥ|Ⱥɐ|Ɐɑ|Ɑɒ|Ɒⲁ|Ⲁⓐ"), NULL) \ + LNGVALUE(b, TEXT("%ƀɓƃƅɃ%ɓḃḅḇⓑ"), NULL) \ + LNGVALUE(c, TEXT("碩%ćĉċčƈḉȼ|Ȼɕⓒ"), NULL) \ + LNGVALUE(d, TEXT("ð%ďđɖɗƌƍḋḍḏḑḓdžDždzDzȡȸⓓ"), NULL) \ + LNGVALUE(e, TEXT("èéêë€%ēĕėęěǝəɛȅȇḕḗḙḛȩ|Ȩḝɇ|Ɇⱸⓔ"), NULL) \ + LNGVALUE(f, TEXT("ƒ%ḟɸⱷⓕ%♩♪♮♭♯♬♫"), NULL) \ + LNGVALUE(g, TEXT("%ǵǧḡɠɣǥⓖ"), NULL) \ + LNGVALUE(h, TEXT("%ĥħƕǶḣḥḧḩḫȟ|Ȟⱨ|Ⱨⱶ|Ⱶẖⓗ"), NULL) \ + LNGVALUE(i, TEXT("ìíîï%ĩīĭǐȉȋįİıijɩɨḭḯⓘ"), NULL) \ + LNGVALUE(j, TEXT("%ĵǰȷɉ|Ɉⓙ"), NULL) \ + LNGVALUE(k, TEXT("%ķĸƙǩḱḳⱪ|Ⱪꝁ|Ꝁʞ|Ʞⓚ"), NULL) \ + LNGVALUE(l, TEXT("£%ĺļľŀłƛljLjȴƚ|Ƚⱡ|Ⱡɫ|Ɫḷḹḻḽⓛ"), NULL) \ + LNGVALUE(m, TEXT("µ%ḿṁṃɱ|Ɱɯⓜ"), NULL) \ + LNGVALUE(n, TEXT("ñ%ńņňʼnŋɲƞ|ȠnjNjǹȵ%ṅṇṉṋⓝ"), NULL) \ + LNGVALUE(o, TEXT("òóôöœõø°%ōŏő%ɔɵơƣǒǫǭǿȍȏȣ|Ȣȫ|Ȫȭ|Ȭȯ|Ȯȱ|Ȱṍṏṑṓ%ⱺⓞ"), NULL) \ + LNGVALUE(p, TEXT("¶þ·•%ƥᵽ|Ᵽṕṗⓟ"), NULL) \ + LNGVALUE(q, TEXT("¿¤‰‘’“”„…–—«»‹›%ȹɋ|Ɋⓠ"), NULL) \ + LNGVALUE(r, TEXT("®%ŕŗřƦȑȓṙṛṝṟɍ|Ɍɽ|Ɽⱹⓡ"), NULL) \ + LNGVALUE(s, TEXT("šß§%śŝşſ%ƨʃƪș|Șȿ|Ȿ%ṡṣṥṧṩⓢ"), NULL) \ + LNGVALUE(t, TEXT("†‡™%ţťŧƫƭʈț|Țȶⱦ|Ⱦ%ṫṭṯṱẗⓣ"), NULL) \ + LNGVALUE(u, TEXT("ùúûü%ũūůŭűų%ưʊǔǖǘǚǜȕȗʉ|Ʉ%ṳṵṷṹṻⓤ"), NULL) \ + LNGVALUE(v, TEXT("%ʋɅⱱⱴ%ṽṿⓥ"), NULL) \ + LNGVALUE(w, TEXT("%ẁẃŵẅⱳ|Ⱳ%ẇẉⓦ"), NULL) \ + LNGVALUE(x, TEXT("±×÷¬%ẋẍⓧ"), NULL) \ + LNGVALUE(y, TEXT("ýÿ¥%ŷẏȳ|Ȳƴɏ|Ɏⓨ"), NULL) \ + LNGVALUE(z, TEXT("ž%źẑżẓẕ%ƶʒƹƺǯȥ|Ȥɀ|Ɀⱬ|Ⱬⓩ"), NULL) -#define LNGVALUE(x, y, z) TCHAR *x; -// String structure definition +#define LNGVALUE(x, y, z) TCHAR *x, *x##_T_T_; +// String structure definition TCHAR *translation, *tooltip; struct strings { LANGUAGE_MAP }; #undef LNGVALUE -#define LNGVALUE(x, y, z) y, +#define LNGVALUE(x, y, z) #x, // Name of values ini entries static const char* l10n_inimapping[] = { LANGUAGE_MAP }; #undef LNGVALUE -#define LNGVALUE(x, y, z) z, +#define LNGVALUE(x, y, z) y, z, // Default values en-US static const struct strings en_US = { LANGUAGE_MAP }; #undef LANGVALUE diff --git a/tray.c b/tray.c index 9bf3297..c11e268 100644 --- a/tray.c +++ b/tray.c @@ -235,7 +235,7 @@ static void CloseAllTestWindows() static void catFullLayoutName(TCHAR *txt, size_t len, int laynum) { TCHAR n1[UINT_DIGITS+1]; - lstrcat_s(txt, len, l10n->menu_snaplayout); + lstrcat_s(txt, len, l10n->MenuSnapLayout); lstrcat_s(txt, len, Uint2lStr(n1, laynum+1)); if (g_dllmsgHKhwnd) { DWORD rez =0; @@ -250,7 +250,7 @@ static void catFullLayoutName(TCHAR *txt, size_t len, int laynum) lstrcat_s(txt, len, TEXT(")")); } else { lstrcat_s(txt, len, TEXT(" ")); - lstrcat_s(txt, len, l10n->menu_emptyzone); // (empty) + lstrcat_s(txt, len, l10n->MenuEmptyZone); // (empty) } } else { lstrcat_s(txt, len, TEXT(" (...)")); @@ -264,16 +264,16 @@ static void ShowContextMenu(HWND hwnd) GetCursorPos(&pt); HMENU menu = CreatePopupMenu(); - AppendMenu(menu, MF_STRING, SWM_TOGGLE, (ENABLED()?l10n->menu_disable:l10n->menu_enable)); - AppendMenu(menu, MF_STRING, SWM_HIDE, l10n->menu_hide); + AppendMenu(menu, MF_STRING, SWM_TOGGLE, (ENABLED()?l10n->MenuDisable:l10n->MenuEnable)); + AppendMenu(menu, MF_STRING, SWM_HIDE, l10n->MenuHideTray); if(VISTA) InsertMenu(menu, -1, elevated?MF_BYPOSITION|MF_GRAYED:MF_BYPOSITION - , SWM_ELEVATE, (elevated? l10n->general_elevated: l10n->general_elevate)); + , SWM_ELEVATE, (elevated? l10n->GeneralElevated: l10n->GeneralElevate)); AppendMenu(menu, MF_SEPARATOR, 0, NULL); - AppendMenu(menu, MF_STRING, SWM_CONFIG, l10n->menu_config); - AppendMenu(menu, MF_STRING, SWM_ABOUT, l10n->menu_about); - AppendMenu(menu, MF_STRING, SWM_OPENINIFILE, l10n->menu_openinifile); + AppendMenu(menu, MF_STRING, SWM_CONFIG, l10n->MenuConfigure); + AppendMenu(menu, MF_STRING, SWM_ABOUT, l10n->MenuAbout); + AppendMenu(menu, MF_STRING, SWM_OPENINIFILE, l10n->MenuOpenIniFile); if (UseZones&1) { // Zones section if(MaxLayouts) @@ -291,22 +291,22 @@ static void ShowContextMenu(HWND hwnd) if (!(UseZones&2)) { TCHAR numstr[INT_DIGITS+1]; - lstrcpy_s(txt, ARR_SZ(txt), l10n->menu_editlayout); + lstrcpy_s(txt, ARR_SZ(txt), l10n->MenuEditLayout); lstrcat_s(txt, ARR_SZ(txt), TEXT(" ")); lstrcat_s(txt, ARR_SZ(txt), Int2lStr(numstr, LayoutNumber+1)); AppendMenu(menu, MF_SEPARATOR, 0, NULL); - AppendMenu(menu, MF_STRING, SWM_TESTWIN, l10n->advanced_testwindow); + AppendMenu(menu, MF_STRING, SWM_TESTWIN, l10n->AdvancedTestWindow); AppendMenu(menu, MF_STRING, SWM_EDITLAYOUT, txt); AppendMenu(menu, FindWindow(TEXT(APP_NAMEA)TEXT("-test"), NULL)? MF_STRING :MF_STRING|MF_GRAYED - , SWM_SAVEZONES, l10n->menu_savezones); + , SWM_SAVEZONES, l10n->MenuSaveZones); AppendMenu(menu, FindWindow(TEXT(APP_NAMEA)TEXT("-test"), NULL)? MF_STRING :MF_STRING|MF_GRAYED - , SWM_CLOSEZONES, l10n->menu_closeallzones); + , SWM_CLOSEZONES, l10n->MenuCloseAllZones); } } AppendMenu(menu, MF_SEPARATOR, 0, NULL); - AppendMenu(menu, MF_STRING, SWM_EXIT, l10n->menu_exit); + AppendMenu(menu, MF_STRING, SWM_EXIT, l10n->MenuExit); // Track menu SetForegroundWindow(hwnd);