diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/Sessions | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Sessions')
-rw-r--r-- | plugins/Sessions/Src/Main.cpp | 20 | ||||
-rw-r--r-- | plugins/Sessions/Src/Options.cpp | 12 | ||||
-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 | 22 |
5 files changed, 41 insertions, 41 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 6e50caec00..41598e615b 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;
-HCONTACT session_list[255] = { 0 };
-HCONTACT user_session_list[255] = { 0 };
-HCONTACT session_list_recovered[255];
+MCONTACT session_list[255] = { 0 };
+MCONTACT user_session_list[255] = { 0 };
+MCONTACT 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 (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT 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;
@@ -468,7 +468,7 @@ int SaveSessionHandles(WPARAM wparam,LPARAM lparam) return 1;
int k=0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT 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'};
- HCONTACT hContact;
- HCONTACT session_list_t[255] = { 0 };
+ MCONTACT hContact;
+ MCONTACT 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;
- HCONTACT hContact;
+ MCONTACT 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;
- HCONTACT hContact;
+ MCONTACT hContact;
char szSessionName[256]={0};
TCHAR *szSessionNameBuf=NULL;
@@ -964,7 +964,7 @@ extern "C" __declspec(dllexport) int Load(void) int i=0;
ZeroMemory(session_list_recovered, sizeof(session_list_recovered));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT 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 9a6853f29d..943a92ed6a 100644 --- a/plugins/Sessions/Src/Options.cpp +++ b/plugins/Sessions/Src/Options.cpp @@ -31,7 +31,7 @@ static BOOL bOptionsInit; int opses_count;
BOOL bSesssionNameChanged=0;
-HCONTACT session_list_t[255]={0};
+MCONTACT session_list_t[255]={0};
HWND g_opHdlg;
@@ -46,7 +46,7 @@ int OpLoadSessionContacts(WPARAM wparam,LPARAM lparam) {
ZeroMemory(session_list_t, sizeof(session_list_t));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT 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;
- HCONTACT hContact = db_find_first();
+ MCONTACT 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 (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT 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++) {
- HCONTACT hContact = (HCONTACT)SendMessage(hOpClistControl, CLM_FINDCONTACT, (WPARAM)session_list_t[i], 0);
+ MCONTACT hContact = (MCONTACT)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 (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT 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 727918e007..5cbfd65a4b 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 HCONTACT session_list_recovered[255];
-extern HCONTACT session_list[255];
+extern MCONTACT session_list_recovered[255];
+extern MCONTACT 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 0ac06a0e1c..fd84a86f8b 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(HCONTACT hContact, int mode, char bit)
+void AddSessionMark(MCONTACT hContact, int mode, char bit)
{
DBVARIANT dbv;
unsigned int i;
@@ -70,7 +70,7 @@ void AddSessionMark(HCONTACT hContact, int mode, char bit) }
}
-void RemoveSessionMark(HCONTACT hContact,int mode,int marknum)
+void RemoveSessionMark(MCONTACT hContact,int mode,int marknum)
{
unsigned int i=1;
char temp_1[1]={'\0'},temp_2[1]={'\0'};
@@ -100,7 +100,7 @@ void RemoveSessionMark(HCONTACT hContact,int mode,int marknum) }
}
-void SetSessionMark(HCONTACT hContact,int mode,char bit,unsigned int marknum)
+void SetSessionMark(MCONTACT hContact,int mode,char bit,unsigned int marknum)
{
DBVARIANT dbv;
char* pszBuffer=NULL;
@@ -124,7 +124,7 @@ void SetSessionMark(HCONTACT hContact,int mode,char bit,unsigned int marknum) }
}
-BOOL LoadContactsFromMask(HCONTACT hContact,int mode,int count)
+BOOL LoadContactsFromMask(MCONTACT hContact,int mode,int count)
{
DBVARIANT dbv;
if (mode == 0) {
@@ -142,7 +142,7 @@ BOOL LoadContactsFromMask(HCONTACT hContact,int mode,int count) return res;
}
-void AddInSessionOrder(HCONTACT hContact,int mode,int ordernum,int writemode)
+void AddInSessionOrder(MCONTACT hContact,int mode,int ordernum,int writemode)
{
int i;
char temp_1[2]={'\0'},temp_2[2]={'\0'};
@@ -233,7 +233,7 @@ void AddInSessionOrder(HCONTACT hContact,int mode,int ordernum,int writemode) }
}
-int GetInSessionOrder(HCONTACT hContact,int mode,int count)
+int GetInSessionOrder(MCONTACT hContact,int mode,int count)
{
int iOrder = 0;
char szTemp[3]={'\0'};
@@ -258,7 +258,7 @@ int GetInSessionOrder(HCONTACT hContact,int mode,int count) return iOrder;
}
-void SetInSessionOrder(HCONTACT hContact,int mode,int count,unsigned int ordernum)
+void SetInSessionOrder(MCONTACT hContact,int mode,int count,unsigned int ordernum)
{
int iOrder=0;
char szTemp[3]={'\0'};
@@ -319,7 +319,7 @@ BOOL ResaveSettings(char* szName,int iFirst,int iLimit,TCHAR* szBuffer) return 1;
}
-int AddToCurSession(HCONTACT wparam, LPARAM lparam)
+int AddToCurSession(MCONTACT wparam, LPARAM lparam)
{
if (CheckForDuplicate(session_list, wparam) == -1) {
for (int i = 0;; i++) {
@@ -332,7 +332,7 @@ int AddToCurSession(HCONTACT wparam, LPARAM lparam) return 0;
}
-int DelFromCurSession(HCONTACT wparam,LPARAM lparam)
+int DelFromCurSession(MCONTACT wparam,LPARAM lparam)
{
for (int i=0; session_list[i] != 0; i++) {
if (session_list[i] == wparam) {
@@ -346,10 +346,10 @@ int DelFromCurSession(HCONTACT wparam,LPARAM lparam) return 0;
}
-int CheckForDuplicate(HCONTACT contact_list[], HCONTACT lparam)
+int CheckForDuplicate(MCONTACT contact_list[], MCONTACT lparam)
{
int i=0;
- HCONTACT s_list[255] = {0};
+ MCONTACT s_list[255] = {0};
memcpy(s_list, contact_list, SIZEOF(s_list));
for (i=0;;i++) {
if (s_list[i] == lparam)
@@ -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(HCONTACT hContact)
+int CheckContactVisibility(MCONTACT 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 19d81dad37..72de9d3c54 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(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 hContact, LPARAM lparam);
-int DelFromCurSession(HCONTACT hContact,LPARAM lparam);
-int CheckForDuplicate(HCONTACT contact_list[], HCONTACT lparam);
+void SetInSessionOrder(MCONTACT hContact,int mode,int count,unsigned int ordernum);
+void AddInSessionOrder(MCONTACT hContact,int mode,int ordernum,int writemode);
+int GetInSessionOrder(MCONTACT hContact,int mode,int count);
+void AddSessionMark(MCONTACT hContact,int mode,char bit);
+void RemoveSessionMark(MCONTACT hContact,int mode,int marknum);
+void SetSessionMark(MCONTACT hContact,int mode,char bit,unsigned int marknum);
+BOOL LoadContactsFromMask(MCONTACT hContact,int mode,int count);
+int AddToCurSession(MCONTACT hContact, LPARAM lparam);
+int DelFromCurSession(MCONTACT hContact,LPARAM lparam);
+int CheckForDuplicate(MCONTACT contact_list[], MCONTACT 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(HCONTACT hContact);
+int CheckContactVisibility(MCONTACT hContact);
void RenameUserDefSession(int ses_count,TCHAR* ptszNewName);
int FillFavoritesMenu (HMENU hMenu,int iLimit);
|