diff options
Diffstat (limited to 'plugins/Clist_mw')
24 files changed, 286 insertions, 248 deletions
diff --git a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp index c62eee2855..fbd643a2c4 100644 --- a/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/cluiframes.cpp @@ -1,7 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index 96e34af520..4e52391f1f 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -98,11 +99,11 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) if ((HANDLE)wParam != NULL && !strcmp(cws->szModule,"MetaContacts") && !strcmp(cws->szSetting,"Handle"))
pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED, 0, 0 );
-
+
if ((HANDLE)wParam != NULL && !strcmp(cws->szModule,"CList")) {
if ( !strcmp( cws->szSetting, "noOffline" ))
pcli->pfnClcBroadcast( INTM_NAMEORDERCHANGED, wParam, lParam );
- else if ( !strcmp(cws->szSetting,"StatusMsg"))
+ else if ( !strcmp(cws->szSetting,"StatusMsg"))
pcli->pfnClcBroadcast( INTM_STATUSMSGCHANGED, wParam, lParam );
}
return 0;
@@ -127,7 +128,7 @@ static int ClcShutdown(WPARAM wParam, LPARAM lParam) }
LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
-{
+{
struct ClcData *dat = (struct ClcData*)GetWindowLongPtr(hwnd,0);
if ( msg >= CLM_FIRST && msg < CLM_LAST )
return pcli->pfnProcessExternalMessages(hwnd,dat,msg,wParam,lParam);
@@ -140,7 +141,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L break;
case INTM_ICONCHANGED:
- {
+ {
int recalcScrollBar = 0,shouldShow;
HANDLE hSelItem = NULL;
struct ClcContact *selcontact = NULL;
@@ -154,30 +155,30 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L status = ID_STATUS_OFFLINE;
else
status = cacheEntry->status;
-
+
shouldShow = (GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_SHOWHIDDEN || !cacheEntry->bIsHidden) && (!pcli->pfnIsHiddenMode(dat,status)||cacheEntry->noHiddenOffline || CallService(MS_CLIST_GETCONTACTICON,wParam,0) != LOWORD(lParam)); //this means an offline msg is flashing, so the contact should be shown
ClcContact *contact;
ClcGroup *group;
- if ( !FindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) {
+ if ( !FindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection>=0 && GetRowByIndex(dat,dat->selection,&selcontact,NULL) != -1)
hSelItem = pcli->pfnContactToHItem(selcontact);
AddContactToTree(hwnd,dat,(HANDLE)wParam,0,0);
needsResort = 1;
- recalcScrollBar = 1;
+ recalcScrollBar = 1;
FindItem(hwnd,dat,(HANDLE)wParam,&contact,NULL,NULL);
- if (contact) {
+ if (contact) {
contact->iImage = (WORD)lParam;
pcli->pfnNotifyNewContact(hwnd,(HANDLE)wParam);
dat->needsResort = 1;
}
- }
+ }
}
else {
//item in list already
- DWORD style = GetWindowLongPtr(hwnd,GWL_STYLE);
- if (contact->iImage == (WORD)lParam) break;
+ DWORD style = GetWindowLongPtr(hwnd,GWL_STYLE);
+ if (contact->iImage == (WORD)lParam) break;
if (sortByStatus) dat->needsResort = 1;
if ( !shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
@@ -205,11 +206,11 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
SortClcByTimer(hwnd);
- if (recalcScrollBar) RecalcScrollBar(hwnd,dat);
+ if (recalcScrollBar) RecalcScrollBar(hwnd,dat);
goto LBL_Exit;
}
case INTM_STATUSMSGCHANGED:
- {
+ {
DBVARIANT dbv;
if ( !(dat->style & CLS_SHOWSTATUSMESSAGES))
@@ -250,7 +251,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L break;
}
- if ( wParam == TIMERID_SUBEXPAND) {
+ if ( wParam == TIMERID_SUBEXPAND) {
KillTimer(hwnd,TIMERID_SUBEXPAND);
if (hitcontact) {
if (hitcontact->SubExpanded) hitcontact->SubExpanded = 0; else hitcontact->SubExpanded = 1;
@@ -258,10 +259,10 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
hitcontact = NULL;
dat->needsResort = 1;
- SortCLC(hwnd,dat,1);
+ SortCLC(hwnd,dat,1);
RecalcScrollBar(hwnd,dat);
break;
- }
+ }
break;
case WM_DESTROY:
@@ -287,7 +288,7 @@ int LoadCLCModule(void) LoadCLUIFramesModule();
himlCListClc = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST,0,0);
-
+
HookEvent(ME_SYSTEM_MODULESLOADED,ClcModulesLoaded);
hSettingChanged1 = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged);
HookEvent(ME_OPT_INITIALISE,ClcOptInit);
diff --git a/plugins/Clist_mw/src/clc.h b/plugins/Clist_mw/src/clc.h index 58dea44696..09b2981ccc 100644 --- a/plugins/Clist_mw/src/clc.h +++ b/plugins/Clist_mw/src/clc.h @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_mw/src/clcfonts.cpp b/plugins/Clist_mw/src/clcfonts.cpp index a5baeb4970..90b7afb9f8 100644 --- a/plugins/Clist_mw/src/clcfonts.cpp +++ b/plugins/Clist_mw/src/clcfonts.cpp @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2010 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-10 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -24,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
-static const TCHAR *szClistFontIdDescr[FONTID_MAX+1] =
+static const TCHAR *szClistFontIdDescr[FONTID_MAX+1] =
{
LPGENT( "Standard contacts"),
LPGENT( "Online contacts to whom you have a different visibility"),
@@ -39,7 +40,7 @@ static const TCHAR *szClistFontIdDescr[FONTID_MAX+1] = LPGENT( "Hover Contacts")
};
-static int fontListOrder[FONTID_MAX + 1] =
+static int fontListOrder[FONTID_MAX + 1] =
{
FONTID_CONTACTS,
FONTID_INVIS,
diff --git a/plugins/Clist_mw/src/clcidents.cpp b/plugins/Clist_mw/src/clcidents.cpp index 45987be54f..a5953b1046 100644 --- a/plugins/Clist_mw/src/clcidents.cpp +++ b/plugins/Clist_mw/src/clcidents.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -90,7 +91,7 @@ ClcCacheEntry *GetCLCFullCacheEntry(struct ClcData *dat,HANDLE hContact) if (pdnce == NULL) {
pdnce = (ClcCacheEntry*)mir_calloc(sizeof(ClcCacheEntry));
pdnce->hContact = hContact;
-
+
int idx;
List_GetIndex(&dat->lCLCContactsCache,pdnce,&idx);
List_Insert(&dat->lCLCContactsCache,pdnce,idx);
@@ -117,12 +118,12 @@ void ClearClcContactCache(struct ClcData *dat,HANDLE hContact) for (i = 0;i<(dat->lCLCContactsCache.realCount);i++) {
ClcCacheEntry *pdnce = (ClcCacheEntry *)dat->lCLCContactsCache.items[i];
pdnce->ClcContact = NULL;
- }
+ }
tick = GetTickCount()-tick;
{
char buf[256];
mir_snprintf(buf, SIZEOF(buf), "Clear full cache %d ms\r\n", tick);
- OutputDebugStringA(buf);
+ OutputDebugStringA(buf);
}
}
if ( !IsHContactGroup(hContact) && !IsHContactInfo(hContact)) {
@@ -163,9 +164,9 @@ int FindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,struct ClcContact **cont if (ret == 0) {return 0;}
cacheEntry->ClcContact = (void *)z;
}
-
+
if (cacheEntry->ClcContact != NULL) {
- if (contact != NULL)
+ if (contact != NULL)
*contact = (struct ClcContact *)cacheEntry->ClcContact;
return 1;
@@ -181,11 +182,11 @@ int FindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,struct ClcContact **cont group = group->parent;
if (group == NULL)
break;
-
+
nowVisible = 1;
for (tgroup = group;tgroup;tgroup = tgroup->parent)
if ( !group->expanded) {
- nowVisible = 0;
+ nowVisible = 0;
break;
}
@@ -215,7 +216,7 @@ int FindItem(HWND hwnd,struct ClcData *dat,HANDLE hItem,struct ClcContact **cont if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT &&
group->cl.items[group->scanIndex]->SubAllocated>0)
for (i = 1; i<=group->cl.items[group->scanIndex]->SubAllocated; i++)
- if (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->subcontacts[i-1].hContact == hItem) {
+ if (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->subcontacts[i-1].hContact == hItem) {
if (contact) *contact = &group->cl.items[group->scanIndex]->subcontacts[i-1];
if (subgroup) *subgroup = group;
return 1;
@@ -262,7 +263,7 @@ int GetRowByIndex(struct ClcData *dat,int testindex,struct ClcContact **contact, group->scanIndex++;
continue;
}
- if ((index>0) && (index<CacheArrSize))
+ if ((index>0) && (index<CacheArrSize))
{
CacheIndex[index] = group;
CacheIndexClear = FALSE;
@@ -290,7 +291,7 @@ int GetRowByIndex(struct ClcData *dat,int testindex,struct ClcContact **contact, }
}
}
-
+
index++;
if ((group->cl.items[group->scanIndex]->type == CLCIT_CONTACT) && (group->cl.items[group->scanIndex]->flags & CONTACTF_STATUSMSG))
index++;
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index ac35462c4b..6f66fec4c2 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -52,7 +53,7 @@ void AddSubcontacts(struct ClcContact * cont) i = 0;
for (j = 0; j<subcount; j++) {
hsub = (HANDLE)CallService(MS_MC_GETSUBCONTACT,(WPARAM)cont->hContact,j);
- cacheEntry = GetContactFullCacheEntry(hsub);
+ cacheEntry = GetContactFullCacheEntry(hsub);
if ( !(db_get_b(NULL,"CLC","MetaHideOfflineSub",1) && db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) ||
cacheEntry->status != ID_STATUS_OFFLINE )
{
@@ -89,7 +90,7 @@ int AddItemToGroup(ClcGroup *group,int iAboveItem) ClcGroup *AddGroup(HWND hwnd,struct ClcData *dat,const TCHAR *szName,DWORD flags,int groupId,int calcTotalMembers)
{
- ClearRowByIndexCache();
+ ClearRowByIndexCache();
dat->needsResort = 1;
ClcGroup *result = saveAddGroup( hwnd, dat, szName, flags, groupId, calcTotalMembers);
ClearRowByIndexCache();
@@ -117,9 +118,9 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group HANDLE hContact;
DBVARIANT dbv;
int i;
- int img = -1;
+ int img = -1;
int basicIcon = 0;
-
+
if (cacheEntry == NULL || group == NULL || dat == NULL)
return NULL;
@@ -141,10 +142,10 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group img = CallService(MS_CLIST_GETCONTACTICON,(WPARAM)hContact,0);
group->cl.items[i]->iImage = img;
-
+
cacheEntry = GetContactFullCacheEntry(hContact);
group->cl.items[i]->hContact = hContact;
-
+
//cacheEntry->ClcContact = &(group->cl.items[i]);
//SetClcContactCacheItem(dat,hContact,&(group->cl.items[i]));
@@ -175,7 +176,7 @@ static struct ClcContact * AddContactToGroup(struct ClcData *dat,ClcGroup *group if (group->cl.items[i]->szStatusMsg[0] != 0) {
group->cl.items[i]->flags |= CONTACTF_STATUSMSG;
}
- }
+ }
}
ClearRowByIndexCache();
@@ -192,11 +193,11 @@ void AddContactToTree(HWND hwnd, ClcData *dat, HANDLE hContact, int updateTotalC return;
char *szProto = cacheEntry->szProto;
-
+
dat->needsResort = 1;
ClearRowByIndexCache();
ClearClcContactCache(dat,hContact);
-
+
WORD status;
DWORD style = GetWindowLongPtr(hwnd,GWL_STYLE);
if (style & CLS_NOHIDEOFFLINE) checkHideOffline = 0;
@@ -219,7 +220,7 @@ void AddContactToTree(HWND hwnd, ClcData *dat, HANDLE hContact, int updateTotalC if (checkHideOffline && pcli->pfnIsHiddenMode(dat,status)) {
for (i = 1;;i++) {
TCHAR *szGroupName = pcli->pfnGetGroupName(i, &groupFlags);
- if (szGroupName == NULL)
+ if (szGroupName == NULL)
return; //never happens
if ( !lstrcmp(szGroupName,cacheEntry->tszGroup))
break;
@@ -229,7 +230,7 @@ void AddContactToTree(HWND hwnd, ClcData *dat, HANDLE hContact, int updateTotalC }
for (i = 1;; i++) {
TCHAR *szGroupName = pcli->pfnGetGroupName(i, &groupFlags);
- if (szGroupName == NULL)
+ if (szGroupName == NULL)
return; //never happens
if ( !lstrcmp(szGroupName,cacheEntry->tszGroup))
break;
@@ -248,7 +249,7 @@ void AddContactToTree(HWND hwnd, ClcData *dat, HANDLE hContact, int updateTotalC }
}
ClcContact *cont = AddContactToGroup(dat,group,cacheEntry);
- if (cont && cont->proto) {
+ if (cont && cont->proto) {
cont->SubAllocated = 0;
if (strcmp(cont->proto,"MetaContacts") == 0)
AddSubcontacts(cont);
@@ -269,7 +270,7 @@ ClcGroup *RemoveItemFromGroup(HWND hwnd,ClcGroup *group,struct ClcContact *conta }
group = saveRemoveItemFromGroup(hwnd, group, contact, updateTotalCount);
-
+
ClearRowByIndexCache();
return group;
}
@@ -279,10 +280,10 @@ void DeleteItemFromTree(HWND hwnd,HANDLE hItem) struct ClcContact *contact;
ClcGroup *group;
struct ClcData *dat = (struct ClcData*)GetWindowLongPtr(hwnd,0);
-
+
ClearRowByIndexCache();
dat->needsResort = 1;
-
+
if ( !FindItem(hwnd,dat,hItem,&contact,&group,NULL)) {
DBVARIANT dbv;
int i,nameOffset;
@@ -302,7 +303,7 @@ void DeleteItemFromTree(HWND hwnd,HANDLE hItem) int len = lstrlen(group->cl.items[i]->szText);
if ( !_tcsncmp(group->cl.items[i]->szText,dbv.ptszVal+nameOffset,len) && (dbv.ptszVal[nameOffset+len] == '\\' || dbv.pszVal[nameOffset+len] == '\0')) {
group->totalMembers--;
- if (dbv.pszVal[nameOffset+len] == '\0')
+ if (dbv.pszVal[nameOffset+len] == '\0')
break;
}
}
@@ -378,7 +379,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat) else cont = AddContactToGroup(dat,group,cacheEntry);
}
}
- if (cont && cont->proto) {
+ if (cont && cont->proto) {
cont->SubAllocated = 0;
if (strcmp(cont->proto,"MetaContacts") == 0)
AddSubcontacts(cont);
@@ -417,7 +418,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat) OutputDebugStringA(buf);
db_set_dw((HANDLE)0,"CLUI","PF:Last RebuildEntireList Time:",tick);
- }
+ }
}
@@ -491,7 +492,7 @@ void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort) {
#ifdef _DEBUG
DWORD tick = GetTickCount();
-#endif
+#endif
int oldSort = dat->needsResort;
saveSortCLC(hwnd, dat, useInsertionSort);
if ( oldSort )
@@ -508,7 +509,7 @@ void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort) db_set_dw((HANDLE)0,"CLUI","PF:Last SortCLC Time:",tick);
}
}
-#endif
+#endif
}
struct SavedContactState_t
@@ -568,7 +569,7 @@ void SaveStateAndRebuildList(HWND hwnd,struct ClcData *dat) savedGroup[savedGroupCount-1].expanded = group->expanded;
continue;
}
- else if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT) {
+ else if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT) {
if (++savedContactCount>savedContactAlloced) {
savedContactAlloced += allocstep;
savedContact = (struct SavedContactState_t*)mir_realloc(savedContact,sizeof(struct SavedContactState_t)*savedContactAlloced);
@@ -607,7 +608,7 @@ void SaveStateAndRebuildList(HWND hwnd,struct ClcData *dat) pcli->pfnFreeGroup(&dat->list);
RebuildEntireList(hwnd,dat);
-
+
group = &dat->list;
group->scanIndex = 0;
for (;;) {
@@ -632,7 +633,7 @@ void SaveStateAndRebuildList(HWND hwnd,struct ClcData *dat) memcpy(group->cl.items[group->scanIndex]->iExtraImage, savedContact[i].iExtraImage, sizeof(contact->iExtraImage));
if (savedContact[i].checked)
group->cl.items[group->scanIndex]->flags |= CONTACTF_CHECKED;
- break;
+ break;
}
if (group->cl.items[group->scanIndex]->SubAllocated>0)
{
@@ -642,8 +643,8 @@ void SaveStateAndRebuildList(HWND hwnd,struct ClcData *dat) memcpy(group->cl.items[group->scanIndex]->subcontacts[l].iExtraImage, savedContact[i].iExtraImage, sizeof(contact->iExtraImage));
if (savedContact[i].checked)
group->cl.items[group->scanIndex]->subcontacts[l].flags |= CONTACTF_CHECKED;
- break;
- }
+ break;
+ }
}
}
group->scanIndex++;
@@ -669,7 +670,7 @@ void SaveStateAndRebuildList(HWND hwnd,struct ClcData *dat) //srand(GetTickCount());
-
+
tick = GetTickCount()-tick;
{
char buf[255];
@@ -677,7 +678,7 @@ void SaveStateAndRebuildList(HWND hwnd,struct ClcData *dat) mir_snprintf(buf, SIZEOF(buf), "SaveStateAndRebuildList %d \r\n", tick);
OutputDebugStringA(buf);
- }
+ }
ClearRowByIndexCache();
SendMessage(GetParent(hwnd),WM_NOTIFY,0,(LPARAM)&nm);
}
diff --git a/plugins/Clist_mw/src/clcopts.cpp b/plugins/Clist_mw/src/clcopts.cpp index ef363ef11a..33e6d67d1f 100644 --- a/plugins/Clist_mw/src/clcopts.cpp +++ b/plugins/Clist_mw/src/clcopts.cpp @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "clc.h"
@@ -104,7 +106,7 @@ struct CheckBoxValues_t { DWORD style;
TCHAR *szDescr;
};
-static const struct CheckBoxValues_t greyoutValues[] =
+static const struct CheckBoxValues_t greyoutValues[] =
{
{GREYF_UNFOCUS, LPGENT("Not focused") },
{MODEF_OFFLINE, LPGENT("Offline") },
@@ -119,7 +121,7 @@ static const struct CheckBoxValues_t greyoutValues[] = {PF2_ONTHEPHONE, LPGENT("On the phone") }
};
-static const struct CheckBoxValues_t offlineValues[] =
+static const struct CheckBoxValues_t offlineValues[] =
{
{MODEF_OFFLINE, LPGENT("Offline") },
{PF2_ONLINE, LPGENT("Online") },
@@ -321,7 +323,7 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,db_get_dw(NULL,"StatusBar","BkColour",CLCDEFAULT_BKCOLOUR));
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_SELBKCOLOUR);
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,db_get_dw(NULL,"StatusBar","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
- {
+ {
DBVARIANT dbv;
if ( !db_get_s(NULL,"StatusBar","BkBitmap",&dbv)) {
SetDlgItemTextA(hwndDlg,IDC_FILENAME,dbv.pszVal);
@@ -390,7 +392,7 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
db_set_b(NULL,"StatusBar","UseBitmap",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_BITMAP));
- {
+ {
COLORREF col;
col = SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_GETCOLOUR,0,0);
if (col == CLCDEFAULT_BKCOLOUR) db_unset(NULL,"StatusBar","BkColour");
@@ -448,7 +450,7 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, char szPath[MAX_PATH];
if ( PathToAbsolute(dbv.pszVal, szPath))
SetDlgItemTextA(hwndDlg,IDC_FILENAME,szPath);
-
+
mir_free(dbv.pszVal);
}
}
@@ -544,4 +546,3 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, }
return FALSE;
}
-
diff --git a/plugins/Clist_mw/src/clcpaint.cpp b/plugins/Clist_mw/src/clcpaint.cpp index f6bd3e34c4..fef2359bd5 100644 --- a/plugins/Clist_mw/src/clcpaint.cpp +++ b/plugins/Clist_mw/src/clcpaint.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -122,7 +123,7 @@ static int GetGeneralisedStatus(void) return status;
}
-static int GetRealStatus(struct ClcContact * contact, int status)
+static int GetRealStatus(struct ClcContact * contact, int status)
{
int i;
char *szProto = contact->proto;
@@ -151,7 +152,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) int grey = 0,groupCountsFontTopShift;
HBRUSH hBrushAlternateGrey = NULL;
POINT pt;
- RECT testrc;
+ RECT testrc;
// yes I know about GetSysColorBrush()
COLORREF tmpbkcolour = dat->bkColour;
@@ -159,10 +160,10 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) if (dat->greyoutFlags & pcli->pfnClcStatusToPf2(status) || style&WS_DISABLED) grey = 1;
else if (GetFocus() != hwnd && dat->greyoutFlags&GREYF_UNFOCUS) grey = 1;
GetClientRect(hwnd,&clRect);
-
+
if (rcPaint == NULL) rcPaint = &clRect;
//rcPaint = &clRect;
-
+
if (IsRectEmpty(rcPaint)) return;
GetCursorPos(&pt);
ScreenToClient(hwnd,&pt);
@@ -172,9 +173,9 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) hdcMem = CreateCompatibleDC(hdc);
hBmpOsb = CreateBitmap(clRect.right,clRect.bottom,1,GetDeviceCaps(hdc,BITSPIXEL),NULL);
oldbmp = (HBITMAP)SelectObject(hdcMem,hBmpOsb);
- {
+ {
oldfont = (HFONT)SelectObject(hdcMem,dat->fontInfo[FONTID_GROUPS].hFont);
-
+
TEXTMETRIC tm;
GetTextMetrics(hdcMem,&tm);
groupCountsFontTopShift = tm.tmAscent;
@@ -292,7 +293,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) SIZE textSize,countsSize,spaceSize;
int width,checkboxWidth;
char *szCounts;
-
+
if (subindex == -1) {
Drawing = group->cl.items[group->scanIndex];
subident = 0;
@@ -305,7 +306,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) selected = index == dat->selection && (dat->showSelAlways || dat->exStyle&CLS_EX_SHOWSELALWAYS || GetFocus() == hwnd) && Drawing->type != CLCIT_DIVIDER;
hottrack = dat->exStyle&CLS_EX_TRACKSELECT && Drawing->type != CLCIT_DIVIDER && dat->iHotTrack == index;
-
+
if (style&CLS_GREYALTERNATE && index&1) {
RECT rc;
rc.top = y; rc.bottom = rc.top+dat->rowHeight;
@@ -315,9 +316,9 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) //setup
if (Drawing->type == CLCIT_GROUP) {
- if (Drawing->group->expanded)
+ if (Drawing->group->expanded)
ChangeToFont(hdcMem,dat,FONTID_GROUPS,&fontHeight);
- else
+ else
ChangeToFont(hdcMem,dat,FONTID_GROUPSCLOSED,&fontHeight);
}
else if (Drawing->type == CLCIT_INFO) {
@@ -328,13 +329,13 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) ChangeToFont(hdcMem,dat,FONTID_DIVIDERS,&fontHeight);
else if (Drawing->type == CLCIT_CONTACT && (Drawing->flags&CONTACTF_NOTONLIST) && (!Drawing->isSubcontact))
ChangeToFont(hdcMem,dat,FONTID_NOTONLIST,&fontHeight);
- else if ( Drawing->type == CLCIT_CONTACT &&
- (
+ else if ( Drawing->type == CLCIT_CONTACT &&
+ (
(Drawing->flags&CONTACTF_INVISTO && (!Drawing->isSubcontact) && GetRealStatus(group->cl.items[group->scanIndex], status) != ID_STATUS_INVISIBLE )
||
(Drawing->flags&CONTACTF_VISTO && (!Drawing->isSubcontact) && GetRealStatus(group->cl.items[group->scanIndex], status) == ID_STATUS_INVISIBLE)
- )
- )
+ )
+ )
{
// the contact is in the always visible list and the proto is invisible
// the contact is in the always invisible and the proto is in any other mode
@@ -367,7 +368,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) // default value - paint on text
int x=dat->leftMargin+indent*dat->groupIndent+checkboxWidth+dat->iconXSpace-2+subident;
ImageList_DrawEx(dat->himlHighlight,0,hdcMem,x,y,min(width+5,clRect.right-x),dat->rowHeight,CLR_NONE,CLR_NONE,dat->exStyle&CLS_EX_NOTRANSLUCENTSEL?ILD_NORMAL:ILD_BLEND25);
- SetTextColor(hdcMem,dat->selTextColour);
+ SetTextColor(hdcMem,dat->selTextColour);
}
else if (hottrack)
SetHotTrackColour(hdcMem,dat);
@@ -436,11 +437,11 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) else TextOutA(hdcMem,rc.right,rc.top+groupCountsFontTopShift,szCounts,lstrlenA(szCounts));
//ChangeToFont(hdcMem,dat,FONTID_GROUPS,&fontHeight);
- if (Drawing->group->expanded)
+ if (Drawing->group->expanded)
{
ChangeToFont(hdcMem,dat,FONTID_GROUPS,&fontHeight);
}
- else
+ else
{
ChangeToFont(hdcMem,dat,FONTID_GROUPSCLOSED,&fontHeight);
}
@@ -489,7 +490,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) }
if (dat->style&CLS_SHOWSTATUSMESSAGES)
- {
+ {
// status message
if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->flags & CONTACTF_STATUSMSG) {
TCHAR * szText = group->cl.items[group->scanIndex]->szStatusMsg;
@@ -501,7 +502,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) ChangeToFont(hdcMem,dat,FONTID_STATUSMSG,&fontHeight);
//ExtTextOut(hdcMem,rc.left,rc.top,ETO_CLIPPED,&rc,szText,lstrlen(szText),NULL);
DrawText(hdcMem, szText, lstrlen(szText), &rc, DT_SINGLELINE | DT_EDITCONTROL | DT_NOPREFIX | DT_NOCLIP | DT_WORD_ELLIPSIS);
- }
+ }
}
if ( !Drawing->isSubcontact || ( db_get_b(NULL,"CLC","MetaHideExtra",0) == 0)) {
@@ -519,7 +520,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) if (selected) mode = ILD_SELECTED;
else if (hottrack) {mode = ILD_FOCUS; colourFg = dat->hotTextColour;}
else if (Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST) {colourFg = dat->fontInfo[FONTID_NOTONLIST].colour; mode = ILD_BLEND50;}
- {
+ {
}
if (dat->MetaIgnoreEmptyExtra) c--; else c = iImage;
@@ -535,7 +536,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) }
}
else {
- int ic = 0;
+ int ic = 0;
for (iImage = 0;iImage<dat->extraColumnsCount;iImage++) {
COLORREF colourFg = dat->selBkColour;
int mode = ILD_NORMAL;
@@ -549,7 +550,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) colourFg = dat->hotTextColour;
}
else if (Drawing->type == CLCIT_CONTACT && (Drawing->flags & CONTACTF_NOTONLIST)) {
- colourFg = dat->fontInfo[FONTID_NOTONLIST].colour;
+ colourFg = dat->fontInfo[FONTID_NOTONLIST].colour;
mode = ILD_BLEND50;
}
diff --git a/plugins/Clist_mw/src/clcutils.cpp b/plugins/Clist_mw/src/clcutils.cpp index 4aa7ef72bb..0edfda16ed 100644 --- a/plugins/Clist_mw/src/clcutils.cpp +++ b/plugins/Clist_mw/src/clcutils.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "clc.h"
@@ -82,7 +84,7 @@ int HitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcContact if (flags) *flags |= CLCHT_ONITEMICON;
return hit;
}
-
+
hdc = GetDC(hwnd);
GetTextExtentPoint32(hdc,hitcontact->szText,lstrlen(hitcontact->szText),&textSize);
width = textSize.cx;
@@ -94,7 +96,7 @@ int HitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcContact if (hitcontact->iExtraImage[i] == EMPTY_EXTRA_ICON)
continue;
- if ((style & CLS_EX_MULTICOLUMNALIGNLEFT)) {
+ if ((style & CLS_EX_MULTICOLUMNALIGNLEFT)) {
x = (dat->leftMargin+indent*dat->groupIndent+checkboxWidth+dat->iconXSpace-2+width);
x += 16;
x = x+dat->extraColumnSpacing*(ic);
@@ -104,7 +106,7 @@ int HitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcContact int ir;
if (dat->MetaIgnoreEmptyExtra) {
ir = 0;
- for (int j = i;j<dat->extraColumnsCount;j++)
+ for (int j = i;j<dat->extraColumnsCount;j++)
if (hitcontact->iExtraImage[j] != EMPTY_EXTRA_ICON)
ir++;
}
@@ -120,14 +122,14 @@ int HitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcContact ReleaseDC(hwnd,hdc);
return hit;
- }
+ }
}
- if (hitcontact->type == CLCIT_GROUP)
+ if (hitcontact->type == CLCIT_GROUP)
oldfont = (HFONT)SelectObject(hdc,dat->fontInfo[FONTID_GROUPS].hFont);
- else
+ else
oldfont = (HFONT)SelectObject(hdc,dat->fontInfo[FONTID_CONTACTS].hFont);
-
+
GetTextExtentPoint32(hdc,hitcontact->szText,lstrlen(hitcontact->szText),&textSize);
width = textSize.cx;
if (hitcontact->type == CLCIT_GROUP) {
@@ -199,7 +201,7 @@ void RecalcScrollBar(HWND hwnd,struct ClcData *dat) RECT clRect;
NMCLISTCONTROL nm;
boolean sbar = FALSE;
-
+
GetClientRect(hwnd,&clRect);
si.cbSize = sizeof(si);
@@ -208,7 +210,7 @@ void RecalcScrollBar(HWND hwnd,struct ClcData *dat) si.nMax = dat->rowHeight*GetGroupContentsCount(&dat->list,2)-1;
si.nPage = clRect.bottom;
si.nPos = dat->yScroll;
-
+
nm.hdr.code = CLN_LISTSIZECHANGE;
nm.hdr.hwndFrom = hwnd;
nm.hdr.idFrom = GetDlgCtrlID(hwnd);
@@ -224,9 +226,9 @@ void RecalcScrollBar(HWND hwnd,struct ClcData *dat) si.nPos = dat->yScroll;
sbar = (dat->noVScrollbar == 1||(int)si.nPage>si.nMax);
-
+
ShowScrollBar(hwnd,SB_VERT,sbar? FALSE : TRUE);
- if ( !sbar) {
+ if ( !sbar) {
if ( GetWindowLongPtr(hwnd,GWL_STYLE)&CLS_CONTACTLIST ) {
if ( dat->noVScrollbar == 0 ) SetScrollInfo(hwnd,SB_VERT,&si,TRUE);
else SetScrollInfo(hwnd,SB_VERT,&si,FALSE);
@@ -282,6 +284,6 @@ void LoadClcOptions(HWND hwnd,struct ClcData *dat) saveLoadClcOptions( hwnd, dat );
for (i = 0; i <= FONTID_MAX; i++)
- if (dat->fontInfo[i].fontHeight > dat->rowHeight)
+ if (dat->fontInfo[i].fontHeight > dat->rowHeight)
dat->rowHeight = dat->fontInfo[i].fontHeight;
}
diff --git a/plugins/Clist_mw/src/clist.h b/plugins/Clist_mw/src/clist.h index 2736a08f44..e234bbdd10 100644 --- a/plugins/Clist_mw/src/clist.h +++ b/plugins/Clist_mw/src/clist.h @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#ifndef _CLIST_H_
#define _CLIST_H_
diff --git a/plugins/Clist_mw/src/clistmenus.cpp b/plugins/Clist_mw/src/clistmenus.cpp index 423e58bb26..4b7ee0b425 100644 --- a/plugins/Clist_mw/src/clistmenus.cpp +++ b/plugins/Clist_mw/src/clistmenus.cpp @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2006 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-06 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#pragma hdrstop
diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index a859352a18..99e6edef66 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
extern int DefaultImageListColorDepth;
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index b85fa0e6a6..42c146af88 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "clist.h"
@@ -58,7 +60,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
break;
}
- case WM_DESTROY:
+ case WM_DESTROY:
{
UnhookEvent( (HANDLE)GetWindowLongPtr(hwndDlg,GWLP_USERDATA));
break;
@@ -78,10 +80,10 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton(hwndDlg, IDC_HIDEOFFLINE, db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_HIDEEMPTYGROUPS, db_get_b(NULL,"CList","HideEmptyGroups",SETTING_HIDEEMPTYGROUPS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, db_get_b(NULL,"CList","UseGroups",SETTING_USEGROUPS_DEFAULT) ? BST_UNCHECKED : BST_CHECKED);
- CheckDlgButton(hwndDlg, IDC_SORTBYNAME,
+ CheckDlgButton(hwndDlg, IDC_SORTBYNAME,
!db_get_b(NULL,"CList","SortByStatus",SETTING_SORTBYSTATUS_DEFAULT) &&
!db_get_b(NULL,"CList","SortByProto",SETTING_SORTBYPROTO_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
-
+
CheckDlgButton(hwndDlg, IDC_SORTBYSTATUS, db_get_b(NULL,"CList","SortByStatus",SETTING_SORTBYSTATUS_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_NOOFFLINEMOVE, db_get_b(NULL,"CList","NoOfflineBottom",SETTING_NOOFFLINEBOTTOM_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
@@ -90,7 +92,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton(hwndDlg, IDC_AUTOHIDE, db_get_b(NULL,"CList","AutoHide",SETTING_AUTOHIDE_DEFAULT) ? BST_CHECKED : BST_UNCHECKED);
EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIME),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
EnableWindow(GetDlgItem(hwndDlg,IDC_HIDETIMESPIN),IsDlgButtonChecked(hwndDlg,IDC_AUTOHIDE));
- {
+ {
DWORD caps = CallService(MS_CLUI_GETCAPS,CLUICAPS_FLAGS1,0);
if ( !(caps&CLUIF_HIDEEMPTYGROUPS)) ShowWindow(GetDlgItem(hwndDlg,IDC_HIDEEMPTYGROUPS),SW_HIDE);
if ( !(caps&CLUIF_DISABLEGROUPS)) ShowWindow(GetDlgItem(hwndDlg,IDC_DISABLEGROUPS),SW_HIDE);
@@ -148,7 +150,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
if (-1 == (int)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL,0,0))
SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_SETCURSEL,0,0);
- SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_BLINKTIME),0); // set buddy
+ SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETBUDDY,(WPARAM)GetDlgItem(hwndDlg,IDC_BLINKTIME),0); // set buddy
SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETRANGE,0,MAKELONG(0x3FFF,250));
SendDlgItemMessage(hwndDlg,IDC_BLINKSPIN,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,"CList","IconFlashTime",550),0));
return TRUE;
@@ -186,7 +188,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
db_set_b(NULL,"CList","HideOffline",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEOFFLINE));
- {
+ {
DWORD caps = CallService(MS_CLUI_GETCAPS,CLUICAPS_FLAGS1,0);
if (caps & CLUIF_HIDEEMPTYGROUPS) db_set_b(NULL,"CList","HideEmptyGroups",(BYTE)IsDlgButtonChecked(hwndDlg,IDC_HIDEEMPTYGROUPS));
if (caps & CLUIF_DISABLEGROUPS) db_set_b(NULL,"CList","UseGroups",(BYTE)!IsDlgButtonChecked(hwndDlg,IDC_DISABLEGROUPS));
@@ -217,9 +219,9 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
int cursel = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL,0,0);
PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETITEMDATA,cursel,0);
- if ( pa == NULL )
+ if ( pa == NULL )
db_unset(NULL, "CList","PrimaryStatus");
- else
+ else
db_set_s(NULL,"CList","PrimaryStatus", pa->szModuleName);
}
pcli->pfnTrayIconIconsChanged();
diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp index bc810e7d12..7e6b081d80 100644 --- a/plugins/Clist_mw/src/clistsettings.cpp +++ b/plugins/Clist_mw/src/clistsettings.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "clist.h"
@@ -66,7 +68,7 @@ void FreeDisplayNameCache(SortedList *list) FreeDisplayNameCacheItem((ClcCacheEntry*)list->items[i] );
mir_free(list->items[i]);
}
-
+
List_Destroy(list);
}
@@ -78,7 +80,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) if (pdnce->szProto == NULL && pdnce->protoNotExists == FALSE) {
pdnce->szProto = GetProtoForContact(pdnce->hContact);
- if (pdnce->szProto == NULL)
+ if (pdnce->szProto == NULL)
pdnce->protoNotExists = FALSE;
else {
if (CallService(MS_PROTO_ISPROTOCOLLOADED,0,(LPARAM)pdnce->szProto) == 0)
@@ -90,7 +92,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) } } } }
if (pdnce->tszName == NULL)
- {
+ {
if (pdnce->protoNotExists)
pdnce->tszName = mir_tstrdup(TranslateT("_NoProtocol_"));
else {
@@ -98,7 +100,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) pdnce->tszName = GetNameForContact(pdnce->hContact,0,&pdnce->isUnknown);
else
pdnce->tszName = GetNameForContact(pdnce->hContact,0,NULL);
- }
+ }
}
else {
if (pdnce->isUnknown&&pdnce->szProto&&pdnce->protoNotExists == TRUE&&OnModulesLoadedCalled) {
@@ -124,7 +126,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) if (pdnce->bIsHidden == -1)
pdnce->bIsHidden = db_get_b(pdnce->hContact,"CList","Hidden",0);
-
+
if (pdnce->noHiddenOffline == -1)
pdnce->noHiddenOffline = db_get_b(pdnce->hContact,"CList","noOffline",0);
@@ -133,7 +135,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) if (pdnce->ApparentMode == -1)
pdnce->ApparentMode = db_get_w(pdnce->hContact,pdnce->szProto,"ApparentMode",0);
-
+
if (pdnce->NotOnList == -1)
pdnce->NotOnList = db_get_b(pdnce->hContact,"CList","NotOnList",0);
@@ -147,7 +149,7 @@ void InvalidateDisplayNameCacheEntryByPDNE(HANDLE hContact,ClcCacheEntry *pdnce, return;
if ( SettingType == -1 || SettingType == DBVT_DELETED )
- {
+ {
mir_free(pdnce->tszName);
pdnce->tszName = NULL;
mir_free(pdnce->tszGroup);
@@ -193,7 +195,7 @@ void InvalidateDisplayNameCacheEntryByPDNE(HANDLE hContact,ClcCacheEntry *pdnce, char *GetContactCachedProtocol(HANDLE hContact)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
- if (cacheEntry&&cacheEntry->szProto)
+ if (cacheEntry&&cacheEntry->szProto)
return cacheEntry->szProto;
return NULL;
@@ -263,7 +265,7 @@ int GetContactCachedStatus(HANDLE hContact) {
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry&&cacheEntry->status != 0) return cacheEntry->status;
- return 0;
+ return 0;
}
int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
@@ -275,7 +277,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) if (hContact == NULL)
return 0;
- __try
+ __try
{
ClcCacheEntry *pdnce = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (pdnce == NULL) {
@@ -287,11 +289,11 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) if ( !strcmp(cws->szModule,pdnce->szProto)) {
InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type);
- if (cws->value.type == DBVT_WORD && !strcmp(cws->szSetting, "Status")) {
+ if (cws->value.type == DBVT_WORD && !strcmp(cws->szSetting, "Status")) {
if ( !(pdnce->bIsHidden == 1)) {
if ( db_get_b((HANDLE)NULL,"CList","ShowStatusMsg",0)||db_get_b(hContact,"CList","StatusMsgAuto",0))
- db_set_s(hContact, "CList", "StatusMsg", "");
+ db_set_s(hContact, "CList", "StatusMsg", "");
if ( db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) {
// User's state is changing, and we are hideOffline-ing
@@ -322,7 +324,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type);
if ( !strcmp(cws->szSetting,"Hidden")) {
- InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type);
+ InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type);
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
char *szProto = GetContactProto((HANDLE)wParam);
ChangeContactIcon(hContact,ExtIconFromStatusMode(hContact, szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)), 1); //by FYR
@@ -336,15 +338,15 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) if ( !strcmp(cws->szModule, "Protocol")) {
if ( !strcmp(cws->szSetting,"p")) {
OutputDebugStringA("CHANGE: proto\r\n");
- InvalidateDisplayNameCacheEntryByPDNE(hContact, pdnce, cws->value.type);
+ InvalidateDisplayNameCacheEntryByPDNE(hContact, pdnce, cws->value.type);
char *szProto = (cws->value.type == DBVT_DELETED) ? NULL : cws->value.pszVal;
ChangeContactIcon(hContact, ExtIconFromStatusMode(hContact, szProto, szProto == NULL?ID_STATUS_OFFLINE:db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE)),0); //by FYR
}
}
- }
- __except (exceptFunction(GetExceptionInformation()))
- {
- }
+ }
+ __except (exceptFunction(GetExceptionInformation()))
+ {
+ }
return 0;
}
diff --git a/plugins/Clist_mw/src/clisttray.cpp b/plugins/Clist_mw/src/clisttray.cpp index 65ff0b8cec..8e5a309dee 100644 --- a/plugins/Clist_mw/src/clisttray.cpp +++ b/plugins/Clist_mw/src/clisttray.cpp @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "m_clui.h"
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp index c8c22f6cc8..9e8882ec55 100644 --- a/plugins/Clist_mw/src/clui.cpp +++ b/plugins/Clist_mw/src/clui.cpp @@ -1,25 +1,27 @@ /*
- Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright 2000-2003 Miranda ICQ/IM project,
- all portions of this codebase are copyrighted to the people
- listed in contributors.txt.
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+Miranda NG: the free IM client for Microsoft* Windows*
+
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#define TM_AUTOALPHA 1
diff --git a/plugins/Clist_mw/src/cluiopts.cpp b/plugins/Clist_mw/src/cluiopts.cpp index f623a7adb7..be38c3ef31 100644 --- a/plugins/Clist_mw/src/cluiopts.cpp +++ b/plugins/Clist_mw/src/cluiopts.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
extern HMENU hMenuMain;
@@ -69,7 +71,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L EnableWindow(GetDlgItem(hwndDlg,IDC_TITLETEXT),FALSE);
}
CheckDlgButton(hwndDlg, IDC_FADEINOUT, db_get_b(NULL,"CLUI","FadeInOut",0) ? BST_CHECKED : BST_UNCHECKED);
- CheckDlgButton(hwndDlg, IDC_AUTOSIZE, db_get_b(NULL,"CLUI","AutoSize",0) ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hwndDlg, IDC_AUTOSIZE, db_get_b(NULL,"CLUI","AutoSize",0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_DROPSHADOW, db_get_b(NULL,"CList","WindowShadow",0) ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hwndDlg, IDC_ONDESKTOP, db_get_b(NULL,"CList","OnDesktop", 0) ? BST_CHECKED : BST_UNCHECKED);
SendDlgItemMessage(hwndDlg,IDC_MAXSIZESPIN,UDM_SETRANGE,0,MAKELONG(100,0));
@@ -104,7 +106,7 @@ static INT_PTR CALLBACK DlgProcCluiOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L }
if (s)
- {
+ {
SetDlgItemTextA(hwndDlg,IDC_TITLETEXT,s);
mir_free(s);
}
@@ -317,14 +319,14 @@ static INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L EnableWindow(GetDlgItem(hwndDlg,IDC_EQUALSECTIONS),IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
EnableWindow(GetDlgItem(hwndDlg,IDC_SBPANELBEVEL),IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
EnableWindow(GetDlgItem(hwndDlg,IDC_SHOWSIZEGRIP),IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
- EnableWindow(GetDlgItem(hwndDlg,IDC_USECONNECTINGICON),IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
- EnableWindow(GetDlgItem(hwndDlg,IDC_USEOWNERDRAW),IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
+ EnableWindow(GetDlgItem(hwndDlg,IDC_USECONNECTINGICON),IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
+ EnableWindow(GetDlgItem(hwndDlg,IDC_USEOWNERDRAW),IsDlgButtonChecked(hwndDlg,IDC_SHOWSBAR));
}
if (LOWORD(wParam) == IDC_DEFBKCOLOR)
{
SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,CLR_DEFAULT);
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
@@ -361,7 +363,7 @@ static INT_PTR CALLBACK DlgProcSBarOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L SendMessage(pcli->hwndContactList,WM_SIZE,0,0);
OnStatusBarBackgroundChange();
- CluiProtocolStatusChanged(0,0);
+ CluiProtocolStatusChanged(0,0);
return TRUE;
}
}
diff --git a/plugins/Clist_mw/src/cluiservices.cpp b/plugins/Clist_mw/src/cluiservices.cpp index 554a7958a7..4fc0066b1e 100644 --- a/plugins/Clist_mw/src/cluiservices.cpp +++ b/plugins/Clist_mw/src/cluiservices.cpp @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
extern int CreateTimerForConnectingIcon(WPARAM,LPARAM);
@@ -66,7 +68,7 @@ void CluiProtocolStatusChanged(int parStatus, const char* szProto) SendMessage(pcli->hwndStatus,SB_SETBKCOLOR,0,db_get_dw(0,"CLUI","SBarBKColor",CLR_DEFAULT));
partWidths = (int*)alloca((protoCount+1)*sizeof(int));
//partWidths[0] = FirstIconOffset;
- if ( db_get_b(NULL,"CLUI","UseOwnerDrawStatusBar",0)||db_get_b(NULL,"CLUI","EqualSections",1))
+ if ( db_get_b(NULL,"CLUI","UseOwnerDrawStatusBar",0)||db_get_b(NULL,"CLUI","EqualSections",1))
{
RECT rc;
int toshow, part;
@@ -133,7 +135,7 @@ void CluiProtocolStatusChanged(int parStatus, const char* szProto) GetTextExtentPoint32(hdc, szStatus, (int)_tcslen(szStatus), &textSize);
x += textSize.cx;
}
- if (showOpts&6) x += 2;
+ if (showOpts&6) x += 2;
partWidths[partCount] = (partCount?partWidths[partCount-1]:startoffset)+x+extraspace;
partCount++;
}
diff --git a/plugins/Clist_mw/src/commonheaders.h b/plugins/Clist_mw/src/commonheaders.h index 315f5e6605..2a52b421a5 100644 --- a/plugins/Clist_mw/src/commonheaders.h +++ b/plugins/Clist_mw/src/commonheaders.h @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2004 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#define _CRT_SECURE_NO_WARNINGS
#ifndef _COMMON_HEADERS_H_
#define _COMMON_HEADERS_H_ 1
diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp index 9a818226e1..095998689e 100644 --- a/plugins/Clist_mw/src/contact.cpp +++ b/plugins/Clist_mw/src/contact.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "m_clui.h"
#include "clist.h"
@@ -48,7 +50,7 @@ struct { static int GetContactStatus(HANDLE hContact)
{
/*
-
+
char *szProto;
szProto = GetContactProto(hContact,0);
@@ -100,7 +102,7 @@ void LoadContactTree(void) sortNoOfflineBottom = db_get_b(NULL,"CList","NoOfflineBottom",SETTING_NOOFFLINEBOTTOM_DEFAULT);
CallService(MS_CLUI_LISTENDREBUILD,0,0);
-
+
tick = GetTickCount()-tick;
char buf[255];
@@ -124,7 +126,7 @@ int CompareContacts( const struct ClcContact *contact1, const struct ClcContact if (sortByProto) {
/* deal with statuses, online contacts have to go above offline */
- if (sortNoOfflineBottom == 0)
+ if (sortNoOfflineBottom == 0)
if ((statusa == ID_STATUS_OFFLINE) != (statusb == ID_STATUS_OFFLINE)) {
return 2*(statusa == ID_STATUS_OFFLINE)-1;
}
@@ -132,7 +134,7 @@ int CompareContacts( const struct ClcContact *contact1, const struct ClcContact rc = strcmp(SAFESTRING(szProto1),SAFESTRING(szProto2)); /* strcmp() doesn't like NULL so feed in "" as needed */
if (rc != 0 && (szProto1 != NULL && szProto2 != NULL)) return rc;
/* protocols are the same, order by display name */
- }
+ }
if (sortByStatus) {
int ordera,orderb;
diff --git a/plugins/Clist_mw/src/groupmenu.cpp b/plugins/Clist_mw/src/groupmenu.cpp index c6fd1ea357..fdd3af5b08 100644 --- a/plugins/Clist_mw/src/groupmenu.cpp +++ b/plugins/Clist_mw/src/groupmenu.cpp @@ -1,9 +1,10 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
listed in contributors.txt.
This program is free software; you can redistribute it and/or
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include "m_clui.h"
#include "clist.h"
@@ -72,7 +74,7 @@ static INT_PTR BuildGroupMenu(WPARAM wParam,LPARAM lParam) hMenu = CreatePopupMenu();
//hMenu = wParam;
tick = GetTickCount();
-
+
NotifyEventHooks(hPreBuildGroupMenuEvent,0,0);
CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)¶m);
@@ -87,11 +89,11 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam) CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
if ( !pcli->pfnConvertMenu(mi, &tmi))
return 0;
-
+
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)mir_calloc(sizeof(GroupMenuExecParam));
if (mmep == NULL)
return 0;
-
+
//we need just one parametr.
mmep->szServiceName = mir_strdup(mi->pszService);
mmep->Param1 = mi->popupPosition;
@@ -107,7 +109,7 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam,LPARAM lParam) OptParam op;
op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM,(WPARAM)hGroupMenuObject,(LPARAM)&tmi);
- op.Setting = OPT_MENUITEMSETUNIQNAME;
+ op.Setting = OPT_MENUITEMSETUNIQNAME;
op.Value = (INT_PTR)buf;
CallService(MO_SETOPTIONSMENUITEM,0,(LPARAM)&op);
return (INT_PTR)op.Handle;
@@ -133,14 +135,14 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) { if (hGroupMainMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0);
+ mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETMAIN,0,0);
}
if (hGroupStatusMenuItemProxy == (HANDLE)lParam) {
mii->fMask |= MIIM_SUBMENU;
- mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
+ mii->hSubMenu = (HMENU)CallService(MS_CLIST_MENUGETSTATUS,0,0);
}
-
+
return TRUE;
}
@@ -150,17 +152,17 @@ INT_PTR GroupMenuonAddService(WPARAM wParam,LPARAM lParam) { INT_PTR GroupMenuExecService(WPARAM wParam,LPARAM lParam) {
if (wParam != 0)
{
- lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
+ lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
if ( !strcmp(mmep->szServiceName,"Help/AboutCommand"))
{
//bug in help.c,it used wparam as parent window handle without reason.
mmep->Param1 = 0;
- CallService(mmep->szServiceName,mmep->Param1,lParam);
+ CallService(mmep->szServiceName,mmep->Param1,lParam);
}else
{
- CallService(mmep->szServiceName,mmep->Param1,mmep->Param2);
+ CallService(mmep->szServiceName,mmep->Param1,mmep->Param2);
}
-
+
}
return(1);
}
@@ -184,7 +186,7 @@ INT_PTR HideGroupsHelper(WPARAM wParam,LPARAM lParam) }
INT_PTR UseGroupsHelper(WPARAM wParam,LPARAM lParam)
-{
+{
int newVal = !(GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS);
db_set_b(NULL,"CList","UseGroups",(BYTE)newVal);
SendMessage(pcli->hwndContactTree,CLM_SETUSEGROUPS,newVal,0);
@@ -205,13 +207,13 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | ( db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)?CMIF_CHECKED:0);
- Menu_ModifyItem(hHideOfflineUsersMenuItem, &mi);
+ Menu_ModifyItem(hHideOfflineUsersMenuItem, &mi);
mi.flags = CMIM_FLAGS | (SendMessage(pcli->hwndContactTree,CLM_GETHIDEOFFLINEROOT,0,0)?CMIF_CHECKED:0);
- Menu_ModifyItem(hHideOfflineUsersOutHereMenuItem, &mi);
-
+ Menu_ModifyItem(hHideOfflineUsersOutHereMenuItem, &mi);
+
mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_HIDEEMPTYGROUPS?CMIF_CHECKED:0);
- Menu_ModifyItem(hHideEmptyGroupsMenuItem, &mi);
+ Menu_ModifyItem(hHideEmptyGroupsMenuItem, &mi);
mi.flags = CMIM_FLAGS | (GetWindowLongPtr(pcli->hwndContactTree,GWL_STYLE)&CLS_USEGROUPS?0:CMIF_CHECKED);
Menu_ModifyItem(hDisableGroupsMenuItem, &mi);
@@ -221,8 +223,8 @@ static int OnBuildGroupMenu(WPARAM wParam,LPARAM lParam) int static OnIconLibIconChanged(WPARAM wParam,LPARAM lParam)
{
HICON hicon = LoadIconFromExternalFile("clisticons.dll",2,TRUE,FALSE,"NewGroup","Contact List","New Group",-IDI_NEWGROUP,0);
- NewGroupIconidx = ImageList_ReplaceIcon(hCListImages,NewGroupIconidx,hicon);
-
+ NewGroupIconidx = ImageList_ReplaceIcon(hCListImages,NewGroupIconidx,hicon);
+
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON;
mi.hIcon = ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
@@ -234,7 +236,7 @@ int static OnIconLibIconChanged(WPARAM wParam,LPARAM lParam) void InitGroupMenus(void)
{
HICON hicon = LoadIconFromExternalFile("clisticons.dll",2,TRUE,TRUE,"NewGroup","Contact List","New Group",-IDI_NEWGROUP2,0);
- NewGroupIconidx = ImageList_AddIcon(hCListImages,hicon );
+ NewGroupIconidx = ImageList_AddIcon(hCListImages,hicon );
CreateServiceFunction("CLISTMENUSGroup/ExecService",GroupMenuExecService);
CreateServiceFunction("CLISTMENUSGroup/FreeOwnerDataGroupMenu",FreeOwnerDataGroupMenu);
@@ -256,7 +258,7 @@ void InitGroupMenus(void) MO_SetMenuObjectParam(hGroupMenuObject, OPT_USERDEFINEDITEMS, TRUE);
MO_SetMenuObjectParam(hGroupMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
MO_SetMenuObjectParam(hGroupMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
- {
+ {
//add exit command to menu
GroupMenuParam gmp;
@@ -318,7 +320,7 @@ void InitGroupMenus(void) mi.position = 100000;
mi.hIcon = ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = MS_CLIST_GROUPCREATE;
- mi.pszName = LPGEN("&New Group");
+ mi.pszName = LPGEN("&New Group");
hNewGroupMenuItem = (HGENMENU)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -326,7 +328,7 @@ void InitGroupMenus(void) mi.position = 100001;
mi.hIcon = NULL;
mi.pszService = MS_CLIST_SETHIDEOFFLINE;
- mi.pszName = LPGEN("&Hide Offline Users");
+ mi.pszName = LPGEN("&Hide Offline Users");
gmp.lParam = 0;gmp.wParam = -1;
hHideOfflineUsersMenuItem = (HGENMENU)AddGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
@@ -335,7 +337,7 @@ void InitGroupMenus(void) mi.position = 100002;
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
- mi.pszName = LPGEN("Hide &Offline Users out here");
+ mi.pszName = LPGEN("Hide &Offline Users out here");
hHideOfflineUsersOutHereMenuItem = (HGENMENU)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -343,7 +345,7 @@ void InitGroupMenus(void) mi.position = 100003;
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
- mi.pszName = LPGEN("Hide &Empty Groups");
+ mi.pszName = LPGEN("Hide &Empty Groups");
hHideEmptyGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0,(LPARAM)&mi);
memset(&mi,0,sizeof(mi));
@@ -351,7 +353,7 @@ void InitGroupMenus(void) mi.position = 100004;
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
- mi.pszName = LPGEN("Disable &Groups");
+ mi.pszName = LPGEN("Disable &Groups");
hDisableGroupsMenuItem = (HGENMENU)AddGroupMenuItem(0,(LPARAM)&mi);
HookEvent(ME_SKIN2_ICONSCHANGED,OnIconLibIconChanged);
@@ -396,7 +398,7 @@ static int OnBuildSubGroupMenu(WPARAM wParam,LPARAM lParam) //contact->group
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | (group->hideOffline?CMIF_CHECKED:0);
- Menu_ModifyItem(hHideOfflineUsersHereMenuItem, &mi);
+ Menu_ModifyItem(hHideOfflineUsersHereMenuItem, &mi);
return 0;
}
@@ -412,7 +414,7 @@ static INT_PTR BuildSubGroupMenu(WPARAM wParam,LPARAM lParam) hMenu = CreatePopupMenu();
//hMenu = wParam;
tick = GetTickCount();
-
+
NotifyEventHooks(hPreBuildSubGroupMenuEvent,wParam,0);
CallService(MO_BUILDMENU,(WPARAM)hMenu,(LPARAM)¶m);
@@ -427,11 +429,11 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam,LPARAM lParam) CLISTMENUITEM *mi = (CLISTMENUITEM*)lParam;
if ( !pcli->pfnConvertMenu(mi, &tmi))
return 0;
-
+
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)mir_calloc(sizeof(SubGroupMenuExecParam));
if ( mmep == NULL)
return 0;
-
+
//we need just one parametr.
mmep->szServiceName = mir_strdup(mi->pszService);
mmep->Param1 = mi->popupPosition;
@@ -473,13 +475,13 @@ INT_PTR SubGroupMenuonAddService(WPARAM wParam,LPARAM lParam) INT_PTR SubGroupMenuExecService(WPARAM wParam,LPARAM lParam)
{
if (wParam != 0) {
- lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
+ lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
if ( !strcmp(mmep->szServiceName,"Help/AboutCommand")) {
//bug in help.c,it used wparam as parent window handle without reason.
mmep->Param1 = 0;
- CallService(mmep->szServiceName,mmep->Param1,lParam);
+ CallService(mmep->szServiceName,mmep->Param1,lParam);
}
- else CallService(mmep->szServiceName,mmep->Param1,mmep->Param2);
+ else CallService(mmep->szServiceName,mmep->Param1,mmep->Param2);
}
return 1;
@@ -516,19 +518,19 @@ void InitSubGroupMenus(void) HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU,OnBuildSubGroupMenu);
//SubGroup menu
- hSubGroupMenuObject = MO_CreateMenuObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
+ hSubGroupMenuObject = MO_CreateMenuObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_USERDEFINEDITEMS, TRUE);
MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuonAddService");
//add exit command to menu
GroupMenuParam gmp;
-
+
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 1000;
mi.hIcon = ImageList_GetIcon(hCListImages,NewGroupIconidx,0);
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&New SubGroup");
+ mi.pszName = LPGEN("&New SubGroup");
gmp.lParam = 0;gmp.wParam = POPUP_NEWSUBGROUP;
hNewSubGroupMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
@@ -537,7 +539,7 @@ void InitSubGroupMenus(void) mi.position = 1001;
mi.hIcon = NULL;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Hide Offline Users in here");
+ mi.pszName = LPGEN("&Hide Offline Users in here");
gmp.lParam = 0;gmp.wParam = POPUP_GROUPHIDEOFFLINE;
hHideOfflineUsersHereMenuItem = (HGENMENU)AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
@@ -546,16 +548,16 @@ void InitSubGroupMenus(void) mi.position = 900001;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_RENAME); //LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_RENAME));
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Rename Group");
+ mi.pszName = LPGEN("&Rename Group");
gmp.lParam = 0;gmp.wParam = POPUP_RENAMEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
-
+
memset(&mi,0,sizeof(mi));
mi.cbSize = sizeof(mi);
mi.position = 900002;
mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_DELETE); //LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_DELETE));
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
- mi.pszName = LPGEN("&Delete Group");
+ mi.pszName = LPGEN("&Delete Group");
gmp.lParam = 0;gmp.wParam = POPUP_DELETEGROUP;
AddSubGroupMenuItem((WPARAM)&gmp,(LPARAM)&mi);
}
diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp index 220ed4be88..52581b9f03 100644 --- a/plugins/Clist_mw/src/init.cpp +++ b/plugins/Clist_mw/src/init.cpp @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2004 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-04 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
diff --git a/plugins/Clist_mw/src/keyboard.cpp b/plugins/Clist_mw/src/keyboard.cpp index 140067eff5..58c406056d 100644 --- a/plugins/Clist_mw/src/keyboard.cpp +++ b/plugins/Clist_mw/src/keyboard.cpp @@ -1,8 +1,9 @@ /*
-Miranda IM: the free IM client for Microsoft* Windows*
+Miranda NG: the free IM client for Microsoft* Windows*
-Copyright 2000-2003 Miranda ICQ/IM project,
+Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org),
+Copyright (c) 2000-03 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -20,6 +21,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
#include "commonheaders.h"
#include <m_hotkeys.h>
diff --git a/plugins/Clist_mw/src/stdafx.cpp b/plugins/Clist_mw/src/stdafx.cpp index e7e41dae3c..0edf9e36e6 100644 --- a/plugins/Clist_mw/src/stdafx.cpp +++ b/plugins/Clist_mw/src/stdafx.cpp @@ -1,5 +1,5 @@ /*
-Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org)
+Copyright (C) 2012-14 Miranda NG project (http://miranda-ng.org)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
|