diff options
Diffstat (limited to 'plugins/AvatarHistory/src')
-rw-r--r-- | plugins/AvatarHistory/src/AvatarDlg.cpp | 4 | ||||
-rw-r--r-- | plugins/AvatarHistory/src/stdafx.h | 4 | ||||
-rw-r--r-- | plugins/AvatarHistory/src/utils.cpp | 10 |
3 files changed, 9 insertions, 9 deletions
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index cadd9fcc14..da41894e42 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -25,7 +25,7 @@ void __cdecl AvatarDialogThread(void *param); static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
int ShowSaveDialog(HWND hwnd, TCHAR* fn,MCONTACT hContact = NULL);
-BOOL ProtocolEnabled(const char *proto);
+bool ProtocolEnabled(const char *proto);
int FillAvatarListFromDB(HWND list, MCONTACT hContact);
int FillAvatarListFromFolder(HWND list, MCONTACT hContact);
int FillAvatarListFromFiles(HWND list, MCONTACT hContact);
@@ -506,7 +506,7 @@ int CleanupAvatarPic(HWND hwnd) int PreBuildContactMenu(WPARAM wParam, LPARAM)
{
char *proto = GetContactProto(wParam);
- Menu_ShowItem(hMenu, ProtocolEnabled(proto));
+ Menu_ShowItem(hMenu, 0 != ProtocolEnabled(proto));
return 0;
}
diff --git a/plugins/AvatarHistory/src/stdafx.h b/plugins/AvatarHistory/src/stdafx.h index 27a584f5a1..4564dd5d73 100644 --- a/plugins/AvatarHistory/src/stdafx.h +++ b/plugins/AvatarHistory/src/stdafx.h @@ -70,8 +70,8 @@ int OpenAvatarDialog(MCONTACT hContact, char* fn); // utils
TCHAR* GetCachedAvatar(char *proto, TCHAR *hash);
-BOOL ProtocolEnabled(const char *proto);
-BOOL ContactEnabled(MCONTACT hContact, char *setting, int def);
+bool ProtocolEnabled(const char *proto);
+bool ContactEnabled(MCONTACT hContact, char *setting, int def);
BOOL CopyImageFile(TCHAR *old_file, TCHAR *new_file);
void ConvertToFilename(TCHAR *str, size_t size);
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 88b00b3dfb..9344544a1e 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -24,24 +24,24 @@ Avatar History Plugin #include "stdafx.h"
-BOOL ProtocolEnabled(const char *proto)
+bool ProtocolEnabled(const char *proto)
{
if (proto == NULL)
return FALSE;
char setting[256];
mir_snprintf(setting, "%sEnabled", proto);
- return (BOOL) db_get_b(NULL, MODULE_NAME, setting, TRUE);
+ return 0 != db_get_b(NULL, MODULE_NAME, setting, true);
}
-BOOL ContactEnabled(MCONTACT hContact, char *setting, int def)
+bool ContactEnabled(MCONTACT hContact, char *setting, int def)
{
if (hContact == NULL)
- return FALSE;
+ return false;
char *proto = GetContactProto(hContact);
if (!ProtocolEnabled(proto))
- return FALSE;
+ return false;
BYTE globpref = db_get_b(NULL, MODULE_NAME, setting, def);
BYTE userpref = db_get_b(hContact, MODULE_NAME, setting, BST_INDETERMINATE);
|