summaryrefslogtreecommitdiff
path: root/src/core/stdchat
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-11-09 18:19:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-11-09 18:19:38 +0000
commit8e0b45f6bc2b9d272076511681691d481401d444 (patch)
treec200de9642bafb082b9694031b8025805fc56091 /src/core/stdchat
parent47228e4100e23cd63c015403aee1cf62a1bdf70c (diff)
fix for the hidden button names
git-svn-id: http://svn.miranda-ng.org/main/trunk@6837 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core/stdchat')
-rw-r--r--src/core/stdchat/res/chat.rc20
-rw-r--r--src/core/stdchat/src/window.cpp18
2 files changed, 17 insertions, 21 deletions
diff --git a/src/core/stdchat/res/chat.rc b/src/core/stdchat/res/chat.rc
index 81fb384ab6..12a6f3c475 100644
--- a/src/core/stdchat/res/chat.rc
+++ b/src/core/stdchat/res/chat.rc
@@ -38,16 +38,16 @@ BEGIN
ES_NUMBER | WS_VSCROLL | WS_TABSTOP,0,128,127,12,
WS_EX_STATICEDGE
PUSHBUTTON "&Send",IDOK,136,126,115,14,WS_DISABLED
- CONTROL "",IDC_SMILEY,"MButtonClass",WS_DISABLED | WS_TABSTOP,112,108,15,13,0x18000000L
- CONTROL "",IDC_BOLD,"MButtonClass",WS_DISABLED | WS_TABSTOP,8,108,15,13,0x18000000L
- CONTROL "",IDC_ITALICS,"MButtonClass",WS_DISABLED | WS_TABSTOP,24,108,15,13,0x18000000L
- CONTROL "",IDC_UNDERLINE,"MButtonClass",WS_DISABLED | WS_TABSTOP,40,108,15,13,0x18000000L
- CONTROL "",IDC_COLOR,"MButtonClass",WS_DISABLED | WS_TABSTOP,68,108,15,13,0x18000000L
- CONTROL "",IDC_BKGCOLOR,"MButtonClass",WS_DISABLED | WS_TABSTOP,84,108,15,13,0x18000000L
- CONTROL "",IDC_HISTORY,"MButtonClass",WS_TABSTOP,188,108,15,13,0x18000000L
- CONTROL "",IDC_FILTER,"MButtonClass",WS_TABSTOP,220,108,15,13,0x18000000L
- CONTROL "",IDC_CHANMGR,"MButtonClass",WS_DISABLED | WS_TABSTOP,204,108,15,13,0x18000000L
- CONTROL "",IDC_SHOWNICKLIST,"MButtonClass",WS_TABSTOP,236,108,15,13,0x18000000L
+ CONTROL "&Emoticons",IDC_SMILEY,"MButtonClass",WS_DISABLED | WS_TABSTOP,112,108,15,13,0x18000000L
+ CONTROL "&Bold",IDC_BOLD,"MButtonClass",WS_DISABLED | WS_TABSTOP,8,108,15,13,0x18000000L
+ CONTROL "&Italic",IDC_ITALICS,"MButtonClass",WS_DISABLED | WS_TABSTOP,24,108,15,13,0x18000000L
+ CONTROL "&Underline",IDC_UNDERLINE,"MButtonClass",WS_DISABLED | WS_TABSTOP,40,108,15,13,0x18000000L
+ CONTROL "&Color",IDC_COLOR,"MButtonClass",WS_DISABLED | WS_TABSTOP,68,108,15,13,0x18000000L
+ CONTROL "&Background color",IDC_BKGCOLOR,"MButtonClass",WS_DISABLED | WS_TABSTOP,84,108,15,13,0x18000000L
+ CONTROL "&History",IDC_HISTORY,"MButtonClass",WS_TABSTOP,188,108,15,13,0x18000000L
+ CONTROL "&Filter",IDC_FILTER,"MButtonClass",WS_TABSTOP,220,108,15,13,0x18000000L
+ CONTROL "&Room Settings",IDC_CHANMGR,"MButtonClass",WS_DISABLED | WS_TABSTOP,204,108,15,13,0x18000000L
+ CONTROL "&Show/hide nicklist",IDC_SHOWNICKLIST,"MButtonClass",WS_TABSTOP,236,108,15,13,0x18000000L
CONTROL "",IDC_LOG,RICHEDIT_CLASS,ES_MULTILINE | ES_AUTOVSCROLL |
ES_READONLY | ES_NUMBER | WS_VSCROLL | WS_TABSTOP,8,23,
164,73,WS_EX_STATICEDGE
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp
index 987c68be7c..04efea0260 100644
--- a/src/core/stdchat/src/window.cpp
+++ b/src/core/stdchat/src/window.cpp
@@ -74,10 +74,8 @@ static LRESULT CALLBACK SplitterSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LP
return mir_callNextSubclass(hwnd, SplitterSubclassProc, msg, wParam, lParam);
}
-static void InitButtons(HWND hwndDlg, SESSION_INFO* si)
+static void InitButtons(HWND hwndDlg, SESSION_INFO *si)
{
- MODULEINFO * pInfo = MM_FindModule(si->pszModule);
-
SendDlgItemMessage( hwndDlg, IDC_SMILEY, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx( "smiley", FALSE ));
SendDlgItemMessage( hwndDlg, IDC_BOLD, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx( "bold", FALSE ));
SendDlgItemMessage( hwndDlg, IDC_ITALICS, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadIconEx( "italics", FALSE ));
@@ -118,7 +116,8 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO* si)
SendDlgItemMessage(hwndDlg, IDC_UNDERLINE, BUTTONSETASPUSHBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_COLOR, BUTTONSETASPUSHBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_BKGCOLOR, BUTTONSETASPUSHBTN, TRUE, 0);
-
+
+ MODULEINFO *pInfo = MM_FindModule(si->pszModule);
if (pInfo) {
EnableWindow(GetDlgItem(hwndDlg, IDC_BOLD), pInfo->bBold);
EnableWindow(GetDlgItem(hwndDlg, IDC_ITALICS), pInfo->bItalics);
@@ -1159,14 +1158,12 @@ static void __cdecl phase2(void * lParam)
INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
- SESSION_INFO* si;
-
- si = (SESSION_INFO*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ SESSION_INFO *si = (SESSION_INFO*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (uMsg) {
case WM_INITDIALOG:
{
- int mask;
+ TranslateDialogDefault(hwndDlg);
HWND hNickList = GetDlgItem(hwndDlg,IDC_LIST);
si = (SESSION_INFO*)lParam;
si->pAccPropServicesForNickList = NULL;
@@ -1184,7 +1181,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
mir_subclassWindow( GetDlgItem(hwndDlg, IDC_MESSAGE), MessageSubclassProc);
SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_SUBCLASSED, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_AUTOURLDETECT, 1, 0);
- mask = (int)SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETEVENTMASK, 0, 0);
+ int mask = (int)SendDlgItemMessage(hwndDlg, IDC_LOG, EM_GETEVENTMASK, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETEVENTMASK, 0, mask | ENM_LINK | ENM_MOUSEEVENTS);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_LIMITTEXT, (WPARAM)sizeof(TCHAR)*0x7FFFFFFF, 0);
SendDlgItemMessage(hwndDlg, IDC_LOG, EM_SETOLECALLBACK, 0, (LPARAM) & reOleCallback);
@@ -1243,11 +1240,10 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
case GC_SETWNDPROPS:
{
- HICON hIcon;
LoadGlobalSettings();
InitButtons(hwndDlg, si);
- hIcon = si->wStatus==ID_STATUS_ONLINE?MM_FindModule(si->pszModule)->hOnlineIcon:MM_FindModule(si->pszModule)->hOfflineIcon;
+ HICON hIcon = si->wStatus==ID_STATUS_ONLINE?MM_FindModule(si->pszModule)->hOnlineIcon:MM_FindModule(si->pszModule)->hOfflineIcon;
// stupid hack to make icons show. I dunno why this is needed currently
if (!hIcon) {
MM_IconsChanged();