summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-19 12:27:44 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-19 12:27:44 +0000
commit0f37fbfbfe24563a6be07f9abd245374e66cb173 (patch)
tree28efbce80dc0f81698b56afa073115b0f8543a59 /src/core
parent8fbb710f69be547c9a1fb45346bbd01db9d23bee (diff)
chat code reordering
git-svn-id: http://svn.miranda-ng.org/main/trunk@17317 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r--src/core/stdchat/src/manager.cpp11
-rw-r--r--src/core/stdchat/src/services.cpp2
-rw-r--r--src/core/stdchat/src/stdafx.h1
-rw-r--r--src/core/stdchat/src/window.cpp2
4 files changed, 14 insertions, 2 deletions
diff --git a/src/core/stdchat/src/manager.cpp b/src/core/stdchat/src/manager.cpp
index 069e2230a9..1132c7e875 100644
--- a/src/core/stdchat/src/manager.cpp
+++ b/src/core/stdchat/src/manager.cpp
@@ -24,6 +24,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
TABLIST *g_TabList = 0;
+BOOL SM_SetTabbedWindowHwnd(SESSION_INFO *si, HWND hwnd)
+{
+ for (SESSION_INFO *p = pci->wndList; p != NULL; p = p->next) {
+ if (si && si == p)
+ p->hWnd = hwnd;
+ else
+ p->hWnd = NULL;
+ }
+ return TRUE;
+}
+
SESSION_INFO* SM_GetPrevWindow(SESSION_INFO *si)
{
if (!si)
diff --git a/src/core/stdchat/src/services.cpp b/src/core/stdchat/src/services.cpp
index f534c4a56c..5fe0c9c70e 100644
--- a/src/core/stdchat/src/services.cpp
+++ b/src/core/stdchat/src/services.cpp
@@ -61,7 +61,7 @@ void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground)
// if the session was not the current tab we need to tell the window to
// redraw to show the contents of the current SESSION_INFO
if (!si->hWnd) {
- pci->SM_SetTabbedWindowHwnd(si, g_TabSession.hWnd);
+ SM_SetTabbedWindowHwnd(si, g_TabSession.hWnd);
SendMessage(g_TabSession.hWnd, GC_ADDTAB, -1, (LPARAM)si);
SendMessage(g_TabSession.hWnd, GC_TABCHANGE, 0, (LPARAM)&g_TabSession);
}
diff --git a/src/core/stdchat/src/stdafx.h b/src/core/stdchat/src/stdafx.h
index 5e27b6b467..a5c90861a1 100644
--- a/src/core/stdchat/src/stdafx.h
+++ b/src/core/stdchat/src/stdafx.h
@@ -142,6 +142,7 @@ char* Log_CreateRtfHeader(MODULEINFO * mi);
INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam);
int GetTextPixelSize( wchar_t* pszText, HFONT hFont, BOOL bWidth);
+BOOL SM_SetTabbedWindowHwnd(SESSION_INFO *si, HWND hwnd);
SESSION_INFO* SM_GetPrevWindow(SESSION_INFO *si);
SESSION_INFO* SM_GetNextWindow(SESSION_INFO *si);
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp
index cd6be436d8..5f18af8b47 100644
--- a/src/core/stdchat/src/window.cpp
+++ b/src/core/stdchat/src/window.cpp
@@ -2590,7 +2590,7 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case GC_CLOSEWINDOW:
if (g_Settings.bTabsEnable)
- pci->SM_SetTabbedWindowHwnd(0, 0);
+ SM_SetTabbedWindowHwnd(0, 0);
DestroyWindow(hwndDlg);
break;