summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-28 15:56:57 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-28 15:56:57 +0300
commit1ab93d3afabe3a5872040b5acafc9f113c196a2b (patch)
treeec309e3cdd8c34e830022525be003278fae0330f
parent2be5844edd93ab3490b4689cad33d75b4c77f3a8 (diff)
some more fixes for 64-bit version
-rw-r--r--include/m_message.h19
-rw-r--r--libs/win64/mir_app.libbin113744 -> 113576 bytes
-rw-r--r--plugins/MirFox/src/MirandaUtils.cpp2
-rw-r--r--plugins/MirLua/src/m_message.cpp2
-rw-r--r--plugins/MirandaG15/src/CAppletManager.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/MsgEventAdded.cpp8
-rw-r--r--plugins/WinterSpeak/src/SpeakAnnounce.cpp2
-rw-r--r--src/mir_app/src/genmenu.h2
-rw-r--r--src/mir_app/src/menu_options.cpp2
-rw-r--r--src/mir_app/src/menu_utils.cpp2
-rw-r--r--src/mir_app/src/srmm_util.cpp2
11 files changed, 22 insertions, 21 deletions
diff --git a/include/m_message.h b/include/m_message.h
index 2ea263bd50..b00e1c0abe 100644
--- a/include/m_message.h
+++ b/include/m_message.h
@@ -71,11 +71,16 @@ struct StatusTextData
wchar_t tszText[100];
};
+/////////////////////////////////////////////////////////////////////////////////////////
// wparam = (MCONTACT)hContact
// lparam = (StatusTextData*) or NULL to clear statusbar
// Sets a statusbar line text for the appropriate contact
#define MS_MSG_SETSTATUSTEXT "MessageAPI/SetStatusText"
+/////////////////////////////////////////////////////////////////////////////////////////
+// retrieves some particular info about a SRMM window by contact
+// returns 0 if a window was found or an error code otherwise
+
#define MSG_WINDOW_STATE_EXISTS 0x00000001 // Window exists should always be true if hwndWindow exists
#define MSG_WINDOW_STATE_VISIBLE 0x00000002
#define MSG_WINDOW_STATE_FOCUS 0x00000004
@@ -90,7 +95,7 @@ struct MessageWindowData
EXTERN_C MIR_APP_DLL(int) Srmm_GetWindowData(MCONTACT hContact, MessageWindowData &mwd);
-///////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////
// wparam = 0 (unused)
// lparam = (MessageWindowEvent*)
// fired before SRMM writes an entered message into the database
@@ -103,7 +108,7 @@ struct MessageWindowEvent
DBEVENTINFO *dbei; // database event written on the basis of message sent
};
-/////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// SRMM popup menu
// wParam = 0
@@ -131,7 +136,7 @@ struct MessageWindowPopupData
int selection; // The menu control id or 0 if no one was selected
};
-/////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// status icons
#define MBF_DISABLED 0x01
@@ -170,7 +175,7 @@ EXTERN_C MIR_APP_DLL(int) Srmm_ModifyIcon(MCONTACT hContact, StatusIconData *sid
// don't free this memory.
EXTERN_C MIR_APP_DLL(StatusIconData*) Srmm_GetNthIcon(MCONTACT hContact, int index);
-/////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// status icons click notification
struct StatusIconClickData
@@ -191,7 +196,7 @@ struct StatusIconClickData
// catch to be notified about the icon list's change.
#define ME_MSG_ICONSCHANGED "MessageAPI/IconsChanged"
-/////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// srmm toolbar icons' support
// button state flags
@@ -265,7 +270,7 @@ EXTERN_C MIR_APP_DLL(void) Srmm_RedrawToolbarIcons(HWND hwndDlg);
// You should add your buttons on this event
#define ME_MSG_TOOLBARLOADED "SRMM/ButtonsBar/ModuleLoaded"
-/////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// toolbar button clicked event
EXTERN_C MIR_APP_DLL(void) Srmm_ClickToolbarIcon(MCONTACT hContact, DWORD idFrom, HWND hwndFrom, BOOL code);
@@ -291,7 +296,7 @@ struct CustomButtonClickData
DWORD flags; // BBCF_ flags
};
-/////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// toolbar button internal representation
#define MIN_CBUTTONID 4000
diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib
index e3ac95fe55..2866872eab 100644
--- a/libs/win64/mir_app.lib
+++ b/libs/win64/mir_app.lib
Binary files differ
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp
index a149601659..caf5456467 100644
--- a/plugins/MirFox/src/MirandaUtils.cpp
+++ b/plugins/MirFox/src/MirandaUtils.cpp
@@ -357,7 +357,7 @@ int MirandaUtils::on_hook_OpenMW(WPARAM wParam, LPARAM lParam)
}
MessageWindowData mwd;
- if (!Srmm_GetWindowData((WPARAM)param->targetHandle, (LPARAM)&mwd) && mwd.hwndWindow){
+ if (!Srmm_GetWindowData((WPARAM)param->targetHandle, mwd) && mwd.hwndWindow){
HWND parent;
HWND hWnd = mwd.hwndWindow;
while((parent = GetParent(hWnd)) != 0)
diff --git a/plugins/MirLua/src/m_message.cpp b/plugins/MirLua/src/m_message.cpp
index 962745ef01..13cbba952d 100644
--- a/plugins/MirLua/src/m_message.cpp
+++ b/plugins/MirLua/src/m_message.cpp
@@ -6,7 +6,7 @@ static int message_Paste(lua_State *L)
ptrW text(mir_utf8decodeW(luaL_checkstring(L, 2)));
MessageWindowData mwd;
- INT_PTR res = Srmm_GetWindowData(hContact, (LPARAM)&mwd);
+ INT_PTR res = Srmm_GetWindowData(hContact, mwd);
lua_pushinteger(L, res);
if (res)
return 1;
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp
index b4f00d44ab..6aee1a4f3c 100644
--- a/plugins/MirandaG15/src/CAppletManager.cpp
+++ b/plugins/MirandaG15/src/CAppletManager.cpp
@@ -789,7 +789,7 @@ MEVENT CAppletManager::SendMessageToContact(MCONTACT hContact, tstring strMessag
bool CAppletManager::IsMessageWindowOpen(MCONTACT hContact)
{
MessageWindowData mwd;
- Srmm_GetWindowData(hContact, (LPARAM)&mwd);
+ Srmm_GetWindowData(hContact, mwd);
if (mwd.uState & MSG_WINDOW_STATE_EXISTS)
return true;
return false;
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
index b8d0570b46..97b64d22e3 100644
--- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
+++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
@@ -84,12 +84,8 @@ void __cdecl AutoreplyDelayThread(void *_ad)
int IsSRMsgWindowOpen(MCONTACT hContact, int DefaultRetVal)
{
- if (ServiceExists(MS_MSG_GETWINDOWDATA)) {
- MessageWindowData mwd;
- return !Srmm_GetWindowData(hContact, (LPARAM)&mwd) && mwd.hwndWindow;
- }
-
- return DefaultRetVal;
+ MessageWindowData mwd;
+ return !Srmm_GetWindowData(hContact, mwd) && mwd.hwndWindow;
}
diff --git a/plugins/WinterSpeak/src/SpeakAnnounce.cpp b/plugins/WinterSpeak/src/SpeakAnnounce.cpp
index ef9c85a2ec..92eab57c48 100644
--- a/plugins/WinterSpeak/src/SpeakAnnounce.cpp
+++ b/plugins/WinterSpeak/src/SpeakAnnounce.cpp
@@ -148,7 +148,7 @@ bool SpeakAnnounce::readMessage(MCONTACT contact)
if (m_db.getEventFlag(AnnounceDatabase::EventFlag_DialogOpen) || m_db.getEventFlag(AnnounceDatabase::EventFlag_DialogFocused)) {
// Do not notify if window is already opened
MessageWindowData mwd;
- if (Srmm_GetWindowData(contact, (LPARAM)&mwd) == 0) {
+ if (Srmm_GetWindowData(contact, mwd) == 0) {
if (m_db.getEventFlag(AnnounceDatabase::EventFlag_DialogOpen))
return ((mwd.uState & MSG_WINDOW_STATE_EXISTS) == 0);
else if (m_db.getEventFlag(AnnounceDatabase::EventFlag_DialogFocused))
diff --git a/src/mir_app/src/genmenu.h b/src/mir_app/src/genmenu.h
index aedc4229d0..a56934e0fc 100644
--- a/src/mir_app/src/genmenu.h
+++ b/src/mir_app/src/genmenu.h
@@ -95,7 +95,7 @@ struct TIntMenuObject : public MZeroedObject
TMO_LinkedList m_items;
HIMAGELIST m_hMenuIcons;
- BOOL m_bUseUserDefinedItems;
+ bool m_bUseUserDefinedItems;
void freeItem(TMO_IntMenuItem*);
};
diff --git a/src/mir_app/src/menu_options.cpp b/src/mir_app/src/menu_options.cpp
index c4d9380c7a..00a5a63974 100644
--- a/src/mir_app/src/menu_options.cpp
+++ b/src/mir_app/src/menu_options.cpp
@@ -243,7 +243,7 @@ class CGenMenuOptionsPage : public CDlgBase
m_menuItems.SendMsg(WM_SETREDRAW, TRUE, 0);
- ShowWindow(m_warning.GetHwnd(), (pmo->m_bUseUserDefinedItems) ? SW_HIDE : SW_SHOW);
+ m_warning.Show(!pmo->m_bUseUserDefinedItems);
m_menuItems.Enable(pmo->m_bUseUserDefinedItems);
m_btnInsSeparator.Enable(pmo->m_bUseUserDefinedItems);
m_btnInsMenu.Enable(pmo->m_bUseUserDefinedItems);
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp
index b054c72631..a9b2b9c612 100644
--- a/src/mir_app/src/menu_utils.cpp
+++ b/src/mir_app/src/menu_utils.cpp
@@ -532,7 +532,7 @@ MIR_APP_DLL(int) Menu_ConfigureObject(int hMenuObject, int setting, INT_PTR valu
return true;
case MCO_OPT_USERDEFINEDITEMS:
- pmo->m_bUseUserDefinedItems = (BOOL)value;
+ pmo->m_bUseUserDefinedItems = value != 0;
return true;
}
}
diff --git a/src/mir_app/src/srmm_util.cpp b/src/mir_app/src/srmm_util.cpp
index 2bd064d1ad..482e3c3fb0 100644
--- a/src/mir_app/src/srmm_util.cpp
+++ b/src/mir_app/src/srmm_util.cpp
@@ -73,7 +73,7 @@ MIR_APP_DLL(DWORD) CALLBACK Srmm_MessageStreamCallback(DWORD_PTR dwCookie, LPBYT
return 0;
}
-MIR_APP_DLL(int) Srmm_GetWindowData(WPARAM hContact, MessageWindowData &mwd)
+MIR_APP_DLL(int) Srmm_GetWindowData(MCONTACT hContact, MessageWindowData &mwd)
{
if (hContact == 0)
return 1;