diff options
Diffstat (limited to 'plugins/Clist_modern/modern_viewmodebar.cpp')
-rw-r--r-- | plugins/Clist_modern/modern_viewmodebar.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/plugins/Clist_modern/modern_viewmodebar.cpp b/plugins/Clist_modern/modern_viewmodebar.cpp index e541ab5e2b..b681c01d6b 100644 --- a/plugins/Clist_modern/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/modern_viewmodebar.cpp @@ -682,8 +682,8 @@ void DeleteViewMode( char * szName ) mir_snprintf(szSetting, 256, "%c%s_SSM", 246, szName);
db_unset(NULL, CLVM_MODULE, szSetting);
db_unset(NULL, CLVM_MODULE, szName);
- if (!strcmp(g_CluiData.current_viewmode, szName) && lstrlenA(szName) == lstrlenA(g_CluiData.current_viewmode))
- {
+
+ if ( !strcmp(g_CluiData.current_viewmode, szName) && lstrlenA(szName) == lstrlenA(g_CluiData.current_viewmode)) {
g_CluiData.bFilterEffective = 0;
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
SetWindowText(hwndSelector, TranslateT("All contacts"));
@@ -964,7 +964,8 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
hItem = (HANDLE)SendDlgItemMessage(hwndDlg,IDC_CLIST,CLM_HITTEST,(WPARAM)&hitFlags,MAKELPARAM(nm->pt.x,nm->pt.y));
if (hItem == NULL) break;
- if (!(hitFlags&CLCHT_ONITEMEXTRA))
+
+ if ( !(hitFlags&CLCHT_ONITEMEXTRA))
break;
iImage = SendDlgItemMessage(hwndDlg,IDC_CLIST,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(nm->iColumn,0));
if (iImage == nullImage)
@@ -1224,7 +1225,7 @@ LRESULT CALLBACK ViewModeFrameWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM break;
KillTimer(hwnd, wParam);
- if (!g_CluiData.old_viewmode[0])
+ if ( !g_CluiData.old_viewmode[0])
SendMessage(hwnd, WM_COMMAND, IDC_RESETMODES, 0);
else
ApplyViewMode((const char *)g_CluiData.old_viewmode);
@@ -1279,7 +1280,7 @@ clvm_reset_command: case IDC_CONFIGUREMODES:
{
clvm_config_command:
- if (!g_ViewModeOptDlg)
+ if ( !g_ViewModeOptDlg)
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_OPT_VIEWMODES), 0, DlgProcViewModesSetup, 0);
break;
}
@@ -1323,7 +1324,7 @@ static BOOL sttDrawViewModeBackground(HWND hwnd, HDC hdc, RECT * rect) if (rect) rc = *rect;
else GetClientRect(hwnd,&rc);
- if (!view_mode.hBmpBackground && !view_mode.useWinColors)
+ if ( !view_mode.hBmpBackground && !view_mode.useWinColors)
{
HBRUSH hbr = CreateSolidBrush(view_mode.bkColour);
FillRect(hdc, &rc, hbr);
@@ -1351,7 +1352,7 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
view_mode.bkColour = sttGetColor("ViewMode","BkColour",CLCDEFAULT_BKCOLOUR);
if (db_get_b(NULL,"ViewMode","UseBitmap",CLCDEFAULT_USEBITMAP)) {
- if (!DBGetContactSettingString(NULL,"ViewMode","BkBitmap",&dbv)) {
+ if ( !DBGetContactSettingString(NULL,"ViewMode","BkBitmap",&dbv)) {
view_mode.hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAP,0,(LPARAM)dbv.pszVal);
db_free(&dbv);
}
@@ -1366,7 +1367,7 @@ static int ehhViewModeBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) void CreateViewModeFrame()
{
CallService(MS_BACKGROUNDCONFIG_REGISTER,(WPARAM)"View Mode Background/ViewMode",0);
- ModernHookEvent(ME_BACKGROUNDCONFIG_CHANGED,ehhViewModeBackgroundSettingsChanged);
+ HookEvent(ME_BACKGROUNDCONFIG_CHANGED,ehhViewModeBackgroundSettingsChanged);
ehhViewModeBackgroundSettingsChanged(0,0);
CLISTFrame frame = {0};
@@ -1416,9 +1417,9 @@ void ApplyViewMode(const char *Name, bool onlySelector ) mir_snprintf(szSetting, 256, "%c_LastMode", 246);
- if (!name) // Name is null - apply last stored view mode
+ if ( !name) // Name is null - apply last stored view mode
{
- if (!DBGetContactSettingString(NULL, CLVM_MODULE, szSetting, &dbv))
+ if ( !DBGetContactSettingString(NULL, CLVM_MODULE, szSetting, &dbv))
{
name = (char*)_alloca(strlen(dbv.pszVal)+1);
strcpy(name,dbv.pszVal);
@@ -1455,7 +1456,7 @@ void ApplyViewMode(const char *Name, bool onlySelector ) if ( !onlySelector )
{
mir_snprintf(szSetting, 256, "%c%s_PF", 246, name);
- if (!DBGetContactSettingString(NULL, CLVM_MODULE, szSetting, &dbv)) {
+ if ( !DBGetContactSettingString(NULL, CLVM_MODULE, szSetting, &dbv)) {
if (lstrlenA(dbv.pszVal) >= 2)
{
strncpy(g_CluiData.protoFilter, dbv.pszVal, SIZEOF(g_CluiData.protoFilter));
@@ -1465,7 +1466,7 @@ void ApplyViewMode(const char *Name, bool onlySelector ) mir_free(dbv.pszVal);
}
mir_snprintf(szSetting, 256, "%c%s_GF", 246, name);
- if (!DBGetContactSettingTString(NULL, CLVM_MODULE, szSetting, &dbv))
+ if ( !DBGetContactSettingTString(NULL, CLVM_MODULE, szSetting, &dbv))
{
if (lstrlen(dbv.ptszVal) >= 2)
{
|