diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-18 16:00:59 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-18 16:00:59 +0000 |
commit | 56fde48e71d039f0485d0ca8d593e0089859bb29 (patch) | |
tree | fe18364a180f6457d1485e77f12830d34a639aaa /plugins/Db_autobackups/src/main.cpp | |
parent | 948f6b2b9a6980461656b7c55b7815cb5554dbb2 (diff) |
db_autobackups: code optimization
git-svn-id: http://svn.miranda-ng.org/main/trunk@16497 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db_autobackups/src/main.cpp')
-rw-r--r-- | plugins/Db_autobackups/src/main.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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);
|