summaryrefslogtreecommitdiff
path: root/plugins/Sessions/Src/Utils.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-03-09 11:31:12 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-03-09 11:31:12 +0000
commit3e1d25be1eb2dfa0a6456636e2fcbf368c981243 (patch)
tree2bf90e9fec6dded53c6ba8ee2cdb17d47e42e72f /plugins/Sessions/Src/Utils.cpp
parentc19923ea294b8143471de5c567c62b4e558b2005 (diff)
removed not used headers
git-svn-id: http://svn.miranda-ng.org/main/trunk@3935 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Sessions/Src/Utils.cpp')
-rw-r--r--plugins/Sessions/Src/Utils.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp
index dada08333d..fcd2898b77 100644
--- a/plugins/Sessions/Src/Utils.cpp
+++ b/plugins/Sessions/Src/Utils.cpp
@@ -29,7 +29,7 @@ void AddSessionMark(HANDLE hContact,int mode,char bit)
if(mode==0)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
{
temp_1[0]=dbv.pszVal[0];
for (i=0;i<ses_limit;i++)
@@ -41,16 +41,16 @@ void AddSessionMark(HANDLE hContact,int mode,char bit)
for (i=ses_limit;i<10;i++)
dbv.pszVal[i]='0';
dbv.pszVal[0]=bit;
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", dbv.pszVal);
+ DBWriteContactSettingString(hContact, MODNAME, "LastSessionsMarks", dbv.pszVal);
DBFreeVariant(&dbv);
}
- else if(bit=='1') DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", "10000000000");
+ else if(bit=='1') DBWriteContactSettingString(hContact, MODNAME, "LastSessionsMarks", "10000000000");
}
if (mode==1)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
{
if(strlen(dbv.pszVal)<g_ses_count)
{
@@ -71,12 +71,12 @@ void AddSessionMark(HANDLE hContact,int mode,char bit)
temp_1[0]=temp_2[0];
}
pszBuffer[0]=bit;
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", pszBuffer);
+ DBWriteContactSettingString(hContact, MODNAME, "UserSessionsMarks", pszBuffer);
mir_free(pszBuffer);
}
- else if(bit=='1')DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", "10000000000");
- else DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", "00000000000");
+ else if(bit=='1')DBWriteContactSettingString(hContact, MODNAME, "UserSessionsMarks", "10000000000");
+ else DBWriteContactSettingString(hContact, MODNAME, "UserSessionsMarks", "00000000000");
}
}
@@ -88,7 +88,7 @@ void RemoveSessionMark(HANDLE hContact,int mode,int marknum)
if(mode==0)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
{
for (i=marknum;i<ses_limit;i++)
dbv.pszVal[i]=dbv.pszVal[i+1];
@@ -96,19 +96,19 @@ void RemoveSessionMark(HANDLE hContact,int mode,int marknum)
for (i=ses_limit;i<10;i++)
dbv.pszVal[i]='0';
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", dbv.pszVal);
+ DBWriteContactSettingString(hContact, MODNAME, "LastSessionsMarks", dbv.pszVal);
DBFreeVariant(&dbv);
}
}
if (mode==1)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
{
for (i=marknum;i<ses_limit;i++)
dbv.pszVal[i]=dbv.pszVal[i+1];
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", dbv.pszVal);
+ DBWriteContactSettingString(hContact, MODNAME, "UserSessionsMarks", dbv.pszVal);
DBFreeVariant(&dbv);
}
}
@@ -121,10 +121,10 @@ void SetSessionMark(HANDLE hContact,int mode,char bit,unsigned int marknum)
if(mode==0)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
{
dbv.pszVal[marknum]=bit;
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", dbv.pszVal);
+ DBWriteContactSettingString(hContact, MODNAME, "LastSessionsMarks", dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -133,11 +133,11 @@ void SetSessionMark(HANDLE hContact,int mode,char bit,unsigned int marknum)
if (mode==1)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
{
pszBuffer = mir_strdup(dbv.pszVal);
pszBuffer[marknum]=bit;
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", pszBuffer);
+ DBWriteContactSettingString(hContact, MODNAME, "UserSessionsMarks", pszBuffer);
mir_free(pszBuffer);
DBFreeVariant(&dbv);
}
@@ -148,7 +148,7 @@ BOOL LoadContactsFromMask(HANDLE hContact,int mode,int count)
{
if (mode == 0) {
DBVARIANT dbv;
- if ( DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", &dbv))
+ if ( DBGetContactSettingString(hContact, MODNAME, "LastSessionsMarks", &dbv))
return 0;
BOOL res = dbv.pszVal[count] == '1';
@@ -158,7 +158,7 @@ BOOL LoadContactsFromMask(HANDLE hContact,int mode,int count)
if (mode == 1) {
DBVARIANT dbv;
- if ( DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv))
+ if ( DBGetContactSettingString(hContact, MODNAME, "UserSessionsMarks", &dbv))
return 0;
BOOL res = dbv.pszVal[count] == '1';
@@ -184,7 +184,7 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
if(mode==0)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", &dbv))
+ if (!DBGetContactSettingString(hContact, MODNAME, "LastSessionsOrder", &dbv))
{
char* temp=NULL;
char* temp2=NULL;
@@ -208,7 +208,7 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
for (i=(ses_limit*2);i<20;i++)
temp[i]='0';
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", temp);
+ DBWriteContactSettingString(hContact, MODNAME, "LastSessionsOrder", temp);
mir_free(temp);
mir_free(temp2);
DBFreeVariant(&dbv);
@@ -221,7 +221,7 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
else
mir_snprintf(szFormNumBuf, SIZEOF(szFormNumBuf), "%u%s", ordernum, "000000000000000000");
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", szFormNumBuf);
+ DBWriteContactSettingString(hContact, MODNAME, "LastSessionsOrder", szFormNumBuf);
}
}
@@ -229,7 +229,7 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
{
DBVARIANT dbv;
int advlen=0;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
{
char* temp=NULL;
char* temp2=NULL;
@@ -259,14 +259,14 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode)
DBFreeVariant(&dbv);
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", temp);
+ DBWriteContactSettingString(hContact, MODNAME, "UserSessionsOrder", temp);
mir_free(temp);
mir_free(pszBuffer);
}
else if(writemode==1)
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", szFormNumBuf);
+ DBWriteContactSettingString(hContact, MODNAME, "UserSessionsOrder", szFormNumBuf);
else
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", "00");
+ DBWriteContactSettingString(hContact, MODNAME, "UserSessionsOrder", "00");
}
}
@@ -277,7 +277,7 @@ int GetInSessionOrder(HANDLE hContact,int mode,int count)
if(mode==0)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "LastSessionsOrder", &dbv) && dbv.pszVal)
{
szTemp[0]=dbv.pszVal[count*2];
szTemp[1]=dbv.pszVal[count*2+1];
@@ -288,7 +288,7 @@ int GetInSessionOrder(HANDLE hContact,int mode,int count)
if (mode==1)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
{
szTemp[0]=dbv.pszVal[count*2];
szTemp[1]=dbv.pszVal[count*2+1];
@@ -312,11 +312,11 @@ void SetInSessionOrder(HANDLE hContact,int mode,int count,unsigned int ordernum)
if(mode==0)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "LastSessionsOrder", &dbv) && dbv.pszVal)
{
dbv.pszVal[count*2]=szTemp[0];
dbv.pszVal[count*2+1]=szTemp[1];
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", dbv.pszVal);
+ DBWriteContactSettingString(hContact, MODNAME, "LastSessionsOrder", dbv.pszVal);
DBFreeVariant(&dbv);
}
}
@@ -324,11 +324,11 @@ void SetInSessionOrder(HANDLE hContact,int mode,int count,unsigned int ordernum)
if (mode==1)
{
DBVARIANT dbv;
- if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, MODNAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
{
dbv.pszVal[count*2]=szTemp[0];
dbv.pszVal[count*2+1]=szTemp[1];
- DBWriteContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsOrder", dbv.pszVal);
+ DBWriteContactSettingString(hContact, MODNAME, "UserSessionsOrder", dbv.pszVal);
DBFreeVariant(&dbv);
}
}
@@ -347,8 +347,8 @@ BOOL ResaveSettings(char* szName,int iFirst,int iLimit,TCHAR* szBuffer)
mir_snprintf(szNameBuf, SIZEOF(szNameBuf), "%s_%u", szName, i);
DBVARIANT dbv_temp;
- int res = DBGetContactSettingTString(NULL, __INTERNAL_NAME, szNameBuf, &dbv_temp);
- DBWriteContactSettingTString(NULL, __INTERNAL_NAME, szNameBuf, szBuffer);
+ int res = DBGetContactSettingTString(NULL, MODNAME, szNameBuf, &dbv_temp);
+ DBWriteContactSettingTString(NULL, MODNAME, szNameBuf, szBuffer);
mir_free(szBuffer);
marked = IsMarkedUserDefSession(i);
@@ -430,7 +430,7 @@ int LoadSessionToCombobox (HWND hdlg,BOOL mode,int iLimit,char* pszSetting,int i
for(i=0;i < iLimit; i++)
{
mir_snprintf(szBuffer, SIZEOF(szBuffer), "%s_%u", pszSetting, i);
- pszBuffer = DBGetStringT(NULL, __INTERNAL_NAME, szBuffer);
+ pszBuffer = DBGetStringT(NULL, MODNAME, szBuffer);
if (pszBuffer)
{
if (!IsMarkedUserDefSession(i+iFirstNum)||mode==1)
@@ -467,8 +467,8 @@ int FillFavoritesMenu (HMENU hMenu,int iLimit)
if(IsMarkedUserDefSession(i))
{
mir_snprintf(szBuffer, SIZEOF(szBuffer), "%s_%u", "UserSessionDsc", i);
- pszBuffer = DBGetStringT(NULL, __INTERNAL_NAME, szBuffer);
- if ((pszBuffer = DBGetStringT(NULL, __INTERNAL_NAME, szBuffer)))
+ pszBuffer = DBGetStringT(NULL, MODNAME, szBuffer);
+ if ((pszBuffer = DBGetStringT(NULL, MODNAME, szBuffer)))
{
AppendMenu(hMenu,MF_STRING,i+1,pszBuffer);
iItems++;
@@ -508,14 +508,14 @@ void RenameUserDefSession(int ses_count,TCHAR* ptszNewName)
{
char szSession[256]={0};
mir_snprintf(szSession, SIZEOF(szSession), "%s_%u", "UserSessionDsc", ses_count);
- DBWriteContactSettingTString(NULL, __INTERNAL_NAME, szSession, ptszNewName);
+ DBWriteContactSettingTString(NULL, MODNAME, szSession, ptszNewName);
}
int MarkUserDefSession(int ses_count,BYTE bCheck)
{
char szSessionName[256]={0};
mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u", "FavUserSession", ses_count);
- DBWriteContactSettingByte(NULL, __INTERNAL_NAME, szSessionName, bCheck);
+ DBWriteContactSettingByte(NULL, MODNAME, szSessionName, bCheck);
return 0;
}
@@ -523,7 +523,7 @@ BYTE IsMarkedUserDefSession(int ses_count)
{
char szSessionName[256]={0};
mir_snprintf(szSessionName, SIZEOF(szSessionName), "%s_%u","FavUserSession", ses_count);
- return DBGetContactSettingByte(NULL, __INTERNAL_NAME, szSessionName, 0);
+ return DBGetContactSettingByte(NULL, MODNAME, szSessionName, 0);
}
void SavePosition(HWND hwnd, char *wndName)
@@ -532,9 +532,9 @@ void SavePosition(HWND hwnd, char *wndName)
char buffer[512];
GetWindowRect(hwnd, &rc);
mir_snprintf(buffer, SIZEOF(buffer), "%sPosX", wndName);
- DBWriteContactSettingDword(0, __INTERNAL_NAME, buffer, rc.left);
+ DBWriteContactSettingDword(0, MODNAME, buffer, rc.left);
mir_snprintf(buffer, SIZEOF(buffer), "%sPosY", wndName);
- DBWriteContactSettingDword(0, __INTERNAL_NAME, buffer, rc.top);
+ DBWriteContactSettingDword(0, MODNAME, buffer, rc.top);
}
void LoadPosition(HWND hWnd, char *wndName)
@@ -542,8 +542,8 @@ void LoadPosition(HWND hWnd, char *wndName)
char buffer[512];
int x,y ;
mir_snprintf(buffer, SIZEOF(buffer), "%sPosX", wndName);
- x = DBGetContactSettingDword(0, __INTERNAL_NAME, buffer, ((GetSystemMetrics(SM_CXSCREEN)) / 2)-130);
+ x = DBGetContactSettingDword(0, MODNAME, buffer, ((GetSystemMetrics(SM_CXSCREEN)) / 2)-130);
mir_snprintf(buffer, SIZEOF(buffer), "%sPosY", wndName);
- y = DBGetContactSettingDword(0, __INTERNAL_NAME, buffer, ((GetSystemMetrics(SM_CYSCREEN))/ 2)-80);
+ y = DBGetContactSettingDword(0, MODNAME, buffer, ((GetSystemMetrics(SM_CYSCREEN))/ 2)-80);
SetWindowPos(hWnd, NULL, x, y, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOSIZE);
} \ No newline at end of file