summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-12-19 17:32:21 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-12-19 17:44:58 +0300
commit10126b8ab2d030c8789525edcc87ff1c7c5b3e54 (patch)
tree0e4294f0df6289145d870f0e55763d086d2cd6ef
parent877a445bdf3ac484e564bb1d62610eeb1329e991 (diff)
unused parameter removed
-rw-r--r--include/m_chat_int.h2
-rw-r--r--plugins/Scriver/src/chat/chat.h2
-rw-r--r--plugins/Scriver/src/chat/window.cpp4
-rw-r--r--plugins/TabSRMM/src/chat/chat.h2
-rw-r--r--plugins/TabSRMM/src/chat/services.cpp2
-rw-r--r--plugins/TabSRMM/src/chat/tools.cpp2
-rw-r--r--src/core/stdmsg/src/chat_window.cpp4
-rw-r--r--src/core/stdmsg/src/stdafx.h2
-rw-r--r--src/core/stdmsg/src/tabs.cpp17
-rw-r--r--src/mir_app/src/chat_clist.cpp2
-rw-r--r--src/mir_app/src/chat_svc.cpp4
-rw-r--r--src/mir_app/src/chat_tools.cpp2
12 files changed, 20 insertions, 25 deletions
diff --git a/include/m_chat_int.h b/include/m_chat_int.h
index b5155ed375..1b24962ae4 100644
--- a/include/m_chat_int.h
+++ b/include/m_chat_int.h
@@ -388,7 +388,7 @@ struct CHAT_MANAGER
void (*OnOfflineSession)(SESSION_INFO*);
void (*OnReplaceSession)(SESSION_INFO*);
- void (*ShowRoom)(SESSION_INFO*, WPARAM wp, BOOL bSetForeground);
+ void (*ShowRoom)(SESSION_INFO*);
void (*OnGetLogName)(SESSION_INFO*, const wchar_t*);
void (*OnEventBroadcast)(SESSION_INFO *si, GCEVENT *gce);
diff --git a/plugins/Scriver/src/chat/chat.h b/plugins/Scriver/src/chat/chat.h
index adb495934c..3b03840bb9 100644
--- a/plugins/Scriver/src/chat/chat.h
+++ b/plugins/Scriver/src/chat/chat.h
@@ -82,7 +82,7 @@ void FreeMsgLogBitmaps(void);
int GetTextPixelSize( wchar_t* pszText, HFONT hFont, BOOL bWidth);
// services.c
-void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground);
+void ShowRoom(SESSION_INFO *si);
// manager.c
HWND SM_FindWindowByContact(MCONTACT hContact);
diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index 18734f4d68..47ec5ed001 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1197,7 +1197,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
SendMessage(hwndDlg, GC_FIXTABICONS, 0, 0);
if (!si->hWnd) {
- ShowRoom(si, WINDOW_VISIBLE, TRUE);
+ ShowRoom(si);
SendMessage(hwndDlg, WM_MOUSEACTIVATE, 0, 0);
}
break;
@@ -1797,7 +1797,7 @@ LABEL_SHOWWINDOW:
return FALSE;
}
-void ShowRoom(SESSION_INFO *si, WPARAM, BOOL)
+void ShowRoom(SESSION_INFO *si)
{
if (si == NULL)
return;
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h
index 9c813ccb7f..cd66ceab98 100644
--- a/plugins/TabSRMM/src/chat/chat.h
+++ b/plugins/TabSRMM/src/chat/chat.h
@@ -125,7 +125,7 @@ void AddIcons(void);
HICON LoadIconEx(char *pszIcoLibName);
// services.c
-void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL);
+void ShowRoom(SESSION_INFO *si);
HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup);
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp
index 6f318e40f6..4a1dbc7592 100644
--- a/plugins/TabSRMM/src/chat/services.cpp
+++ b/plugins/TabSRMM/src/chat/services.cpp
@@ -153,7 +153,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT
return hwndNew; // return handle of the new dialog
}
-void ShowRoom(SESSION_INFO *si, WPARAM, BOOL)
+void ShowRoom(SESSION_INFO *si)
{
if (si == NULL)
return;
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp
index 2dfb0a18cf..8dc44d5f37 100644
--- a/plugins/TabSRMM/src/chat/tools.cpp
+++ b/plugins/TabSRMM/src/chat/tools.cpp
@@ -39,7 +39,7 @@ int GetRichTextLength(HWND hwnd)
static void __stdcall ShowRoomFromPopup(void *pi)
{
SESSION_INFO *si = (SESSION_INFO*)pi;
- ShowRoom(si, WINDOW_VISIBLE, TRUE);
+ ShowRoom(si);
}
static void __stdcall Chat_DismissPopup(void *pi)
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp
index febbeb7a60..cb0c685987 100644
--- a/src/core/stdmsg/src/chat_window.cpp
+++ b/src/core/stdmsg/src/chat_window.cpp
@@ -218,7 +218,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
if (g_Settings.bTabsEnable)
SendMessage(GetParent(GetParent(hwndDlg)), GC_SWITCHNEXTTAB, 0, 0);
else
- pci->ShowRoom(SM_GetNextWindow(dat->si), WINDOW_VISIBLE, TRUE);
+ pci->ShowRoom(SM_GetNextWindow(dat->si));
return TRUE;
}
@@ -226,7 +226,7 @@ static LRESULT CALLBACK MessageSubclassProc(HWND hwnd, UINT msg, WPARAM wParam,
if (g_Settings.bTabsEnable)
SendMessage(GetParent(GetParent(hwndDlg)), GC_SWITCHPREVTAB, 0, 0);
else
- pci->ShowRoom(SM_GetPrevWindow(dat->si), WINDOW_VISIBLE, TRUE);
+ pci->ShowRoom(SM_GetPrevWindow(dat->si));
return TRUE;
}
diff --git a/src/core/stdmsg/src/stdafx.h b/src/core/stdmsg/src/stdafx.h
index 7fb974d23c..e1658bf1f4 100644
--- a/src/core/stdmsg/src/stdafx.h
+++ b/src/core/stdmsg/src/stdafx.h
@@ -139,7 +139,7 @@ HICON LoadIconEx(const char *pszIcoLibName, bool big);
HANDLE GetIconHandle(const char *pszIcolibName);
// services.cpp
-void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground);
+void ShowRoom(SESSION_INFO *si);
// tools.cpp
int GetColorIndex(const char* pszModule, COLORREF cr);
diff --git a/src/core/stdmsg/src/tabs.cpp b/src/core/stdmsg/src/tabs.cpp
index 6eb59da245..32fa470e83 100644
--- a/src/core/stdmsg/src/tabs.cpp
+++ b/src/core/stdmsg/src/tabs.cpp
@@ -252,7 +252,7 @@ void CTabbedWindow::TabClicked()
SendMessage(m_hwnd, GC_FIXTABICONS, 0, (LPARAM)pDlg);
if (!s->hWnd) {
- pci->ShowRoom(s, WINDOW_VISIBLE, TRUE);
+ pci->ShowRoom(s);
SendMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0);
}
}
@@ -529,7 +529,7 @@ void UninitTabs()
/////////////////////////////////////////////////////////////////////////////////////////
-void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL)
+void ShowRoom(SESSION_INFO *si)
{
if (!si)
return;
@@ -559,14 +559,11 @@ void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL)
}
SetWindowLongPtr(si->hWnd, GWL_EXSTYLE, GetWindowLongPtr(si->hWnd, GWL_EXSTYLE) | WS_EX_APPWINDOW);
- if (!IsWindowVisible(si->hWnd) || wp == WINDOW_HIDDEN)
- SendMessage(si->hWnd, GC_CONTROL_MSG, wp, 0);
- else {
- if (IsIconic(si->hWnd))
- ShowWindow(si->hWnd, SW_NORMAL);
- ShowWindow(si->hWnd, SW_SHOW);
- SetForegroundWindow(si->hWnd);
- }
+
+ if (IsIconic(si->hWnd))
+ ShowWindow(si->hWnd, SW_NORMAL);
+ ShowWindow(si->hWnd, SW_SHOW);
+ SetForegroundWindow(si->hWnd);
SendMessage(si->hWnd, WM_MOUSEACTIVATE, 0, 0);
SetFocus(GetDlgItem(si->hWnd, IDC_MESSAGE));
diff --git a/src/mir_app/src/chat_clist.cpp b/src/mir_app/src/chat_clist.cpp
index 27268d8a8d..93346dd334 100644
--- a/src/mir_app/src/chat_clist.cpp
+++ b/src/mir_app/src/chat_clist.cpp
@@ -121,7 +121,7 @@ int RoomDoubleclicked(WPARAM hContact, LPARAM)
PostMessage(si->hWnd, GC_CLOSEWINDOW, 0, 0);
return 1;
}
- chatApi.ShowRoom(si, WINDOW_VISIBLE, TRUE);
+ chatApi.ShowRoom(si);
}
return 1;
}
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp
index edd6dab94e..6181e50b9c 100644
--- a/src/mir_app/src/chat_svc.cpp
+++ b/src/mir_app/src/chat_svc.cpp
@@ -299,8 +299,6 @@ static INT_PTR __stdcall stubRoomControl(void *param)
if (SESSION_INFO *si = chatApi.SM_FindSession(p->wszId, p->szModule)) {
SetInitDone(si);
chatApi.SetActiveSession(si->ptszID, si->pszModule);
- if (si->hWnd)
- chatApi.ShowRoom(si, p->command, FALSE);
}
return 0;
@@ -311,7 +309,7 @@ static INT_PTR __stdcall stubRoomControl(void *param)
if (SESSION_INFO *si = chatApi.SM_FindSession(p->wszId, p->szModule)) {
SetInitDone(si);
if (p->command != SESSION_INITDONE || db_get_b(NULL, CHAT_MODULE, "PopupOnJoin", 0) == 0)
- chatApi.ShowRoom(si, p->command, TRUE);
+ chatApi.ShowRoom(si);
return 0;
}
break;
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 566e1c07e7..92031d6a4a 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -133,7 +133,7 @@ BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce)
static void __stdcall ShowRoomFromPopup(void *pi)
{
SESSION_INFO *si = (SESSION_INFO*)pi;
- chatApi.ShowRoom(si, WINDOW_VISIBLE, TRUE);
+ chatApi.ShowRoom(si);
}
static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)