From 9a544494ea5dc8b9a41da6d38015e9c4a1a0f3a6 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Mon, 28 Oct 2013 18:35:39 +0000 Subject: cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@6662 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db_autobackups/src/main.cpp | 21 +++------------------ 1 file changed, 3 insertions(+), 18 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 dc6aea1c5d..097f7d54ee 100644 --- a/plugins/Db_autobackups/src/main.cpp +++ b/plugins/Db_autobackups/src/main.cpp @@ -67,9 +67,7 @@ static int ModulesLoad(WPARAM, LPARAM) FoldersInit(); LoadOptions(); - MenuInit(); - HookEvent(ME_OPT_INITIALISE, OptionsInit); if(options.backup_types & BT_START) mir_forkthread(BackupThread, NULL); return 0; @@ -94,7 +92,9 @@ void SysInit() CreateServiceFunction(MS_AB_BACKUP, ABService); CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs); - + MenuInit(); + + HookEvent(ME_OPT_INITIALISE, OptionsInit); HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown); HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoad); } @@ -133,21 +133,6 @@ void ShowPopup(TCHAR* text, TCHAR* header) PUAddPopupT(&ppd); } -int CreateDirectoryTree(TCHAR *szDir) -{ - TCHAR szTestDir[MAX_PATH]; - - lstrcpyn(szTestDir, szDir, SIZEOF(szTestDir)); - TCHAR *pszLastBackslash = _tcsrchr( szTestDir, '\\' ); - if ( pszLastBackslash == NULL ) - return 0; - - *pszLastBackslash = '\0'; - CreateDirectoryTree( szTestDir ); - *pszLastBackslash = '\\'; - return ( CreateDirectory( szTestDir, NULL ) == 0 ) ? GetLastError() : 0; -} - HWND CreateToolTip(HWND hwndParent, LPTSTR ptszText, LPTSTR ptszTitle) { HWND hwndTT = CreateWindowEx(WS_EX_TOPMOST, -- cgit v1.2.3