summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-24 19:25:05 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-24 19:25:05 +0300
commite84e1506adf6f0b65bab0bc5e243f6497749b7c4 (patch)
treeab529b452c9371dabc29d085c3c4630c9400d9ae /plugins
parent026adc1f0c2e30b2e21ac66f1af8b32485bc9bf2 (diff)
more unused shit cleaned
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ExternalAPI/delphi/m_tabsrmm.inc9
-rw-r--r--plugins/TabSRMM/src/chat_window.cpp2
-rw-r--r--plugins/TabSRMM/src/functions.h2
-rw-r--r--plugins/TabSRMM/src/generic_msghandlers.cpp2
-rw-r--r--plugins/TabSRMM/src/mim.cpp2
-rw-r--r--plugins/TabSRMM/src/msgs.cpp12
-rw-r--r--plugins/TabSRMM/src/msgs.h212
7 files changed, 102 insertions, 139 deletions
diff --git a/plugins/ExternalAPI/delphi/m_tabsrmm.inc b/plugins/ExternalAPI/delphi/m_tabsrmm.inc
index 367808c4ed..b07cb6d5bf 100644
--- a/plugins/ExternalAPI/delphi/m_tabsrmm.inc
+++ b/plugins/ExternalAPI/delphi/m_tabsrmm.inc
@@ -15,13 +15,4 @@ const
}
MS_TABMSG_HOTKEYPROCESS:PAnsiChar = 'SRMsg_MOD/ProcessHotkey';
-{
- Checks if there is a message window opened
- wParam=(LPARAM)(HANDLE)hContact - handle of the contact for which the window is searched.
- ignored if lParam is not zero.
- lParam=(LPARAM)(HWND)hwnd - a window handle - SET THIS TO 0 if you want to obtain the window
- handle from the hContact.
-}
- MS_MSG_MOD_MESSAGEDIALOGOPENED:PAnsiChar = 'SRMsg_MOD/MessageDialogOpened';
-
{$ENDIF}
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp
index d5aa212c48..d25fb396bb 100644
--- a/plugins/TabSRMM/src/chat_window.cpp
+++ b/plugins/TabSRMM/src/chat_window.cpp
@@ -764,7 +764,7 @@ void CChatRoomDlg::AddLog()
{
if (PluginConfig.m_bUseDividers) {
if (PluginConfig.m_bDividersUsePopupConfig) {
- if (!MessageWindowOpened(0, (LPARAM)m_hwnd))
+ if (!MessageWindowOpened(0, m_hwnd))
DM_AddDivider();
}
else {
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h
index e079a3f5d4..95cf88d7da 100644
--- a/plugins/TabSRMM/src/functions.h
+++ b/plugins/TabSRMM/src/functions.h
@@ -95,7 +95,7 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT
void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WPARAM wParam, LPARAM lParam);
void TSAPI SetAeroMargins(TContainerData *pContainer);
-INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam);
+int TSAPI MessageWindowOpened(MCONTACT hContact, HWND hwnd);
LRESULT CALLBACK IEViewSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK HPPKFSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp
index 0fb0539c43..8d4bc0ecbf 100644
--- a/plugins/TabSRMM/src/generic_msghandlers.cpp
+++ b/plugins/TabSRMM/src/generic_msghandlers.cpp
@@ -1224,7 +1224,7 @@ void CTabBaseDlg::DM_EventAdded(WPARAM hContact, LPARAM lParam)
// been minimized or in the background.
if (!(dbei.flags & DBEF_SENT) && !bIsStatusChangeEvent) {
if (PluginConfig.m_bDividersUsePopupConfig && PluginConfig.m_bUseDividers) {
- if (!MessageWindowOpened(m_hContact, 0))
+ if (!MessageWindowOpened(m_hContact, nullptr))
DM_AddDivider();
}
else if (PluginConfig.m_bUseDividers) {
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index ab30aa8372..1737500343 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -246,7 +246,7 @@ int CMimAPI::TypingMessage(WPARAM hContact, LPARAM mode)
preTyping = SendMessage(hwnd, DM_TYPING, 0, mode);
if (hwnd && IsWindowVisible(hwnd))
- foundWin = MessageWindowOpened(0, (LPARAM)hwnd);
+ foundWin = MessageWindowOpened(0, hwnd);
else
foundWin = 0;
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index d83ae79efc..cf07478788 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -403,15 +403,15 @@ static INT_PTR ReloadSettings(WPARAM, LPARAM lParam)
// 0 if there is none (or the popup mode of the target container was configured to "hide"
// the window..
-INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam)
+int TSAPI MessageWindowOpened(MCONTACT hContact, HWND _hwnd)
{
HWND hwnd = 0;
TContainerData *pContainer = nullptr;
- if (wParam)
- hwnd = M.FindWindow(wParam);
- else if (lParam)
- hwnd = (HWND)lParam;
+ if (hContact)
+ hwnd = M.FindWindow(hContact);
+ else if (_hwnd)
+ hwnd = _hwnd;
else
return 0;
@@ -1108,8 +1108,6 @@ static void TSAPI InitAPI()
CreateServiceFunction(MS_TABMSG_TRAYSUPPORT, Service_OpenTrayMenu);
CreateServiceFunction(MS_TABMSG_SLQMGR, CSendLater::svcQMgr);
- CreateServiceFunction(MS_MSG_MOD_MESSAGEDIALOGOPENED, MessageWindowOpened);
-
CreateServiceFunction("SRMsg/BroadcastMessage", BroadcastMessage);
CreateServiceFunction("TabSRMsg/ReloadSkin", ReloadSkin);
CreateServiceFunction("TabSRMsg/ReloadSettings", ReloadSettings);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 07597dbf75..c42a1b1be7 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -611,45 +611,42 @@ struct TIconDescW
#define MIN_PANELHEIGHT 20
// flags for the container dwFlags
-#define CNT_MOUSEDOWN 1
-#define CNT_NOTITLE 2
-#define CNT_HIDETABS 4
-#define CNT_SIDEBAR 8
-#define CNT_NOFLASH 0x10
-#define CNT_STICKY 0x20
-#define CNT_DONTREPORT 0x40
-#define CNT_FLASHALWAYS 0x80
-#define CNT_TRANSPARENCY 0x100
-#define CNT_AUTOHIDE 0x200
-#define CNT_DONTREPORTFOCUSED 0x400
-//#define CNT_GLOBALSETTINGS 0x400
-#define CNT_GLOBALSIZE 0x800
-#define CNT_INFOPANEL 0x1000
-#define CNT_NOSOUND 0x2000
-#define CNT_AUTOSPLITTER 0x4000
-#define CNT_DEFERREDCONFIGURE 0x8000
-#define CNT_CREATE_MINIMIZED 0x10000
-#define CNT_NEED_UPDATETITLE 0x20000
-#define CNT_DEFERREDSIZEREQUEST 0x40000
-#define CNT_DONTREPORTUNFOCUSED 0x80000
-#define CNT_DONTREPORTFOCUSED 0x400
+#define CNT_MOUSEDOWN 1
+#define CNT_NOTITLE 2
+#define CNT_HIDETABS 4
+#define CNT_SIDEBAR 8
+#define CNT_NOFLASH 0x10
+#define CNT_STICKY 0x20
+#define CNT_DONTREPORT 0x40
+#define CNT_FLASHALWAYS 0x80
+#define CNT_TRANSPARENCY 0x100
+#define CNT_AVATARSONTASKBAR 0x200
+#define CNT_DONTREPORTFOCUSED 0x400
+#define CNT_GLOBALSIZE 0x800
+#define CNT_INFOPANEL 0x1000
+#define CNT_NOSOUND 0x2000
+#define CNT_AUTOSPLITTER 0x4000
+#define CNT_DEFERREDCONFIGURE 0x8000
+#define CNT_CREATE_MINIMIZED 0x10000
+#define CNT_NEED_UPDATETITLE 0x20000
+#define CNT_DEFERREDSIZEREQUEST 0x40000
+#define CNT_DONTREPORTUNFOCUSED 0x80000
#define CNT_ALWAYSREPORTINACTIVE 0x100000
-#define CNT_NEWCONTAINERFLAGS 0x200000
-#define CNT_DEFERREDTABSELECT 0x400000
-#define CNT_CREATE_CLONED 0x800000
-#define CNT_NOSTATUSBAR 0x1000000
-#define CNT_NOMENUBAR 0x2000000
-#define CNT_TABSBOTTOM 0x4000000
-#define CNT_AVATARSONTASKBAR 0x200
-#define CNT_BOTTOMTOOLBAR 0x10000000
-#define CNT_HIDETOOLBAR 0x20000000
-#define CNT_UINSTATUSBAR 0x40000000
-#define CNT_VERTICALMAX 0x80000000
-
-#define CNT_EX_SOUNDS_MINIMIZED 1024
-#define CNT_EX_SOUNDS_UNFOCUSED 2048
-#define CNT_EX_SOUNDS_INACTIVETABS 4096
-#define CNT_EX_SOUNDS_FOCUSED 8192
+#define CNT_NEWCONTAINERFLAGS 0x200000
+#define CNT_DEFERREDTABSELECT 0x400000
+#define CNT_CREATE_CLONED 0x800000
+#define CNT_NOSTATUSBAR 0x1000000
+#define CNT_NOMENUBAR 0x2000000
+#define CNT_TABSBOTTOM 0x4000000
+#define CNT_BOTTOMTOOLBAR 0x10000000
+#define CNT_HIDETOOLBAR 0x20000000
+#define CNT_UINSTATUSBAR 0x40000000
+#define CNT_VERTICALMAX 0x80000000
+
+#define CNT_EX_SOUNDS_MINIMIZED 1024
+#define CNT_EX_SOUNDS_UNFOCUSED 2048
+#define CNT_EX_SOUNDS_INACTIVETABS 4096
+#define CNT_EX_SOUNDS_FOCUSED 8192
#define CNT_FLAGS_DEFAULT (CNT_DONTREPORT | CNT_DONTREPORTUNFOCUSED | CNT_ALWAYSREPORTINACTIVE | CNT_HIDETABS | CNT_NEWCONTAINERFLAGS | CNT_NOMENUBAR | CNT_INFOPANEL)
#define CNT_TRANS_DEFAULT 0x00ff00ff
@@ -750,20 +747,18 @@ struct TIconDescW
// wParam values for DM_SELECTTAB
-#define DM_SELECT_NEXT 1
-#define DM_SELECT_PREV 2
+#define DM_SELECT_NEXT 1
+#define DM_SELECT_PREV 2
+
+#define DM_SELECT_BY_HWND 3 // lParam specifies hwnd
+#define DM_SELECT_BY_INDEX 4 // lParam specifies tab index
+
+#define DM_QUERY_NEXT 1
+#define DM_QUERY_MOSTRECENT 2
-#define DM_SELECT_BY_HWND 3 // lParam specifies hwnd
-#define DM_SELECT_BY_INDEX 4 // lParam specifies tab index
-
-#define DM_QUERY_NEXT 1
-#define DM_QUERY_MOSTRECENT 2
-
-/*
- * implement a callback for the rich edit. Without it, no bitmaps
- * can be added to the richedit control.
- * this class has to implement the GetNewStorage() method
- */
+// implement a callback for the rich edit. Without it, no bitmaps
+// can be added to the richedit control.
+// this class has to implement the GetNewStorage() method
struct CREOleCallback : public IRichEditOleCallback
{
@@ -915,12 +910,14 @@ struct TCpTable {
#define LOI_TYPE_FLAG 1
#define LOI_TYPE_SETTING 2
-struct TOptionListGroup {
+struct TOptionListGroup
+{
LRESULT handle;
wchar_t *szName;
};
-struct TOptionListItem {
+struct TOptionListItem
+{
LRESULT handle;
wchar_t *szName;
UINT id;
@@ -940,13 +937,13 @@ struct TOptionListItem {
// fixed stock button identifiers
-#define IDC_SBAR_SLIST 1111
-#define IDC_SBAR_FAVORITES 1112
-#define IDC_SBAR_RECENT 1113
-#define IDC_SBAR_SETUP 1114
-#define IDC_SBAR_USERPREFS 1115
-#define IDC_SBAR_TOGGLEFORMAT 1117
-#define IDC_SBAR_CANCEL 1118
+#define IDC_SBAR_SLIST 1111
+#define IDC_SBAR_FAVORITES 1112
+#define IDC_SBAR_RECENT 1113
+#define IDC_SBAR_SETUP 1114
+#define IDC_SBAR_USERPREFS 1115
+#define IDC_SBAR_TOGGLEFORMAT 1117
+#define IDC_SBAR_CANCEL 1118
struct SIDEBARITEM {
UINT uId;
@@ -958,41 +955,41 @@ struct SIDEBARITEM {
wchar_t *tszTip;
};
-#define FONTF_BOLD 1
-#define FONTF_ITALIC 2
-#define FONTF_UNDERLINE 4
+#define FONTF_BOLD 1
+#define FONTF_ITALIC 2
+#define FONTF_UNDERLINE 4
#define FONTF_STRIKEOUT 8
#define RTFCACHELINESIZE 128
-#define ID_EXTBKCONTAINER 0
-#define ID_EXTBKBUTTONBAR 1
-#define ID_EXTBKBUTTONSPRESSED 2
-#define ID_EXTBKBUTTONSNPRESSED 3
-#define ID_EXTBKBUTTONSMOUSEOVER 4
-#define ID_EXTBKINFOPANEL 5
-#define ID_EXTBKTITLEBUTTON 6
-#define ID_EXTBKTITLEBUTTONMOUSEOVER 7
-#define ID_EXTBKTITLEBUTTONPRESSED 8
-#define ID_EXTBKTABPAGE 9
-#define ID_EXTBKTABITEM 10
-#define ID_EXTBKTABITEMACTIVE 11
-#define ID_EXTBKTABITEMBOTTOM 12
-#define ID_EXTBKTABITEMACTIVEBOTTOM 13
-#define ID_EXTBKFRAME 14
-#define ID_EXTBKHISTORY 15
-#define ID_EXTBKINPUTAREA 16
-#define ID_EXTBKFRAMEINACTIVE 17
-#define ID_EXTBKTABITEMHOTTRACK 18
+#define ID_EXTBKCONTAINER 0
+#define ID_EXTBKBUTTONBAR 1
+#define ID_EXTBKBUTTONSPRESSED 2
+#define ID_EXTBKBUTTONSNPRESSED 3
+#define ID_EXTBKBUTTONSMOUSEOVER 4
+#define ID_EXTBKINFOPANEL 5
+#define ID_EXTBKTITLEBUTTON 6
+#define ID_EXTBKTITLEBUTTONMOUSEOVER 7
+#define ID_EXTBKTITLEBUTTONPRESSED 8
+#define ID_EXTBKTABPAGE 9
+#define ID_EXTBKTABITEM 10
+#define ID_EXTBKTABITEMACTIVE 11
+#define ID_EXTBKTABITEMBOTTOM 12
+#define ID_EXTBKTABITEMACTIVEBOTTOM 13
+#define ID_EXTBKFRAME 14
+#define ID_EXTBKHISTORY 15
+#define ID_EXTBKINPUTAREA 16
+#define ID_EXTBKFRAMEINACTIVE 17
+#define ID_EXTBKTABITEMHOTTRACK 18
#define ID_EXTBKTABITEMHOTTRACKBOTTOM 19
-#define ID_EXTBKSTATUSBARPANEL 20
-#define ID_EXTBKSTATUSBAR 21
-#define ID_EXTBKUSERLIST 22
-#define ID_EXTBKINFOPANELBG 23
-#define ID_EXTBKSIDEBARBG 24
-#define ID_EXTBK_LAST 24
+#define ID_EXTBKSTATUSBARPANEL 20
+#define ID_EXTBKSTATUSBAR 21
+#define ID_EXTBKUSERLIST 22
+#define ID_EXTBKINFOPANELBG 23
+#define ID_EXTBKSIDEBARBG 24
+#define ID_EXTBK_LAST 24
-#define DEFAULT_SIDEBARWIDTH 30
+#define DEFAULT_SIDEBARWIDTH 30
#define THEME_READ_FONTS 1
#define THEME_READ_TEMPLATES 2
@@ -1024,9 +1021,7 @@ struct TABSRMM_SessionInfo {
// lParam must be 0
#define MS_TABMSG_TRAYSUPPORT "SRMsg_MOD/Show_TrayMenu"
-/*
- * the service which processes globally registered hotkeys
- */
+// the service which processes globally registered hotkeys
#define MS_TABMSG_HOTKEYPROCESS "SRMsg_MOD/ProcessHotkey"
#define MBF_DISABLED 0x01
@@ -1034,20 +1029,10 @@ struct TABSRMM_SessionInfo {
#define TEMPLATES_MODULE "tabSRMM_Templates"
#define RTLTEMPLATES_MODULE "tabSRMM_RTLTemplates"
-//Checks if there is a message window opened
-//wParam=(LPARAM)(HANDLE)hContact - handle of the contact for which the window is searched. ignored if lParam
-//is not zero.
-//lParam=(LPARAM)(HWND)hwnd - a window handle - SET THIS TO 0 if you want to obtain the window handle
-//from the hContact.
-#define MS_MSG_MOD_MESSAGEDIALOGOPENED "SRMsg_MOD/MessageDialogOpened"
-
// custom tabSRMM events
-
#define tabMSG_WINDOW_EVT_CUSTOM_BEFORESEND 1
-
-/* temporary HPP API for emulating message log */
-
+// temporary HPP API for emulating message log
#define MS_HPP_EG_WINDOW "History++/ExtGrid/NewWindow"
#define MS_HPP_EG_EVENT "History++/ExtGrid/Event"
#define MS_HPP_EG_UTILS "History++/ExtGrid/Utils"
@@ -1058,10 +1043,7 @@ struct TABSRMM_SessionInfo {
#define DEFAULT_CONTAINER_POS 0x00400040 // default container position and size
#define DEFAULT_CONTAINER_SIZE 0x019001f4
-/*
- * core hotkey service ids
- */
-
+// core hotkey service ids
#define TABSRMM_HK_LASTUNREAD 2
#define TABSRMM_HK_LASTRECENT 4
#define TABSRMM_HK_PASTEANDSEND 8
@@ -1095,10 +1077,7 @@ struct TABSRMM_SessionInfo {
#define TABSRMM_HK_SECTION_GENERIC LPGEN("Message windows - all")
#define TABSRMM_HK_SECTION_GC LPGEN("Message windows - group chats")
-/*
- * encryption status bar indicator
- */
-
+// encryption status bar indicator
#define MSG_ICON_MODULE " TabSrmm"
#define MSG_ICON_SESSION 0
@@ -1108,21 +1087,16 @@ struct TABSRMM_SessionInfo {
int SI_InitStatusIcons();
int SI_DeinitStatusIcons();
-int GetStatusIconsCount();
-
struct SKINDESC
{
- ULONG ulID; // resource id
- wchar_t tszName[30];
+ ULONG ulID;
+ wchar_t tszName[30];
};
#define SKIN_NR_ELEMENTS 6
#define SKIN_VERSION 2
-/*
- * icon defintions (index into g_buttonBarIcons)
- */
-
+// icon defintions (index into g_buttonBarIcons)
#define ICON_DEFAULT_SOUNDS 22
#define ICON_DEFAULT_PULLDOWN 16
#define ICON_DEFAULT_LEFT 25