diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-27 10:24:54 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-03-27 10:24:54 +0000 |
commit | 6e9ace645b7d24ed0fe60f4b7714d3bb11739dfc (patch) | |
tree | 10c6c2c8666a7421744910f9ab58630dc88dd47c /protocols/GTalkExt/src/options.cpp | |
parent | 61efc6be20aa4315e9e524dffeb9b5c812ab19cc (diff) |
GTalkExt: icon added to icolib
git-svn-id: http://svn.miranda-ng.org/main/trunk@16553 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src/options.cpp')
-rw-r--r-- | protocols/GTalkExt/src/options.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/protocols/GTalkExt/src/options.cpp b/protocols/GTalkExt/src/options.cpp index d82087963b..30987c66b6 100644 --- a/protocols/GTalkExt/src/options.cpp +++ b/protocols/GTalkExt/src/options.cpp @@ -36,8 +36,6 @@ #define TEST_LETTER_SENDER LPGENT(" bems\n")
#define TEST_LETTER_SNIP LPGENT("* Primitive type system\n* No overloading\n* Limited possibility of data abstraction, polymorphism, subtyping and code reuse\n* No metaprogramming except preprocessor macros\n* No exceptions")
-extern HINSTANCE g_hInst;
-
void CheckControlsEnabled(HWND wnd)
{
BOOL PopupsEnabled = (SendDlgItemMessage(wnd, IDC_POPUPSENABLED, BM_GETSTATE, 0, 0) & BST_CHECKED) == BST_CHECKED;
@@ -161,17 +159,12 @@ void ShowTestPopup(HWND wnd) mir_sntprintf(data.lptzText, TranslateTS(FULL_NOTIFICATION_FORMAT), TranslateTS(TEST_LETTER_SUBJECT), TranslateTS(TEST_LETTER_SENDER), TranslateTS(TEST_LETTER_SNIP));
int len = SendDlgItemMessage(wnd, IDC_TIMEOUTEDIT, WM_GETTEXTLENGTH, 0, 0) + 1;
- LPTSTR timeout = (LPTSTR)malloc(len * sizeof(TCHAR));
- __try {
- GetDlgItemText(wnd, IDC_TIMEOUTEDIT, timeout, len);
- data.iSeconds = _ttoi(timeout);
- }
- __finally {
- free(timeout);
- }
+ LPTSTR timeout = (LPTSTR)_alloca(len * sizeof(TCHAR));
+
+ GetDlgItemText(wnd, IDC_TIMEOUTEDIT, timeout, len);
+ data.iSeconds = _ttoi(timeout);
- extern HICON g_hPopupIcon;
- data.lchIcon = g_hPopupIcon;
+ data.lchIcon = IcoLib_GetIconByHandle(iconList[0].hIcolib);
data.colorBack = (COLORREF)SendDlgItemMessage(wnd, IDC_BACKCOLORPICKER, CPM_GETCOLOUR, 0, 0);
data.colorText = (COLORREF)SendDlgItemMessage(wnd, IDC_TEXTCOLORPICKER, CPM_GETCOLOUR, 0, 0);
if (data.colorBack == data.colorText) {
|