summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/TabSRMM/src/msgs.cpp2
-rw-r--r--protocols/MSN/src/msn_links.cpp3
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp5
-rw-r--r--src/mir_app/src/srmm_toolbar.cpp10
4 files changed, 7 insertions, 13 deletions
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp
index 951034efc0..fb07d79f7d 100644
--- a/plugins/TabSRMM/src/msgs.cpp
+++ b/plugins/TabSRMM/src/msgs.cpp
@@ -936,7 +936,7 @@ int IconsChanged(WPARAM, LPARAM)
static void TSAPI InitAPI()
{
CreateServiceFunction(MS_MSG_SENDMESSAGE, SendMessageCommand);
- CreateServiceFunction(MS_MSG_SENDMESSAGE "W", SendMessageCommand_W);
+ CreateServiceFunction(MS_MSG_SENDMESSAGEW, SendMessageCommand_W);
CreateServiceFunction(MS_MSG_GETWINDOWAPI, GetWindowAPI);
CreateServiceFunction(MS_MSG_GETWINDOWCLASS, GetWindowClass);
CreateServiceFunction(MS_MSG_GETWINDOWDATA, GetWindowData);
diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp
index 35ab65cfa3..118da3da41 100644
--- a/protocols/MSN/src/msn_links.cpp
+++ b/protocols/MSN/src/msn_links.cpp
@@ -113,7 +113,6 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam)
arg += 5;
MCONTACT hContact = GetContact(arg, NULL, proto);
-
if (hContact != NULL) {
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return 0;
@@ -123,7 +122,6 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam)
arg += 6;
MCONTACT hContact = GetContact(arg, NULL, proto);
-
if (hContact != NULL) {
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return 0;
@@ -133,7 +131,6 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam)
arg += 6;
MCONTACT hContact = GetContact(arg, NULL, proto);
-
if (hContact != NULL) {
CallService(MS_MSG_SENDMESSAGE, hContact, 0);
return 0;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 28b1199d7d..0209a74695 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -617,13 +617,12 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
NotifyLocalWinEvent(dat->hContact, hwndDlg, MSG_WINDOW_EVT_OPENING);
if (newData->szInitialText) {
- int len;
-
if (newData->isWchar)
SetDlgItemText(hwndDlg, IDC_MESSAGE, (wchar_t*)newData->szInitialText);
else
SetDlgItemTextA(hwndDlg, IDC_MESSAGE, newData->szInitialText);
- len = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MESSAGE));
+
+ int len = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MESSAGE));
PostMessage(GetDlgItem(hwndDlg, IDC_MESSAGE), EM_SETSEL, len, len);
}
diff --git a/src/mir_app/src/srmm_toolbar.cpp b/src/mir_app/src/srmm_toolbar.cpp
index caf9335836..e3e93a29b2 100644
--- a/src/mir_app/src/srmm_toolbar.cpp
+++ b/src/mir_app/src/srmm_toolbar.cpp
@@ -158,16 +158,15 @@ MIR_APP_DLL(int) Srmm_GetButtonState(HWND hwndDlg, BBButton *bbdi)
return 1;
DWORD tempCID = 0;
- bool realbutton = false;
bbdi->bbbFlags = 0;
for (int i = 0; i < arButtonsList.getCount(); i++) {
CustomButtonData *cbd = arButtonsList[i];
if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) {
- realbutton = true;
tempCID = cbd->m_dwButtonCID;
+ break;
}
}
- if (!realbutton)
+ if (!tempCID)
return 1;
HWND hwndBtn = GetDlgItem(hwndDlg, tempCID);
@@ -180,16 +179,15 @@ MIR_APP_DLL(int) Srmm_SetButtonState(MCONTACT hContact, BBButton *bbdi)
if (hContact == NULL || bbdi == NULL)
return 1;
- bool realbutton = false;
DWORD tempCID = 0;
for (int i = 0; i < arButtonsList.getCount(); i++) {
CustomButtonData *cbd = arButtonsList[i];
if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) {
- realbutton = true;
tempCID = cbd->m_dwButtonCID;
+ break;
}
}
- if (!realbutton)
+ if (!tempCID)
return 1;
HWND hwndDlg = WindowList_Find(NULL, hContact);