diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 |
commit | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch) | |
tree | 5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/Sessions | |
parent | c39340bf493a1745a41317bbf937fc7eb6cbb26a (diff) |
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts
git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Sessions')
-rw-r--r-- | plugins/Sessions/Src/Main.cpp | 28 | ||||
-rw-r--r-- | plugins/Sessions/Src/Options.cpp | 10 | ||||
-rw-r--r-- | plugins/Sessions/Src/Sessions.h | 4 | ||||
-rw-r--r-- | plugins/Sessions/Src/Utils.cpp | 24 | ||||
-rw-r--r-- | plugins/Sessions/Src/Utils.h | 20 |
5 files changed, 43 insertions, 43 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 2180386f89..475e00ad62 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -44,9 +44,9 @@ HWND g_hSDlg; BOOL DONT = FALSE;
BOOL StartUp, isLastTRUE = FALSE, g_mode,bSC = FALSE;
-HANDLE session_list[255] = {0};
-HANDLE user_session_list[255] = {0};
-HANDLE session_list_recovered[255];
+HCONTACT session_list[255] = { 0 };
+HCONTACT user_session_list[255] = { 0 };
+HCONTACT session_list_recovered[255];
int count = 0;
unsigned int ses_count = 0;
@@ -227,7 +227,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar GetWindowText(GetDlgItem(hdlg, IDC_LIST), szUserSessionName, SIZEOF(szUserSessionName));
szUserSessionName[lenght+1]='\0';
if (IsDlgButtonChecked(hdlg,IDC_SELCONTACTS)&&bSC) {
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
BYTE res =(BYTE)SendMessage(hClistControl, CLM_GETCHECKMARK, SendMessage(hClistControl, CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
if (res) {
user_session_list[i] = hContact;
@@ -443,13 +443,13 @@ INT_PTR CloseCurrentSession(WPARAM wparam,LPARAM lparam) while(session_list[0]!=0)
{
mwid.cbSize = sizeof(MessageWindowInputData);
- mwid.hContact=session_list[i];
- mwid.uFlags=MSG_WINDOW_UFLAG_MSG_BOTH;
+ mwid.hContact = session_list[i];
+ mwid.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
mwd.cbSize = sizeof(MessageWindowData);
mwd.hContact = mwid.hContact;
- mwd.uFlags=MSG_WINDOW_UFLAG_MSG_BOTH;
- CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&mwid,(LPARAM)&mwd);
+ mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
+ CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&mwid, (LPARAM)&mwd);
if (g_mode)
{
@@ -468,7 +468,7 @@ int SaveSessionHandles(WPARAM wparam,LPARAM lparam) return 1;
int k=0;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if ((k=CheckForDuplicate(session_list,hContact)) != -1 && !(g_bExclHidden && !CheckContactVisibility(hContact))) {
AddSessionMark(hContact,lparam,'1');
AddInSessionOrder(hContact,lparam,k,1);
@@ -597,8 +597,8 @@ int LoadSession(WPARAM wparam,LPARAM lparam) {
int dup=0;
int hidden[255]={'0'};
- HANDLE hContact;
- HANDLE session_list_t[255]={0};
+ HCONTACT hContact;
+ HCONTACT session_list_t[255] = { 0 };
int mode=0;
int i=0,j=0;
if ((UINT)lparam>=ses_limit&&lparam!=256)
@@ -672,7 +672,7 @@ int LoadSession(WPARAM wparam,LPARAM lparam) int DelUserDefSession(int ses_count)
{
int i=0;
- HANDLE hContact;
+ HCONTACT hContact;
char szSessionName[256]={0};
TCHAR *szSessionNameBuf=NULL;
@@ -713,7 +713,7 @@ int DelUserDefSession(int ses_count) int DeleteAutoSession(int ses_count)
{
int i=0;
- HANDLE hContact;
+ HCONTACT hContact;
char szSessionName[256]={0};
TCHAR *szSessionNameBuf=NULL;
@@ -963,7 +963,7 @@ extern "C" __declspec(dllexport) int Load(void) int i=0;
ZeroMemory(session_list_recovered, sizeof(session_list_recovered));
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (db_get_b(hContact, MODNAME, "wasInLastSession", 0))
session_list_recovered[i++] = hContact;
}
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp index caaae48365..64932b37e7 100644 --- a/plugins/Sessions/Src/Options.cpp +++ b/plugins/Sessions/Src/Options.cpp @@ -46,7 +46,7 @@ int OpLoadSessionContacts(WPARAM wparam,LPARAM lparam) {
ZeroMemory(session_list_t, sizeof(session_list_t));
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (LoadContactsFromMask(hContact,1,lparam)) {
int i = GetInSessionOrder(hContact,1, lparam);
session_list_t[i] = hContact;
@@ -277,7 +277,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) if (((LPNMHDR)lparam)->idFrom == IDC_EMCLIST)
{
int iSelection = (int)((NMCLISTCONTROL *)lparam)->hItem;
- HANDLE hContact = db_find_first();
+ HCONTACT hContact = db_find_first();
for ( ; hContact; hContact = db_find_next(hContact))
if (SendDlgItemMessage(hdlg, IDC_EMCLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection)
break;
@@ -319,11 +319,11 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) if (!hOpClistControl)
EnableWindow(GetDlgItem(hdlg,IDC_DEL),TRUE);
else {
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
SendMessage(hOpClistControl, CLM_SETCHECKMARK, (WPARAM)hContact,0);
for (int i=0 ; session_list_t[i] > 0; i++) {
- HANDLE hContact = (HANDLE)SendMessage(hOpClistControl,CLM_FINDCONTACT, (WPARAM)session_list_t[i], 0);
+ HCONTACT hContact = (HCONTACT)SendMessage(hOpClistControl, CLM_FINDCONTACT, (WPARAM)session_list_t[i], 0);
SendMessage(hOpClistControl, CLM_SETCHECKMARK, (WPARAM)hContact, 1);
}
EnableWindow(GetDlgItem(hdlg,IDC_SAVE),FALSE);
@@ -366,7 +366,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) case IDC_SAVE:
{
int i=0;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
BYTE res =(BYTE)SendMessage(GetDlgItem(hdlg,IDC_EMCLIST), CLM_GETCHECKMARK,
SendMessage(GetDlgItem(hdlg,IDC_EMCLIST), CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
if (res) {
diff --git a/plugins/Sessions/Src/Sessions.h b/plugins/Sessions/Src/Sessions.h index fd9c805235..727918e007 100644 --- a/plugins/Sessions/Src/Sessions.h +++ b/plugins/Sessions/Src/Sessions.h @@ -58,8 +58,8 @@ INT_PTR CloseCurrentSession(WPARAM ,LPARAM ); int SaveSessionDate();
extern HINSTANCE hinstance;
-extern HANDLE session_list_recovered[255];
-extern HANDLE session_list[255];
+extern HCONTACT session_list_recovered[255];
+extern HCONTACT session_list[255];
extern unsigned int ses_limit;
extern unsigned int g_ses_count;
extern BOOL g_bExclHidden;
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp index 480c8d3c0f..dd5315185a 100644 --- a/plugins/Sessions/Src/Utils.cpp +++ b/plugins/Sessions/Src/Utils.cpp @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "sessions.h"
-void AddSessionMark(HANDLE hContact, int mode, char bit)
+void AddSessionMark(HCONTACT hContact, int mode, char bit)
{
DBVARIANT dbv;
unsigned int i;
@@ -70,7 +70,7 @@ void AddSessionMark(HANDLE hContact, int mode, char bit) }
}
-void RemoveSessionMark(HANDLE hContact,int mode,int marknum)
+void RemoveSessionMark(HCONTACT hContact,int mode,int marknum)
{
unsigned int i=1;
char temp_1[1]={'\0'},temp_2[1]={'\0'};
@@ -100,7 +100,7 @@ void RemoveSessionMark(HANDLE hContact,int mode,int marknum) }
}
-void SetSessionMark(HANDLE hContact,int mode,char bit,unsigned int marknum)
+void SetSessionMark(HCONTACT hContact,int mode,char bit,unsigned int marknum)
{
DBVARIANT dbv;
char* pszBuffer=NULL;
@@ -124,7 +124,7 @@ void SetSessionMark(HANDLE hContact,int mode,char bit,unsigned int marknum) }
}
-BOOL LoadContactsFromMask(HANDLE hContact,int mode,int count)
+BOOL LoadContactsFromMask(HCONTACT hContact,int mode,int count)
{
DBVARIANT dbv;
if (mode == 0) {
@@ -142,7 +142,7 @@ BOOL LoadContactsFromMask(HANDLE hContact,int mode,int count) return res;
}
-void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
+void AddInSessionOrder(HCONTACT hContact,int mode,int ordernum,int writemode)
{
int i;
char temp_1[2]={'\0'},temp_2[2]={'\0'};
@@ -233,7 +233,7 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode) }
}
-int GetInSessionOrder(HANDLE hContact,int mode,int count)
+int GetInSessionOrder(HCONTACT hContact,int mode,int count)
{
int iOrder = 0;
char szTemp[3]={'\0'};
@@ -258,7 +258,7 @@ int GetInSessionOrder(HANDLE hContact,int mode,int count) return iOrder;
}
-void SetInSessionOrder(HANDLE hContact,int mode,int count,unsigned int ordernum)
+void SetInSessionOrder(HCONTACT hContact,int mode,int count,unsigned int ordernum)
{
int iOrder=0;
char szTemp[3]={'\0'};
@@ -319,10 +319,10 @@ BOOL ResaveSettings(char* szName,int iFirst,int iLimit,TCHAR* szBuffer) return 1;
}
-int AddToCurSession (HANDLE wparam,LPARAM lparam)
+int AddToCurSession(HCONTACT wparam, LPARAM lparam)
{
- if (CheckForDuplicate(session_list,wparam) == -1) {
- for (int i=0;;i++) {
+ if (CheckForDuplicate(session_list, wparam) == -1) {
+ for (int i = 0;; i++) {
if (session_list[i] == 0) {
session_list[i] = wparam;
break;
@@ -346,7 +346,7 @@ int DelFromCurSession(HANDLE wparam,LPARAM lparam) return 0;
}
-int CheckForDuplicate(HANDLE contact_list[], HANDLE lparam)
+int CheckForDuplicate(HCONTACT contact_list[], HANDLE lparam)
{
int i=0;
HANDLE s_list[255] = {0};
@@ -425,7 +425,7 @@ void OffsetWindow(HWND parent, HWND hwnd, int dx, int dy) SetWindowPos(hwnd, NULL, rc.left, rc.top,0, 0, SWP_NOZORDER |SWP_NOSIZE);
}
-int CheckContactVisibility(HANDLE hContact)
+int CheckContactVisibility(HCONTACT hContact)
{
if (db_get_b(hContact, "CList", "Hidden", 0))
return 0;
diff --git a/plugins/Sessions/Src/Utils.h b/plugins/Sessions/Src/Utils.h index 3e5aaaa002..174ef38afc 100644 --- a/plugins/Sessions/Src/Utils.h +++ b/plugins/Sessions/Src/Utils.h @@ -20,16 +20,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef __UTILS_H__
# define __UTILS_H__
-void SetInSessionOrder(HANDLE hContact,int mode,int count,unsigned int ordernum);
-void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode);
-int GetInSessionOrder(HANDLE hContact,int mode,int count);
-void AddSessionMark(HANDLE hContact,int mode,char bit);
-void RemoveSessionMark(HANDLE hContact,int mode,int marknum);
-void SetSessionMark(HANDLE hContact,int mode,char bit,unsigned int marknum);
-BOOL LoadContactsFromMask(HANDLE hContact,int mode,int count);
-int AddToCurSession (HANDLE wparam,LPARAM lparam);
+void SetInSessionOrder(HCONTACT hContact,int mode,int count,unsigned int ordernum);
+void AddInSessionOrder(HCONTACT hContact,int mode,int ordernum,int writemode);
+int GetInSessionOrder(HCONTACT hContact,int mode,int count);
+void AddSessionMark(HCONTACT hContact,int mode,char bit);
+void RemoveSessionMark(HCONTACT hContact,int mode,int marknum);
+void SetSessionMark(HCONTACT hContact,int mode,char bit,unsigned int marknum);
+BOOL LoadContactsFromMask(HCONTACT hContact,int mode,int count);
+int AddToCurSession(HCONTACT wparam, LPARAM lparam);
int DelFromCurSession(HANDLE wparam,LPARAM lparam);
-int CheckForDuplicate(HANDLE contact_list[],HANDLE lparam);
+int CheckForDuplicate(HCONTACT contact_list[], HANDLE lparam);
BOOL ResaveSettings(char* szName,int iFirst,int iLimit,TCHAR* pszPrevSetting);
void OffsetWindow(HWND parent, HWND hwnd, int dx, int dy);
int LoadSessionToCombobox (HWND hdlg,BOOL mode,int iLimit,char* pszSetting,int iFirstNum);
@@ -37,7 +37,7 @@ int MarkUserDefSession(int ses_count,BYTE bCheck); BYTE IsMarkedUserDefSession(int ses_count);
void SavePosition(HWND hWnd, char *wndName);
void LoadPosition(HWND hWnd, char *wndName);
-int CheckContactVisibility(HANDLE hContact);
+int CheckContactVisibility(HCONTACT hContact);
void RenameUserDefSession(int ses_count,TCHAR* ptszNewName);
int FillFavoritesMenu (HMENU hMenu,int iLimit);
|