summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-09-27 21:32:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-09-27 21:32:12 +0300
commit426e2f9755a14023223e2e3ebfa8e78f6e8677a8 (patch)
treeae387e1079fe63cea4d928a0e2564f218836d548 /src
parentea45fcc6216051c084a762a8fd2d170e095bb1ba (diff)
fix for a function name:
Clist_IsHidden => Contact_IsHidden Clist_HideContact => Contact_Hide
Diffstat (limited to 'src')
-rw-r--r--src/core/stduseronline/src/useronline.cpp2
-rw-r--r--src/mir_app/src/chat_manager.cpp2
-rw-r--r--src/mir_app/src/chat_tools.cpp4
-rw-r--r--src/mir_app/src/clc.cpp4
-rw-r--r--src/mir_app/src/clcitems.cpp2
-rw-r--r--src/mir_app/src/clcutils.cpp15
-rw-r--r--src/mir_app/src/clistsettings.cpp4
-rw-r--r--src/mir_app/src/clui.cpp2
-rw-r--r--src/mir_app/src/contact.cpp2
-rw-r--r--src/mir_app/src/contacts.cpp14
-rw-r--r--src/mir_app/src/ignore.cpp6
-rw-r--r--src/mir_app/src/meta_menu.cpp4
-rw-r--r--src/mir_app/src/meta_utils.cpp2
-rw-r--r--src/mir_app/src/mir_app.def4
-rw-r--r--src/mir_app/src/mir_app64.def4
15 files changed, 35 insertions, 36 deletions
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index e68906c188..cd108b11bb 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -36,7 +36,7 @@ static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
int oldStatus = g_plugin.getWord(hContact, "OldStatus", ID_STATUS_OFFLINE);
g_plugin.setWord(hContact, "OldStatus", (WORD)newStatus);
if (Ignore_IsIgnored(hContact, IGNOREEVENT_USERONLINE)) return 0;
- if (Clist_IsHidden(hContact)) return 0;
+ if (Contact_IsHidden(hContact)) return 0;
if (newStatus == ID_STATUS_OFFLINE && oldStatus != ID_STATUS_OFFLINE) {
// Remove the event from the queue if it exists since they are now offline
MEVENT lastEvent = g_plugin.getDword(hContact, "LastEvent");
diff --git a/src/mir_app/src/chat_manager.cpp b/src/mir_app/src/chat_manager.cpp
index 913615bee5..717a9878c5 100644
--- a/src/mir_app/src/chat_manager.cpp
+++ b/src/mir_app/src/chat_manager.cpp
@@ -326,7 +326,7 @@ BOOL SM_SetStatus(const char *pszModule, SESSION_INFO *si, int wStatus)
si->wStatus = wStatus;
if (si->hContact) {
if (si->iType != GCW_SERVER && wStatus != ID_STATUS_OFFLINE)
- Clist_HideContact(si->hContact, false);
+ Contact_Hide(si->hContact, false);
db_set_w(si->hContact, si->pszModule, "Status", (WORD)wStatus);
}
diff --git a/src/mir_app/src/chat_tools.cpp b/src/mir_app/src/chat_tools.cpp
index 94ba775092..5d11deff98 100644
--- a/src/mir_app/src/chat_tools.cpp
+++ b/src/mir_app/src/chat_tools.cpp
@@ -293,8 +293,8 @@ BOOL DoSoundsFlashPopupTrayStuff(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight
gce->iType |= GC_EVENT_HIGHLIGHT;
if (bInactive || !g_Settings->bSoundsFocus)
Skin_PlaySound("ChatHighlight");
- if (Clist_IsHidden(si->hContact))
- Clist_HideContact(si->hContact, false);
+ if (Contact_IsHidden(si->hContact))
+ Contact_Hide(si->hContact, false);
if (bInactive)
g_chatApi.DoTrayIcon(si, gce);
if (bInactive || !g_Settings->bPopupInactiveOnly)
diff --git a/src/mir_app/src/clc.cpp b/src/mir_app/src/clc.cpp
index 10625482ce..b235334174 100644
--- a/src/mir_app/src/clc.cpp
+++ b/src/mir_app/src/clc.cpp
@@ -452,7 +452,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
flags = contact->flags;
}
Clist_DeleteItemFromTree(hwnd, wParam);
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !Clist_IsHidden(wParam)) {
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !Contact_IsHidden(wParam)) {
NMCLISTCONTROL nm;
g_clistApi.pfnAddContactToTree(hwnd, dat, wParam, 1, 1);
if (Clist_FindItem(hwnd, dat, wParam, &contact)) {
@@ -486,7 +486,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT uMsg, WPARAM wParam
// this means an offline msg is flashing, so the contact should be shown
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- int shouldShow = (style & CLS_SHOWHIDDEN || !Clist_IsHidden(wParam))
+ int shouldShow = (style & CLS_SHOWHIDDEN || !Contact_IsHidden(wParam))
&& (!Clist_IsHiddenMode(dat, status) || Clist_GetContactIcon(wParam) != lParam);
contact = nullptr;
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp
index 262ddf04f1..ac6e365177 100644
--- a/src/mir_app/src/clcitems.cpp
+++ b/src/mir_app/src/clcitems.cpp
@@ -342,7 +342,7 @@ MIR_APP_DLL(void) Clist_DeleteItemFromTree(HWND hwnd, MCONTACT hItem)
int fnGetContactHiddenStatus(MCONTACT hContact, char*, ClcData*)
{
- return Clist_IsHidden(hContact);
+ return Contact_IsHidden(hContact);
}
void fnRebuildEntireList(HWND hwnd, ClcData *dat)
diff --git a/src/mir_app/src/clcutils.cpp b/src/mir_app/src/clcutils.cpp
index 6573897669..cd26b13f54 100644
--- a/src/mir_app/src/clcutils.cpp
+++ b/src/mir_app/src/clcutils.cpp
@@ -861,21 +861,6 @@ MIR_APP_DLL(void) Clist_InvalidateItem(HWND hwnd, ClcData *dat, int iItem)
}
///////////////////////////////////////////////////////////////////////////////
-
-MIR_APP_DLL(bool) Clist_IsHidden(MCONTACT hContact)
-{
- return db_get_b(hContact, "CList", "Hidden", 0) != 0;
-}
-
-MIR_APP_DLL(void) Clist_HideContact(MCONTACT hContact, bool bHidden)
-{
- if (bHidden)
- db_set_b(hContact, "CList", "Hidden", 1);
- else
- db_unset(hContact, "CList", "Hidden");
-}
-
-///////////////////////////////////////////////////////////////////////////////
// row coord functions
int fnGetRowTopY(ClcData *dat, int item)
diff --git a/src/mir_app/src/clistsettings.cpp b/src/mir_app/src/clistsettings.cpp
index c02de30401..3e64540332 100644
--- a/src/mir_app/src/clistsettings.cpp
+++ b/src/mir_app/src/clistsettings.cpp
@@ -69,7 +69,7 @@ void fnCheckCacheItem(ClcCacheEntry *p)
p->szProto = GetContactProto(p->hContact);
if (p->bIsHidden == -1)
- p->bIsHidden = Clist_IsHidden(p->hContact);
+ p->bIsHidden = Contact_IsHidden(p->hContact);
}
void fnFreeCacheItem(ClcCacheEntry *p)
@@ -203,7 +203,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
g_clistApi.pfnCheckCacheItem(pdnce);
}
else if (!strcmp(cws->szSetting, "Status")) {
- if (!Clist_IsHidden(hContact))
+ if (!Contact_IsHidden(hContact))
Clist_ChangeContactIcon(hContact, g_clistApi.pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact));
}
}
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp
index b8e2ba2a9d..ad85b8ad5b 100644
--- a/src/mir_app/src/clui.cpp
+++ b/src/mir_app/src/clui.cpp
@@ -203,7 +203,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam)
switch (action) {
case IDC_HIDE: // Archive contact
- Clist_HideContact(wParam);
+ Contact_Hide(wParam);
break;
case IDYES: // Delete contact
diff --git a/src/mir_app/src/contact.cpp b/src/mir_app/src/contact.cpp
index 0daf98592f..625192731c 100644
--- a/src/mir_app/src/contact.cpp
+++ b/src/mir_app/src/contact.cpp
@@ -32,7 +32,7 @@ MIR_APP_DLL(void) Clist_LoadContactTree(void)
int hideOffline = db_get_b(0, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
for (auto &hContact : Contacts()) {
int status = Contact_GetStatus(hContact);
- if ((!hideOffline || status != ID_STATUS_OFFLINE) && !Clist_IsHidden(hContact))
+ if ((!hideOffline || status != ID_STATUS_OFFLINE) && !Contact_IsHidden(hContact))
Clist_ChangeContactIcon(hContact, g_clistApi.pfnIconFromStatusMode(GetContactProto(hContact), status, hContact));
}
Clist_EndRebuild();
diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp
index dc7af82b37..daf95dbf86 100644
--- a/src/mir_app/src/contacts.cpp
+++ b/src/mir_app/src/contacts.cpp
@@ -279,6 +279,20 @@ MIR_APP_DLL(int) Contact_GetStatus(MCONTACT hContact)
return db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
}
+///////////////////////////////////////////////////////////////////////////////
+
+MIR_APP_DLL(bool) Contact_IsHidden(MCONTACT hContact)
+{
+ return db_get_b(hContact, "CList", "Hidden", 0) != 0;
+}
+
+MIR_APP_DLL(void) Contact_Hide(MCONTACT hContact, bool bHidden)
+{
+ if (bHidden)
+ db_set_b(hContact, "CList", "Hidden", 1);
+ else
+ db_unset(hContact, "CList", "Hidden");
+}
/////////////////////////////////////////////////////////////////////////////////////////
// Options dialog
diff --git a/src/mir_app/src/ignore.cpp b/src/mir_app/src/ignore.cpp
index 888aef29e2..56c38e303f 100644
--- a/src/mir_app/src/ignore.cpp
+++ b/src/mir_app/src/ignore.cpp
@@ -38,7 +38,7 @@ static DWORD GetMask(MCONTACT hContact)
if (hContact == 0)
mask = 0;
else {
- if (Clist_IsHidden(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
+ if (Contact_IsHidden(hContact) || db_get_b(hContact, "CList", "NotOnList", 0))
mask = db_get_dw(0, "Ignore", "Mask1", 0);
else
mask = db_get_dw(0, "Ignore", "Default1", 0);
@@ -192,7 +192,7 @@ static void SetAllContactIcons(HWND hwndList)
}
else proto1Caps = proto4Caps = 0;
InitialiseItem(hwndList, hContact, hItem, proto1Caps, proto4Caps);
- if (!Clist_IsHidden(hContact))
+ if (!Contact_IsHidden(hContact))
SendMessage(hwndList, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
}
}
@@ -306,7 +306,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, hContact, 0);
if (hItem)
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
- Clist_HideContact(hContact, !SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
+ Contact_Hide(hContact, !SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0));
}
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), 0, hItemAll, "Default1");
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp
index 3c9ac140bd..dba5fe7d7c 100644
--- a/src/mir_app/src/meta_menu.cpp
+++ b/src/mir_app/src/meta_menu.cpp
@@ -79,7 +79,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM)
// hide the contact if clist groups disabled (shouldn't create one anyway since menus disabled)
if (!db_mc_isEnabled())
- Clist_HideContact(hMetaContact);
+ Contact_Hide(hMetaContact);
return hMetaContact;
}
@@ -96,7 +96,7 @@ void Meta_RemoveContactNumber(DBCachedContact *ccMeta, int number, bool bUpdateI
DBCachedContact *ccSub = currDb->getCache()->GetCachedContact(Meta_GetContactHandle(ccMeta, number));
if (ccSub != nullptr) {
if (ccSub->parentID == ccMeta->contactID) {
- Clist_HideContact(ccSub->contactID, false);
+ Contact_Hide(ccSub->contactID, false);
// stop ignoring, if we were
if (g_metaOptions.bSuppressStatus)
diff --git a/src/mir_app/src/meta_utils.cpp b/src/mir_app/src/meta_utils.cpp
index 09c61b98d1..e16a24d00b 100644
--- a/src/mir_app/src/meta_utils.cpp
+++ b/src/mir_app/src/meta_utils.cpp
@@ -403,7 +403,7 @@ int Meta_HideMetaContacts(bool bHide)
else
continue;
- Clist_HideContact(hContact, bSet);
+ Contact_Hide(hContact, bSet);
}
if (bHide) {
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 3f53cf195b..a31384307a 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -365,8 +365,8 @@ Chat_UpdateOptions @418 NONAME
?onDblClick_List@CSrmmBaseDialog@@IAEXPAVCCtrlListBox@@@Z @440 NONAME
?OnDestroy@CSrmmBaseDialog@@MAEXXZ @441 NONAME
Chat_AddMenuItems @442 NONAME
-Clist_IsHidden @443
-Clist_HideContact @444
+Contact_IsHidden @443
+Contact_Hide @444
Chat_DoEventHook @445 NONAME
_stubLogProc@16 @446 NONAME
_stubMessageProc@16 @447 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index b933dcd83a..c92292f409 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -365,8 +365,8 @@ Chat_UpdateOptions @418 NONAME
?onDblClick_List@CSrmmBaseDialog@@IEAAXPEAVCCtrlListBox@@@Z @440 NONAME
?OnDestroy@CSrmmBaseDialog@@MEAAXXZ @441 NONAME
Chat_AddMenuItems @442 NONAME
-Clist_IsHidden @443
-Clist_HideContact @444
+Contact_IsHidden @443
+Contact_Hide @444
Chat_DoEventHook @445 NONAME
stubLogProc @446 NONAME
stubMessageProc @447 NONAME