diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-19 12:43:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-19 12:43:33 +0000 |
commit | 01ff549a2303122360f819c3344ff8a374839d82 (patch) | |
tree | 2241ad5b66087551f54a726894055d2e08a8763c /plugins/Clist_modern | |
parent | 2201b08878bbf3f72c6e48ef82e4b80374f58c29 (diff) |
further junk cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16717 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.cpp | 13 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clc.h | 1 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistsettings.cpp | 26 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_commonprototypes.h | 1 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_defsettings.h | 1 |
5 files changed, 9 insertions, 33 deletions
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index eb903f5111..d93c693191 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -136,9 +136,7 @@ static int clcHookSettingChanged(WPARAM hContact, LPARAM lParam) }
}
else {
- if (!strcmp(cws->szSetting, "TickTS"))
- pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0);
- else if (!strcmp(cws->szModule, "UserInfo")) {
+ if (!strcmp(cws->szModule, "UserInfo")) {
if (!strcmp(cws->szSetting, "Timezone"))
pcli->pfnClcBroadcast(INTM_TIMEZONECHANGED, hContact, 0);
}
@@ -1360,7 +1358,7 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT, WPARAM wPara SendMessage(GetParent(hwnd), WM_NOTIFY, 0, (LPARAM)&nm);
dat->needsResort = 1;
}
- SetTimer(hwnd, TIMERID_REBUILDAFTER, 1, NULL);
+ pcli->pfnInitAutoRebuild(hwnd);
return 0;
}
@@ -1564,7 +1562,6 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM if (wParam != 0) {
ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(wParam);
if (pdnce && pdnce->m_pszProto) {
- pdnce->m_iStatus = GetStatusForContact(pdnce->hContact, pdnce->m_pszProto);
if (!dat->force_in_dialog && (dat->second_line_show || dat->third_line_show))
gtaRenewText(pdnce->hContact);
SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon(wParam));
@@ -1581,11 +1578,7 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM }
}
- if (db_get_b(NULL, "CList", "PlaceOfflineToRoot", SETTING_PLACEOOFLINETOROOT_DEFAULT))
- pcli->pfnInitAutoRebuild(hwnd);
- else
- PostMessage(hwnd, INTM_INVALIDATE, 0, 0);
-
+ pcli->pfnInitAutoRebuild(hwnd);
return ret;
}
diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h index df08939883..72ae4d3b02 100644 --- a/plugins/Clist_modern/src/modern_clc.h +++ b/plugins/Clist_modern/src/modern_clc.h @@ -425,6 +425,5 @@ TCHAR* GetGroupNameTS(int idx, DWORD* pdwFlags); int RenameGroupT(WPARAM groupID, LPARAM newName);
int GetContactCachedStatus(MCONTACT hContact);
-char *GetContactCachedProtocol(MCONTACT hContact);
#endif /* _CLC_H_ */
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 83f3ac0478..5586f5cba8 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -243,15 +243,6 @@ void IvalidateDisplayNameCache() }
}
-char* GetContactCachedProtocol(MCONTACT hContact)
-{
- ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact);
- if (cacheEntry && cacheEntry->m_pszProto)
- return cacheEntry->m_pszProto;
-
- return NULL;
-}
-
int GetStatusForContact(MCONTACT hContact, char *szProto)
{
return (szProto) ? db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) : ID_STATUS_OFFLINE;
@@ -259,8 +250,7 @@ int GetStatusForContact(MCONTACT hContact, char *szProto) int GetContactInfosForSort(MCONTACT hContact, char **Proto, TCHAR **Name, int *Status)
{
- ClcCacheEntry *cacheEntry = NULL;
- cacheEntry = pcli->pfnGetCacheEntry(hContact);
+ ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact);
if (cacheEntry != NULL) {
if (Proto != NULL) *Proto = cacheEntry->m_pszProto;
if (Name != NULL) *Name = cacheEntry->tszName;
@@ -277,7 +267,7 @@ int GetContactCachedStatus(MCONTACT hContact) int ContactAdded(WPARAM hContact, LPARAM)
{
if (!MirandaExiting())
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode((char*)GetContactCachedProtocol(hContact), ID_STATUS_OFFLINE, hContact), 1); ///by FYR
+ pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(GetContactProto(hContact), ID_STATUS_OFFLINE, hContact));
return 0;
}
@@ -320,7 +310,6 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) amRequestAwayMsg(hContact);
pcli->pfnClcBroadcast(INTM_STATUSCHANGED, hContact, 0);
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(cws->szModule, cws->value.wVal, hContact), 0); //by FYR
}
else if (!strcmp(cws->szModule, META_PROTO) && !memcmp(cws->szSetting, "Status", 6)) { // Status0..N for metacontacts
if (pcli->hwndContactTree && g_flag_bOnModulesLoadedCalled)
@@ -352,11 +341,9 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) else if (!strcmp(cws->szSetting, "Hidden")) {
pdnce->bIsHidden = cws->value.bVal;
- if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto(hContact);
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(szProto,
- szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1); //by FYR
- }
+ if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0)
+ pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(pdnce->m_pszProto, pdnce->getStatus(), hContact));
+
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
}
else if (!strcmp(cws->szSetting, "noOffline")) {
@@ -368,8 +355,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if (!strcmp(cws->szSetting, "p")) {
pdnce->m_pszProto = GetContactProto(hContact);
char *szProto = (cws->value.type == DBVT_DELETED) ? NULL : cws->value.pszVal;
- pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(szProto,
- szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 0);
+ pcli->pfnChangeContactIcon(hContact, pcli->pfnIconFromStatusMode(szProto, pdnce->getStatus(), hContact));
}
}
diff --git a/plugins/Clist_modern/src/modern_commonprototypes.h b/plugins/Clist_modern/src/modern_commonprototypes.h index afc8d6040e..d28d2f08f5 100644 --- a/plugins/Clist_modern/src/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/modern_commonprototypes.h @@ -184,7 +184,6 @@ HRESULT BackgroundsLoadModule(); int BackgroundsUnloadModule();
INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); //RowTemplate.c
BOOL FindMenuHanleByGlobalID(HMENU hMenu, int globalID, struct _MenuItemHandles * dat); //GenMenu.c
-char* GetContactCachedProtocol(MCONTACT hContact); //clistsettings.c
char* GetParamN(char *string, char *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces); //mod_skin_selector.c
WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim, BOOL SkipSpaces);
DWORD CompareContacts2_getLMTime(MCONTACT u); //contact.c
diff --git a/plugins/Clist_modern/src/modern_defsettings.h b/plugins/Clist_modern/src/modern_defsettings.h index 9f624b0976..60ab0ce282 100644 --- a/plugins/Clist_modern/src/modern_defsettings.h +++ b/plugins/Clist_modern/src/modern_defsettings.h @@ -133,7 +133,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define SETTING_SORTBY2_DEFAULT SORTBY_NAME //"CList","SortBy2"
#define SETTING_SORTBY3_DEFAULT SORTBY_STATUS //"CList","SortBy3"
-#define SETTING_PLACEOOFLINETOROOT_DEFAULT 0 //"CList","PlaceOfflineToRoot"
#define SETTING_NOOFFLINEBOTTOM_DEFAULT 0 //"CList","NoOfflineBottom"
#define SETTING_HIDEOFFLINEATROOT_DEFAULT 0 //"CLC","HideOfflineRoot"
#define SETTING_HILIGHTMODE_DEFAULT 0 //todo replace by constant //"CLC","HiLightMode"
|