From b2269a81668efaf157d541f2ffd67e52b89417c6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 1 Mar 2013 21:11:59 +0000 Subject: useless Folders support checks removed git-svn-id: http://svn.miranda-ng.org/main/trunk@3824 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/VersionInfo/src/CVersionInfo.cpp | 2 +- plugins/VersionInfo/src/common.h | 1 - plugins/VersionInfo/src/dlgHandlers.cpp | 8 ++++---- plugins/VersionInfo/src/hooked_events.cpp | 2 -- plugins/VersionInfo/src/main.cpp | 1 - 5 files changed, 5 insertions(+), 9 deletions(-) (limited to 'plugins/VersionInfo/src') diff --git a/plugins/VersionInfo/src/CVersionInfo.cpp b/plugins/VersionInfo/src/CVersionInfo.cpp index 1604babb81..e26a6dc233 100644 --- a/plugins/VersionInfo/src/CVersionInfo.cpp +++ b/plugins/VersionInfo/src/CVersionInfo.cpp @@ -1113,7 +1113,7 @@ std::tstring CVersionInfo::GetInformationsAsString(int bDisableForumStyle) { void CVersionInfo::PrintInformationsToFile(const TCHAR *info) { TCHAR buffer[MAX_PATH], outputFileName[MAX_PATH]; - if (bFoldersAvailable) { + if (hOutputLocation) { FoldersGetCustomPathT(hOutputLocation, buffer, SIZEOF(buffer), _T("%miranda_path%")); _tcscat(buffer, _T("\\VersionInfo.txt")); } diff --git a/plugins/VersionInfo/src/common.h b/plugins/VersionInfo/src/common.h index 20d48e5f3b..cbbf057daa 100644 --- a/plugins/VersionInfo/src/common.h +++ b/plugins/VersionInfo/src/common.h @@ -82,7 +82,6 @@ extern HICON hiVIIcon; extern DWORD EnglishLocale; //for folders support -extern BOOL bFoldersAvailable; extern HANDLE hOutputLocation; //services.cpp diff --git a/plugins/VersionInfo/src/dlgHandlers.cpp b/plugins/VersionInfo/src/dlgHandlers.cpp index a1a81e6a51..733a4cd3dc 100644 --- a/plugins/VersionInfo/src/dlgHandlers.cpp +++ b/plugins/VersionInfo/src/dlgHandlers.cpp @@ -264,7 +264,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) else RelativePathToAbsolute( _T("VersionInfo.txt"), notFound, SIZEOF(notFound)); - if (bFoldersAvailable) + if (hOutputLocation) _tcscpy(buffer, TranslateT("Customize using folders plugin")); else _tcsncpy(buffer, notFound, SIZEOF(notFound)); @@ -345,7 +345,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hWnd, IDC_SHOWINTASKBAR), IsDlgButtonChecked(hWnd, IDC_TODIALOGBOX) ? TRUE : FALSE); //only enable for to dialog box EnableWindow(GetDlgItem(hWnd, IDC_DISABLEDTOO), IsDlgButtonChecked(hWnd, IDC_FORUMSTYLE) ? FALSE : TRUE); //if forum style disable show disabled plugins EnableWindow(GetDlgItem(hWnd, IDC_CLIPBOARDALSO), IsDlgButtonChecked(hWnd, IDC_TOCLIPBOARD) ? FALSE : TRUE); //don't enable always clipboard if we're printing to clipboard - EnableWindow(GetDlgItem(hWnd, IDC_FILENAME), ((IsDlgButtonChecked(hWnd, IDC_TOFILE)) && (!bFoldersAvailable)) ? TRUE : FALSE); + EnableWindow(GetDlgItem(hWnd, IDC_FILENAME), ((IsDlgButtonChecked(hWnd, IDC_TOFILE)) && (!hOutputLocation)) ? TRUE : FALSE); EnableUploadSettings(hWnd, IsDlgButtonChecked(hWnd, IDC_TOUPLOAD) ? TRUE : FALSE); { OSVERSIONINFO osvi = { 0 }; @@ -378,7 +378,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) EnableWindow(GetDlgItem(hWnd, IDC_SIZECOMBOBOX), IsDlgButtonChecked(hWnd, IDC_FORUMSTYLE) ? TRUE : FALSE); //forum style only EnableWindow(GetDlgItem(hWnd, IDC_BOLDVERSION), IsDlgButtonChecked(hWnd, IDC_FORUMSTYLE) ? TRUE : FALSE); //forum style only EnableWindow(GetDlgItem(hWnd, IDC_BOLDCOMBOBOX), (IsDlgButtonChecked(hWnd, IDC_BOLDVERSION) & IsDlgButtonChecked(hWnd, IDC_FORUMSTYLE)) ? TRUE : FALSE); //both forum style and bold version checked - EnableWindow(GetDlgItem(hWnd, IDC_FILENAME), ((IsDlgButtonChecked(hWnd, IDC_TOFILE)) && (!bFoldersAvailable)) ? TRUE : FALSE); + EnableWindow(GetDlgItem(hWnd, IDC_FILENAME), ((IsDlgButtonChecked(hWnd, IDC_TOFILE)) && (!hOutputLocation)) ? TRUE : FALSE); EnableWindow(GetDlgItem(hWnd, IDC_SHOWINTASKBAR), IsDlgButtonChecked(hWnd, IDC_TODIALOGBOX) ? TRUE : FALSE); //only enable for to dialog box EnableWindow(GetDlgItem(hWnd, IDC_DISABLEDTOO), IsDlgButtonChecked(hWnd, IDC_FORUMSTYLE) ? FALSE : TRUE); //if forum style disable show disabled plugins EnableWindow(GetDlgItem(hWnd, IDC_CLIPBOARDALSO), IsDlgButtonChecked(hWnd, IDC_TOCLIPBOARD) ? FALSE : TRUE); //don't enable always clipboard if we're printing to clipboard @@ -461,7 +461,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) DBWriteContactSettingByte(NULL, ModuleName, "ShowUUIDs", IsDlgButtonChecked(hWnd, IDC_SHOWUUIDS) ? TRUE : FALSE); DBWriteContactSettingByte(NULL, ModuleName, "ShowInstalledLanguages", IsDlgButtonChecked(hWnd, IDC_SHOWINSTALLEDLANGUAGES) ? TRUE : FALSE); - if (!bFoldersAvailable) { + if (!hOutputLocation) { TCHAR filePath[MAX_PATH], fileName[MAX_PATH]; GetDlgItemText(hWnd, IDC_FILENAME, fileName, MAX_PATH); AbsolutePathToRelative(fileName, filePath, SIZEOF(filePath)); diff --git a/plugins/VersionInfo/src/hooked_events.cpp b/plugins/VersionInfo/src/hooked_events.cpp index fb28978377..44c24ec9ef 100644 --- a/plugins/VersionInfo/src/hooked_events.cpp +++ b/plugins/VersionInfo/src/hooked_events.cpp @@ -49,8 +49,6 @@ int UnhookEvents() int OnModulesLoaded(WPARAM wParam, LPARAM lParam) { - - bFoldersAvailable = ServiceExists(MS_FOLDERS_REGISTER_PATH); hOutputLocation = FoldersRegisterCustomPathT("VersionInfo", "Output folder", _T("%miranda_path%")); GetStringFromDatabase("UUIDCharMark", _T(DEF_UUID_CHARMARK), PLUGIN_UUID_MARK, cPLUGIN_UUID_MARK); diff --git a/plugins/VersionInfo/src/main.cpp b/plugins/VersionInfo/src/main.cpp index 5068fceece..7a5810917d 100644 --- a/plugins/VersionInfo/src/main.cpp +++ b/plugins/VersionInfo/src/main.cpp @@ -30,7 +30,6 @@ HICON hiVIIcon; DWORD EnglishLocale; -BOOL bFoldersAvailable = FALSE; HANDLE hOutputLocation = NULL; //for folders plugin void * (* MirandaMalloc)(size_t); -- cgit v1.2.3