From e5e268f1267ac0a16303081f1532fa1597911887 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 5 Jul 2018 23:17:49 +0300 Subject: fixes #1448 (translated frame names in database) --- plugins/AutoShutdown/src/frame.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/AutoShutdown/src') diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp index c27c96c3fe..3c1f18750e 100644 --- a/plugins/AutoShutdown/src/frame.cpp +++ b/plugins/AutoShutdown/src/frame.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* Show Frame */ static HWND hwndCountdownFrame; -static WORD hFrame; +static int hFrame; /* Misc */ static HANDLE hHookModulesLoaded; @@ -494,18 +494,18 @@ void ShowCountdownFrame(WORD fTimeFlags) if (hwndCountdownFrame == nullptr) return; if (ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) { - CLISTFrame clf = { sizeof(clf) }; - clf.hIcon = IcoLib_GetIcon("AutoShutdown_Active"); /* CListFrames does not make a copy */ - clf.align = alBottom; - clf.height = GetSystemMetrics(SM_CYICON); - clf.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_SKINNED; - clf.name = Translate(MODULENAME); - clf.TBname = Translate("Automatic shutdown"); - clf.hWnd = hwndCountdownFrame; - hFrame = (WORD)CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&clf, 0); + CLISTFrame Frame = { sizeof(Frame) }; + Frame.hIcon = IcoLib_GetIcon("AutoShutdown_Active"); /* CListFrames does not make a copy */ + Frame.align = alBottom; + Frame.height = GetSystemMetrics(SM_CYICON); + Frame.Flags = F_VISIBLE | F_SHOWTBTIP | F_NOBORDER | F_SKINNED; + Frame.szName.a = MODULENAME; + Frame.szTBname.a = LPGEN("Automatic shutdown"); + Frame.hWnd = hwndCountdownFrame; + hFrame = g_plugin.addFrame(&Frame); if (hFrame) { ShowWindow(hwndCountdownFrame, SW_SHOW); - CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME, hFrame), (LPARAM)clf.name); + CallService(MS_CLIST_FRAMES_SETFRAMEOPTIONS, MAKEWPARAM(FO_TBTIPNAME, hFrame), (LPARAM)MODULENAME); /* HACKS TO FIX CLUI FRAMES: * *** why is CLUIFrames is horribly buggy??! *** date: sept 2005, nothing changed until sept 2006 * workaround #1: MS_CLIST_FRAMES_REMOVEFRAME does not finish with destroy cycle (clist_modern, clist_nicer crashes) */ -- cgit v1.2.3