From 56fde48e71d039f0485d0ca8d593e0089859bb29 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Fri, 18 Mar 2016 16:00:59 +0000 Subject: db_autobackups: code optimization git-svn-id: http://svn.miranda-ng.org/main/trunk@16497 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db_autobackups/src/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'plugins/Db_autobackups/src/main.cpp') diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp index 92a4963789..dc104cc7f6 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -4,6 +4,7 @@ int hLangpack; HINSTANCE g_hInstance; TCHAR *profilePath; HANDLE hFolder; +char g_szMirVer[100]; PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), @@ -37,10 +38,10 @@ static INT_PTR DBSaveAs(WPARAM, LPARAM) OPENFILENAME ofn = { 0 }; CallService(MS_DB_GETPROFILENAMET, _countof(fname_buff), (LPARAM)fname_buff); - mir_sntprintf(tszFilter, _T("%s (*.dat)%c*.dat%c%s (*.zip)%c*.zip%c%s (*.*)%c*%c"), - TranslateT("Miranda NG databases"), 0, 0, - TranslateT("Compressed Miranda NG databases"), 0, 0, - TranslateT("All files"), 0, 0); + mir_sntprintf(tszFilter, _T("%s (*.dat)\0*.dat\0%s (*.zip)\0*.zip\0%s (*.*)\0*\0"), + TranslateT("Miranda NG databases"), + TranslateT("Compressed Miranda NG databases"), + TranslateT("All files")); ofn.lStructSize = sizeof(ofn); ofn.lpstrFile = fname_buff; @@ -113,6 +114,8 @@ extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfo); + CallService(MS_SYSTEM_GETVERSIONTEXT, sizeof(g_szMirVer), LPARAM(g_szMirVer)); + HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoad); -- cgit v1.2.3