From fe844a9cc0b23a1c1a9906fe606c651f453ff8ec Mon Sep 17 00:00:00 2001 From: Tobias Weimer <wishmaster51@googlemail.com> Date: Sat, 3 Nov 2012 19:56:33 +0000 Subject: minor options layout issue (ticket:152) git-svn-id: http://svn.miranda-ng.org/main/trunk@2173 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/StopSpamPlus/res/stopspam.rc | 63 ++++++++++++++++++----------------- plugins/StopSpamPlus/src/headers.h | 2 +- plugins/StopSpamPlus/src/options.cpp | 16 ++++----- plugins/StopSpamPlus/src/resource.h | 11 +++--- plugins/StopSpamPlus/src/stopspam.cpp | 2 +- plugins/StopSpamPlus/src/utils.cpp | 3 +- 6 files changed, 50 insertions(+), 47 deletions(-) (limited to 'plugins') diff --git a/plugins/StopSpamPlus/res/stopspam.rc b/plugins/StopSpamPlus/res/stopspam.rc index 4cb4a45a1c..498e4efc50 100644 --- a/plugins/StopSpamPlus/res/stopspam.rc +++ b/plugins/StopSpamPlus/res/stopspam.rc @@ -13,59 +13,59 @@ #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// -// Russian resources +// Russian (Russia) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_RUS) -#ifdef _WIN32 LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT #pragma code_page(1251) -#endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// // // Dialog // -IDD_MESSAGES DIALOGEX 0, 0, 302, 225 +IDD_MESSAGES DIALOGEX 0, 0, 302, 232 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_POPUP | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN LTEXT "Question: (Ctrl-Enter for carriage return)",IDC_STATIC,0,5,156,8 EDITTEXT ID_QUESTION,0,17,300,57,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL - PUSHBUTTON "Restore defaults",ID_RESTOREDEFAULTS,234,217,66,14,NOT WS_TABSTOP + PUSHBUTTON "Restore defaults",ID_RESTOREDEFAULTS,234,213,66,14,NOT WS_TABSTOP LTEXT "Answer (Use divider to separate answers):",IDC_STATIC,0,82,240,8 EDITTEXT ID_ANSWER,0,94,250,14,ES_AUTOHSCROLL LTEXT "Congratulation:",IDC_STATIC,0,112,270,8 - EDITTEXT ID_CONGRATULATION,0,125,300,48,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL - LTEXT "Auth. request reply:",IDC_STATIC,0,174,270,8 - EDITTEXT ID_AUTHREPL,0,187,300,25,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL - LTEXT "Divider:",IDC_STATIC,255,82,60,8 + EDITTEXT ID_CONGRATULATION,0,125,300,34,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL + LTEXT "Auth. request reply:",IDC_STATIC,0,161,270,8 + EDITTEXT ID_AUTHREPL,0,174,300,35,ES_MULTILINE | ES_AUTOVSCROLL | WS_VSCROLL + LTEXT "Divider:",IDC_STATIC,255,82,31,8 EDITTEXT ID_DIVIDER,255,94,25,14 - CONTROL "Vars",IDC_VARS,"MButtonClass",WS_TABSTOP,0,217,16,16 + CONTROL "Vars",IDC_VARS,"MButtonClass",WS_TABSTOP,1,211,16,16 END IDD_PROTO DIALOGEX 0, 0, 300, 211 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - LTEXT "Disable protection for following protocols:",IDC_STATIC,44,24,173,11 - CONTROL "",IDC_PROTO,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | WS_BORDER | WS_HSCROLL | WS_TABSTOP | 0x4000,50,40,132,95 + LTEXT "Disable protection for following protocols:",IDC_STATIC,24,7,216,11 + CONTROL "",IDC_PROTO,"SysTreeView32",TVS_DISABLEDRAGDROP | TVS_NOTOOLTIPS | TVS_NONEVENHEIGHT | WS_BORDER | WS_HSCROLL | WS_TABSTOP,24,22,216,166 END -IDD_MAIN DIALOGEX 0, 0, 309, 180 +IDD_MAIN DIALOGEX 0, 0, 309, 189 STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - EDITTEXT ID_DESCRIPTION,12,7,290,82,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_TABSTOP + EDITTEXT ID_DESCRIPTION,12,7,282,82,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_TABSTOP CTEXT "Do not send more than ",IDC_STATIC,11,93,101,12,SS_CENTERIMAGE EDITTEXT ID_MAXQUESTCOUNT,113,93,30,12,ES_AUTOHSCROLL | ES_NUMBER - LTEXT " questions to one contact (0 - for no limit)",IDC_STATIC,144,93,155,12,SS_CENTERIMAGE - CONTROL "Enable StopSpam-StopSpam infinite talk protection",ID_INFTALKPROT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,109,270,10 - CONTROL "Add contact permanently",ID_ADDPERMANENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,121,270,8 + LTEXT " questions to one contact (0 - for no limit)",IDC_STATIC,144,93,150,12,SS_CENTERIMAGE + CONTROL "Enable StopSpam-StopSpam infinite talk protection",ID_INFTALKPROT, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,109,282,10 + CONTROL "Add contact permanently",ID_ADDPERMANENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,121,282,8 CONTROL "Enable auth. requests blocking",ID_HANDLEAUTHREQ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,133,270,8 - CONTROL "Answer is not case sensitive",ID_NOTCASESENS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,145,270,8 - CONTROL "Remove all tempory contacts after restart",ID_REMOVE_TMP_ALL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,157,270,8 - CONTROL "Log Spammers to system history",ID_HISTORY_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,169,270,8 + CONTROL "Answer is not case sensitive",ID_NOTCASESENS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,145,282,8 + CONTROL "Remove all tempory contacts after restart",ID_REMOVE_TMP_ALL, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,157,282,8 + CONTROL "Log Spammers to system history",ID_HISTORY_LOG,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,169,282,8 END @@ -75,45 +75,47 @@ END // #ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO +GUIDELINES DESIGNINFO BEGIN IDD_MESSAGES, DIALOG BEGIN RIGHTMARGIN, 300 TOPMARGIN, 7 - BOTTOMMARGIN, 222 + BOTTOMMARGIN, 227 END IDD_PROTO, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 223 + RIGHTMARGIN, 258 + VERTGUIDE, 24 + VERTGUIDE, 240 TOPMARGIN, 7 - BOTTOMMARGIN, 166 + BOTTOMMARGIN, 196 END IDD_MAIN, DIALOG BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 302 + VERTGUIDE, 12 + VERTGUIDE, 294 TOPMARGIN, 7 - BOTTOMMARGIN, 158 + BOTTOMMARGIN, 181 END END #endif // APSTUDIO_INVOKED -#endif // Russian resources +#endif // Russian (Russia) resources ///////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources +// English (United States) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) -#endif //_WIN32 #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// @@ -140,7 +142,7 @@ END #endif // APSTUDIO_INVOKED -#endif // English (U.S.) resources +#endif // English (United States) resources ///////////////////////////////////////////////////////////////////////////// @@ -154,3 +156,4 @@ END ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED + diff --git a/plugins/StopSpamPlus/src/headers.h b/plugins/StopSpamPlus/src/headers.h index 6da161f793..5675319390 100644 --- a/plugins/StopSpamPlus/src/headers.h +++ b/plugins/StopSpamPlus/src/headers.h @@ -35,7 +35,7 @@ #define pluginName "StopSpam" -extern char * pluginDescription; +extern TCHAR * pluginDescription; extern TCHAR const * infTalkProtPrefix; extern char const * answeredSetting; extern char const * questCountSetting; diff --git a/plugins/StopSpamPlus/src/options.cpp b/plugins/StopSpamPlus/src/options.cpp index f823fe8e1d..505e0dc801 100644 --- a/plugins/StopSpamPlus/src/options.cpp +++ b/plugins/StopSpamPlus/src/options.cpp @@ -1,12 +1,12 @@ #include "headers.h" -char * pluginDescription = "No more spam! Robots can't go! Only human beings invited!\r\n\r\n" -"This plugin works pretty simple:\r\n" -"While messages from users on your contact list go as there is no any anti-spam software, " -"messages from unknown users are not delivered to you. " -"But also they are not ignored, this plugin replies with a simple question, " -"and if user gives the right answer plugin adds him to your contact list " -"so that he can contact you."; +TCHAR * pluginDescription = _T("No more spam! Robots can't go! Only human beings invited!\r\n\r\n") +_T("This plugin works pretty simple:\r\n") +_T("While messages from users on your contact list go as there is no any anti-spam software, ") +_T("messages from unknown users are not delivered to you. ") +_T("But also they are not ignored, this plugin replies with a simple question, ") +_T("and if user gives the right answer plugin adds him to your contact list ") +_T("so that he can contact you."); TCHAR const * infTalkProtPrefix = _T("StopSpam automatic message:\r\n"); char const * answeredSetting = "Answered"; char const * questCountSetting = "QuestionCount"; @@ -18,7 +18,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { case WM_INITDIALOG: { - SetDlgItemTextA(hwnd, ID_DESCRIPTION, pluginDescription); + SetDlgItemText(hwnd, ID_DESCRIPTION, pluginDescription); TranslateDialogDefault(hwnd); SetDlgItemInt(hwnd, ID_MAXQUESTCOUNT, plSets->MaxQuestCount.Get(), FALSE); SendDlgItemMessage(hwnd, ID_INFTALKPROT, BM_SETCHECK, plSets->InfTalkProtection.Get() ? BST_CHECKED : BST_UNCHECKED, 0); diff --git a/plugins/StopSpamPlus/src/resource.h b/plugins/StopSpamPlus/src/resource.h index 62e603cb2e..5a61c2abcd 100644 --- a/plugins/StopSpamPlus/src/resource.h +++ b/plugins/StopSpamPlus/src/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. -// Used by stopspam.rc +// Used by C:\Users\xx\Documents\Visual Studio 2010\Projects\myranda\plugins\StopSpamPlus\res\stopspam.rc // #define IDD_MESSAGES 101 #define IDD_MAIN 102 @@ -16,11 +16,12 @@ #define ID_INFTALKPROT 1010 #define ID_ADDPERMANENT 1011 #define ID_HANDLEAUTHREQ 1012 -#define ID_NOTCASESENS 1013 -#define ID_DIVIDER 1014 +#define ID_NOTCASESENS 1013 +#define ID_DIVIDER 1014 #define IDC_VARS 1015 -#define ID_REMOVE_TMP_ALL 1016 -#define ID_HISTORY_LOG 1017 +#define ID_REMOVE_TMP_ALL 1016 +#define ID_HISTORY_LOG 1017 + // Next default values for new objects // #ifdef APSTUDIO_INVOKED diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp index e58b8846ff..42639424fd 100644 --- a/plugins/StopSpamPlus/src/stopspam.cpp +++ b/plugins/StopSpamPlus/src/stopspam.cpp @@ -60,7 +60,7 @@ extern "C" int __declspec(dllexport) Load(void) mi.position = -0x7FFFFFFF; mi.flags = CMIF_TCHAR; mi.hIcon=LoadSkinnedIcon(SKINICON_OTHER_MIRANDA); - mi.ptszName = _T("Remove Temporary Contacts"); + mi.ptszName = LPGENT("Remove Temporary Contacts"); mi.pszService = pluginName"/RemoveTempContacts"; Menu_AddMainMenuItem(&mi); diff --git a/plugins/StopSpamPlus/src/utils.cpp b/plugins/StopSpamPlus/src/utils.cpp index 7d8bc28050..885af411ad 100644 --- a/plugins/StopSpamPlus/src/utils.cpp +++ b/plugins/StopSpamPlus/src/utils.cpp @@ -46,7 +46,6 @@ void SetDlgItemString(HWND hwndDlg, UINT idItem, std::wstring const &str) tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){ if (ServiceExists(MS_VARS_FORMATSTRING)) { FORMATINFO fi; - TCHAR *tszParsed; tstring tstrResult; ZeroMemory(&fi, sizeof(fi)); @@ -54,7 +53,7 @@ tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){ fi.tszFormat = _tcsdup(tstrFormat.c_str()); fi.hContact = hContact; fi.flags |= FIF_TCHAR; - tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0); + TCHAR *tszParsed = (TCHAR *)CallService(MS_VARS_FORMATSTRING, (WPARAM)&fi, 0); free(fi.tszFormat); if (tszParsed) { tstrResult = tszParsed; -- cgit v1.2.3