summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp12
-rw-r--r--plugins/Clist_mw/src/clui.cpp4
-rw-r--r--plugins/FavContacts/src/csocket.cpp3
-rwxr-xr-xplugins/New_GPG/src/messages.cpp2
-rw-r--r--plugins/New_GPG/src/metacontacts.cpp10
-rw-r--r--plugins/Ping/src/pingthread.cpp3
-rw-r--r--plugins/TabSRMM/src/container.cpp7
-rw-r--r--plugins/TabSRMM/src/mim.cpp2
-rw-r--r--plugins/YAMN/src/browser/mailbrowser.cpp8
9 files changed, 19 insertions, 32 deletions
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index 24b5588c44..8b3084e3aa 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -261,17 +261,15 @@ INT_PTR CLUI::Service_Menu_HideContactAvatar(WPARAM wParam,LPARAM lParam)
return 0;
}
-
-
HRESULT CLUI::CreateCluiFrames()
{
g_hMenuMain = GetMenu(pcli->hwndContactList);
- MENUITEMINFO mii;
- ZeroMemory(&mii,sizeof(mii));
- mii.cbSize = MENUITEMINFO_V4_SIZE;
+
+ MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_SUBMENU;
mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN, 0, 0);
SetMenuItemInfo(g_hMenuMain, 0, TRUE,&mii);
+
mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS, 0, 0);
SetMenuItemInfo(g_hMenuMain,1,TRUE,&mii);
@@ -2059,9 +2057,7 @@ LRESULT CLUI::OnCreate(UINT msg, WPARAM wParam, LPARAM lParam)
DrawMenuBar(m_hWnd);
cliCluiProtocolStatusChanged(0, 0);
- MENUITEMINFO mii;
- ZeroMemory(&mii,sizeof(mii));
- mii.cbSize = MENUITEMINFO_V4_SIZE;
+ MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_TYPE|MIIM_DATA;
mii.dwItemData = MENU_MIRANDAMENU;
mii.fType = MFT_OWNERDRAW;
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp
index 97903b621d..5476afd190 100644
--- a/plugins/Clist_mw/src/clui.cpp
+++ b/plugins/Clist_mw/src/clui.cpp
@@ -81,9 +81,7 @@ void RegisterProtoIconsForAllProtoIconLib();
static int CluiModulesLoaded(WPARAM wParam,LPARAM lParam)
{
- MENUITEMINFO mii;
- ZeroMemory(&mii,sizeof(mii));
- mii.cbSize = MENUITEMINFO_V4_SIZE;
+ MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_SUBMENU;
mii.hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0);
SetMenuItemInfo(hMenuMain,0,TRUE,&mii);
diff --git a/plugins/FavContacts/src/csocket.cpp b/plugins/FavContacts/src/csocket.cpp
index c8a2b40503..b3d53d60f1 100644
--- a/plugins/FavContacts/src/csocket.cpp
+++ b/plugins/FavContacts/src/csocket.cpp
@@ -7,7 +7,8 @@ int CSocket::Recv(char *buf, int count)
int CSocket::Send(char *buf, int count)
{
- if (count < 0) count = strlen(buf);
+ if (count < 0)
+ count = (int)strlen(buf);
return send(m_socket, buf, count, 0);
}
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp
index add6cd23ae..d8b4467215 100755
--- a/plugins/New_GPG/src/messages.cpp
+++ b/plugins/New_GPG/src/messages.cpp
@@ -956,7 +956,7 @@ int HookSendMsg(WPARAM w, LPARAM l)
str_event.insert(0, toUTF8(outopentag));
str_event.append(toUTF8(outclosetag));
dbei->pBlob = (PBYTE)mir_strdup(str_event.c_str());
- dbei->cbBlob = str_event.length() + 1;
+ dbei->cbBlob = (DWORD)str_event.length() + 1;
}
return 0;
diff --git a/plugins/New_GPG/src/metacontacts.cpp b/plugins/New_GPG/src/metacontacts.cpp
index ab3c60bce5..b466cc65f0 100644
--- a/plugins/New_GPG/src/metacontacts.cpp
+++ b/plugins/New_GPG/src/metacontacts.cpp
@@ -29,16 +29,13 @@ bool metaIsProtoMetaContacts(HANDLE hContact)
return false;
}
-
bool metaIsDefaultSubContact(HANDLE hContact)
{
-
if(bMetaContacts)
return (HANDLE)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0)==hContact;
return false;
}
-
HANDLE metaGetContact(HANDLE hContact)
{
if(bMetaContacts)
@@ -46,14 +43,14 @@ HANDLE metaGetContact(HANDLE hContact)
return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
return NULL;
}
+
bool metaIsSubcontact(HANDLE hContact)
{
if(bMetaContacts)
- return (HANDLE)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
+ return CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0) != 0;
return false;
}
-
HANDLE metaGetMostOnline(HANDLE hContact)
{
@@ -62,6 +59,7 @@ HANDLE metaGetMostOnline(HANDLE hContact)
return (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0);
return NULL;
}
+
HANDLE metaGetDefault(HANDLE hContact)
{
@@ -71,13 +69,13 @@ HANDLE metaGetDefault(HANDLE hContact)
return NULL;
}
-
DWORD metaGetContactsNum(HANDLE hContact)
{
if(bMetaContacts)
return CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0);
return 0;
}
+
HANDLE metaGetSubcontact(HANDLE hContact, int num)
{
if(bMetaContacts)
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index badce66eef..242f7266bd 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -25,9 +25,6 @@ HFONT hFont = 0;
COLORREF bk_col = RGB(255, 255, 255);
////////////////
-#define WinVerMajor() LOBYTE(LOWORD(GetVersion()))
-#define WinVerMinor() HIBYTE(LOWORD(GetVersion()))
-
static HMODULE hUserDll;
BOOL (WINAPI *MySetLayeredWindowAttributes)(HWND,COLORREF,BYTE,DWORD);
BOOL (WINAPI *MyAnimateWindow)(HWND hWnd,DWORD dwTime,DWORD dwFlags);
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp
index e40271ac87..877b1d3804 100644
--- a/plugins/TabSRMM/src/container.cpp
+++ b/plugins/TabSRMM/src/container.cpp
@@ -1646,13 +1646,10 @@ panel_found:
sBarHeight = (UINT)M.GetByte((bSkinned ? "S_sbarheight" : "sbarheight"), 0);
if (LOBYTE(LOWORD(GetVersion())) >= 5) {
- BOOL fTransAllowed = !bSkinned || PluginConfig.m_WinVerMajor >= 6;
- DWORD exold;
+ BOOL fTransAllowed = !bSkinned || PluginConfig.m_WinVerMajor >= 6;
ex = exold = GetWindowLongPtr(hwndDlg, GWL_EXSTYLE);
- ex = (pContainer->dwFlags & CNT_TRANSPARENCY && (!CSkin::m_skinEnabled || fTransAllowed)) ? ex | WS_EX_LAYERED : ex & ~(WS_EX_LAYERED);
- //if (bAero && !pContainer->bSkinned && IsWinVerVistaPlus())
- // ex = ex | (WS_EX_COMPOSITED);//|WS_EX_LAYERED); // | WS_EX_COMPOSITED); // faster/smoother redrawing on Vista+, especially with skins
+ ex = (pContainer->dwFlags & CNT_TRANSPARENCY && (!CSkin::m_skinEnabled || fTransAllowed)) ? ex | WS_EX_LAYERED : ex & ~(WS_EX_LAYERED);
SetWindowLongPtr(hwndDlg, GWL_EXSTYLE, ex);
if (pContainer->dwFlags & CNT_TRANSPARENCY && fTransAllowed) {
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp
index 8738e681e4..18242609b0 100644
--- a/plugins/TabSRMM/src/mim.cpp
+++ b/plugins/TabSRMM/src/mim.cpp
@@ -288,7 +288,7 @@ bool CMimAPI::getAeroState()
m_isAero = (CSkin::m_skinEnabled == false) && GetByte("useAero", 1) && CSkin::m_fAeroSkinsValid && m_DwmActive;
}
- m_isVsThemed = IsThemeActive();
+ m_isVsThemed = IsThemeActive() != 0;
return m_isAero;
}
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp
index 892d812b3a..bc306c1a4b 100644
--- a/plugins/YAMN/src/browser/mailbrowser.cpp
+++ b/plugins/YAMN/src/browser/mailbrowser.cpp
@@ -555,10 +555,10 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb
Extracted=TRUE;
if ((UnicodeHeader.From != NULL) && (UnicodeHeader.FromNick != NULL)) {
- int size = wcslen(UnicodeHeader.From) + wcslen(UnicodeHeader.FromNick) + 4;
- FromStr=new WCHAR[size];
+ size_t size = wcslen(UnicodeHeader.From) + wcslen(UnicodeHeader.FromNick) + 4;
+ FromStr = new WCHAR[size];
mir_sntprintf(FromStr, size, L"%s <%s>", UnicodeHeader.FromNick, UnicodeHeader.From);
- FromStrNew=TRUE;
+ FromStrNew = TRUE;
}
else if (UnicodeHeader.From != NULL)
FromStr=UnicodeHeader.From;
@@ -1476,7 +1476,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM
ShowWindow(GetDlgItem(hDlg, IDC_SPLITTER),(MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED)?SW_SHOW:SW_HIDE);
ShowWindow(hEdit,(MailParam->mail->Flags & YAMN_MSG_BODYRECEIVED)?SW_SHOW:SW_HIDE);
WCHAR *title=0;
- int size = (From ? wcslen(From) : 0) + (Subj ? wcslen(Subj) : 0) + 4;
+ size_t size = (From ? wcslen(From) : 0) + (Subj ? wcslen(Subj) : 0) + 4;
title = new WCHAR[size];
if (From&&Subj)
mir_sntprintf(title, size, L"%s (%s)", Subj, From);