diff options
Diffstat (limited to 'plugins/Sessions/Src')
-rw-r--r-- | plugins/Sessions/Src/Main.cpp | 24 | ||||
-rw-r--r-- | plugins/Sessions/Src/Options.cpp | 20 | ||||
-rw-r--r-- | plugins/Sessions/Src/Utils.cpp | 34 |
3 files changed, 39 insertions, 39 deletions
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 47ec1b98bb..4f0e230704 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -252,7 +252,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar DestroyWindow(hdlg);
g_hSDlg=0;
}
- else if(!SaveUserSessionName(szUserSessionName))
+ else if (!SaveUserSessionName(szUserSessionName))
{
SaveSessionHandles(0,1);
@@ -297,7 +297,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar {
ses_count=0;
TranslateDialogDefault(hdlg);
- if((ses_count=LoadSessionToCombobox(hdlg,0,ses_limit,"SessionDate",0))==ses_limit)
+ if ((ses_count=LoadSessionToCombobox(hdlg,0,ses_limit,"SessionDate",0))==ses_limit)
EnableWindow(GetDlgItem(hdlg,IDC_SESSDEL),TRUE);
if(LoadSessionToCombobox(hdlg,0,255,"UserSessionDsc",ses_limit)==0 && ses_count!=0)
@@ -371,7 +371,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar EnableWindow(GetDlgItem(hdlg,IDC_SESSDEL),FALSE);
SendDlgItemMessage(hdlg, IDC_LIST, CB_RESETCONTENT, 0, 0);
- if((ses_count=LoadSessionToCombobox(hdlg,1,ses_limit,"SessionDate",0))==ses_limit)
+ if ((ses_count=LoadSessionToCombobox(hdlg,1,ses_limit,"SessionDate",0))==ses_limit)
EnableWindow(GetDlgItem(hdlg,IDC_SESSDEL),TRUE);
if(LoadSessionToCombobox(hdlg,1,255,"UserSessionDsc",ses_limit)==0 && ses_count!=0)
@@ -387,7 +387,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar EnableWindow(GetDlgItem(hdlg,IDC_SESSDEL),FALSE);
SendDlgItemMessage(hdlg, IDC_LIST, CB_RESETCONTENT, 0, 0);
- if((ses_count=LoadSessionToCombobox(hdlg,0,ses_limit,"SessionDate",0))==ses_limit)
+ if ((ses_count=LoadSessionToCombobox(hdlg,0,ses_limit,"SessionDate",0))==ses_limit)
EnableWindow(GetDlgItem(hdlg,IDC_SESSDEL),TRUE);
if(LoadSessionToCombobox(hdlg,0,255,"UserSessionDsc",ses_limit)==0 && ses_count!=0)
@@ -402,7 +402,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar DeleteAutoSession(ses_count);
EnableWindow(GetDlgItem(hdlg,IDC_SESSDEL),FALSE);
SendDlgItemMessage(hdlg, IDC_LIST, CB_RESETCONTENT, 0, 0);
- if((ses_count=LoadSessionToCombobox(hdlg,0,ses_limit,"SessionDate",0))==ses_limit)
+ if ((ses_count=LoadSessionToCombobox(hdlg,0,ses_limit,"SessionDate",0))==ses_limit)
EnableWindow(GetDlgItem(hdlg,IDC_SESSDEL),TRUE);
if(LoadSessionToCombobox(hdlg,0,255,"UserSessionDsc",ses_limit)==0 && ses_count!=0)
@@ -420,7 +420,7 @@ INT_PTR CALLBACK LoadSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar case IDOK:
{
- if(!LoadSession(0,ses_count))
+ if (!LoadSession(0,ses_count))
{
SavePosition(hdlg, "LoadDlg");
DestroyWindow(hdlg);
@@ -586,7 +586,7 @@ int SaveUserSessionName(TCHAR *szUSessionName) {
szUserSessionName = mir_tstrdup(szUSessionName);
mir_snprintf(szUserSessionNameBuf, SIZEOF(szUserSessionNameBuf), "%s_%u", "UserSessionDsc", 0);
- if(!DBGetContactSettingTString(NULL, __INTERNAL_NAME, szUserSessionNameBuf, &dbv))
+ if (!DBGetContactSettingTString(NULL, __INTERNAL_NAME, szUserSessionNameBuf, &dbv))
{
szUserSessionNameBuf_1 = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
@@ -646,7 +646,7 @@ int LoadSession(WPARAM wparam,LPARAM lparam) CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)session_list_t[i], 0);
else if(g_bWarnOnHidden)
{
- if(!CheckContactVisibility((HANDLE)session_list_t[i]))
+ if (!CheckContactVisibility((HANDLE)session_list_t[i]))
{
hidden[j]=i+1;
j++;
@@ -664,13 +664,13 @@ int LoadSession(WPARAM wparam,LPARAM lparam) }
else if(dup==i)
{
- if(!hidden)
+ if (!hidden)
{
if(g_bOtherWarnings)
MessageBox(NULL, TranslateT("This Session already opened"), TranslateT("Sessions Manager"), MB_OK|MB_ICONWARNING);
return 1;
}
- else if(!g_bWarnOnHidden&&g_bOtherWarnings)
+ else if (!g_bWarnOnHidden&&g_bOtherWarnings)
{
MessageBox(NULL, TranslateT("This Session already opened"), TranslateT("Sessions Manager"), MB_OK|MB_ICONWARNING);
return 1;
@@ -847,7 +847,7 @@ static int GetContactHandle(WPARAM wparam,LPARAM lParam) }
else if(MWeventdata->uType == MSG_WINDOW_EVT_CLOSE)
{
- if(!DONT) DelFromCurSession((DWORD)MWeventdata->hContact,0);
+ if (!DONT) DelFromCurSession((DWORD)MWeventdata->hContact,0);
if(g_bCrashRecovery) DBWriteContactSettingByte(MWeventdata->hContact, __INTERNAL_NAME, "wasInLastSession", 0);
}
@@ -906,7 +906,7 @@ static int PluginInit(WPARAM wparam,LPARAM lparam) session_list_recovered[i++]=(DWORD)hContact;
}
}
- if(!session_list_recovered[0]) g_bIncompletedSave=FALSE;
+ if (!session_list_recovered[0]) g_bIncompletedSave=FALSE;
DBWriteContactSettingByte(NULL, __INTERNAL_NAME, "lastSaveCompleted", 0);
if (!DBGetContactSettingByte(NULL, __INTERNAL_NAME, "lastempty", 1)||g_bIncompletedSave) isLastTRUE=TRUE;
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp index 3998f2de2c..b52e2d92d7 100644 --- a/plugins/Sessions/Src/Options.cpp +++ b/plugins/Sessions/Src/Options.cpp @@ -80,18 +80,18 @@ static LRESULT CALLBACK ComboBoxSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, return TRUE;
case EM_SETSEL:
- if(!hOpClistControl)
+ if (!hOpClistControl)
return HideCaret(hwnd);
break;
case WM_GETDLGCODE:
- if(!hOpClistControl)
+ if (!hOpClistControl)
return DLGC_WANTARROWS;
break;
case WM_SETCURSOR:
{
- if(!hOpClistControl)
+ if (!hOpClistControl)
{
SetCursor(LoadCursor(NULL, IDC_ARROW));
return TRUE;
@@ -111,7 +111,7 @@ static LRESULT CALLBACK ComboBoxSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, case WM_NCLBUTTONDBLCLK:
case WM_NCLBUTTONDOWN:
- if(!bChecked)
+ if (!bChecked)
{
MarkUserDefSession(opses_count,1);
hIcon=hMarked;
@@ -238,7 +238,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) {
EnableWindow(GetDlgItem(hdlg,IDC_EDIT),TRUE);
SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, (WPARAM)0, 0);
- if(!OpLoadSessionContacts(0,opses_count))
+ if (!OpLoadSessionContacts(0,opses_count))
EnableWindow(GetDlgItem(hdlg,IDC_DEL),FALSE);
}
@@ -280,7 +280,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) if(IsDlgButtonChecked(hdlg, IDC_STARTDIALOG))
{
- if(!IsDlgButtonChecked(hdlg, IDC_CHECKLAST))
+ if (!IsDlgButtonChecked(hdlg, IDC_CHECKLAST))
DBWriteContactSettingByte(NULL, __INTERNAL_NAME, "StartupMode", 1);
else DBWriteContactSettingByte(NULL, __INTERNAL_NAME, "StartupMode", 3);
}
@@ -345,7 +345,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) RedrawWindow(hComboBoxEdit, NULL, NULL, RDW_INVALIDATE|RDW_NOCHILDREN|RDW_UPDATENOW|RDW_FRAME);
}
OpLoadSessionContacts(0,opses_count);
- if(!hOpClistControl)
+ if (!hOpClistControl)
EnableWindow(GetDlgItem(hdlg,IDC_DEL),TRUE);
else
{
@@ -368,7 +368,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) case IDC_EDIT:
{
- if(!hOpClistControl)
+ if (!hOpClistControl)
{
int i;
HANDLE hItem;
@@ -455,7 +455,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) {
EnableWindow(GetDlgItem(hdlg,IDC_EDIT),TRUE);
SendDlgItemMessage(hdlg, IDC_LIST, CB_SETCURSEL, (WPARAM)0, 0);
- if(!OpLoadSessionContacts(0,opses_count))
+ if (!OpLoadSessionContacts(0,opses_count))
EnableWindow(GetDlgItem(hdlg,IDC_DEL),FALSE);
}
else
@@ -528,7 +528,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) HideCaret(hComboBoxEdit);
}
- if((HIWORD(wparam)!=CBN_DROPDOWN)&&(LOWORD(wparam)==IDC_LIST)&&!hOpClistControl)
+ if ((HIWORD(wparam)!=CBN_DROPDOWN)&&(LOWORD(wparam)==IDC_LIST)&&!hOpClistControl)
{
SendMessage(hComboBoxEdit,EM_SCROLLCARET ,0,0);
HideCaret(hComboBoxEdit);
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp index 4b5ba065a0..a4859e7874 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, __INTERNAL_NAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
{
temp_1[0]=dbv.pszVal[0];
for (i=0;i<ses_limit;i++)
@@ -50,7 +50,7 @@ void AddSessionMark(HANDLE hContact,int mode,char bit) if (mode==1)
{
DBVARIANT dbv;
- if(!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
{
if(strlen(dbv.pszVal)<g_ses_count)
{
@@ -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, __INTERNAL_NAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
{
for (i=marknum;i<ses_limit;i++)
dbv.pszVal[i]=dbv.pszVal[i+1];
@@ -103,7 +103,7 @@ void RemoveSessionMark(HANDLE hContact,int mode,int marknum) if (mode==1)
{
DBVARIANT dbv;
- if(!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
{
for (i=marknum;i<ses_limit;i++)
dbv.pszVal[i]=dbv.pszVal[i+1];
@@ -121,7 +121,7 @@ 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, __INTERNAL_NAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
{
dbv.pszVal[marknum]=bit;
DBWriteContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", dbv.pszVal);
@@ -133,7 +133,7 @@ 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, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
{
pszBuffer = mir_strdup(dbv.pszVal);
pszBuffer[marknum]=bit;
@@ -149,7 +149,7 @@ BOOL LoadContactsFromMask(HANDLE hContact,int mode,int count) if(mode==0)
{
DBVARIANT dbv;
- if(!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsMarks", &dbv) && dbv.pszVal)
{
if (dbv.pszVal[count]=='1')
{
@@ -164,7 +164,7 @@ BOOL LoadContactsFromMask(HANDLE hContact,int mode,int count) if (mode==1)
{
DBVARIANT dbv;
- if(!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "UserSessionsMarks", &dbv) && dbv.pszVal)
{
if (dbv.pszVal[count]=='1')
{
@@ -194,12 +194,12 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode) if(mode==0)
{
DBVARIANT dbv;
- if(!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", &dbv) && dbv.pszVal)
+ if (!DBGetContactSettingString(hContact, __INTERNAL_NAME, "LastSessionsOrder", &dbv) && dbv.pszVal)
{
char* temp=NULL;
char* temp2=NULL;
int len= (int)strlen(dbv.pszVal);
- if(!len)
+ if (!len)
len=20;
temp2 = (char*)mir_alloc(len-1);
@@ -239,7 +239,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, __INTERNAL_NAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
{
char* temp=NULL;
char* temp2=NULL;
@@ -254,7 +254,7 @@ void AddInSessionOrder(HANDLE hContact,int mode,int ordernum,int writemode) {
pszBuffer = mir_strdup(dbv.pszVal);
}
- if(!(advlen=len= (int)strlen(pszBuffer)))
+ if (!(advlen=len= (int)strlen(pszBuffer)))
advlen=len=20;
else
advlen=len+2;
@@ -287,7 +287,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, __INTERNAL_NAME, "LastSessionsOrder", &dbv) && dbv.pszVal)
{
szTemp[0]=dbv.pszVal[count*2];
szTemp[1]=dbv.pszVal[count*2+1];
@@ -298,7 +298,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, __INTERNAL_NAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
{
szTemp[0]=dbv.pszVal[count*2];
szTemp[1]=dbv.pszVal[count*2+1];
@@ -322,7 +322,7 @@ 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, __INTERNAL_NAME, "LastSessionsOrder", &dbv) && dbv.pszVal)
{
dbv.pszVal[count*2]=szTemp[0];
dbv.pszVal[count*2+1]=szTemp[1];
@@ -334,7 +334,7 @@ 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, __INTERNAL_NAME, "UserSessionsOrder", &dbv) && dbv.pszVal)
{
dbv.pszVal[count*2]=szTemp[0];
dbv.pszVal[count*2+1]=szTemp[1];
@@ -442,7 +442,7 @@ int LoadSessionToCombobox (HWND hdlg,BOOL mode,int iLimit,char* pszSetting,int i pszBuffer = DBGetStringT(NULL, __INTERNAL_NAME, szBuffer);
if (pszBuffer)
{
- if(!IsMarkedUserDefSession(i+iFirstNum)||mode==1)
+ if (!IsMarkedUserDefSession(i+iFirstNum)||mode==1)
{
index = SendDlgItemMessage(hdlg, IDC_LIST, CB_ADDSTRING, 0, (LPARAM)pszBuffer);
SendDlgItemMessage(hdlg, IDC_LIST, CB_SETITEMDATA, (WPARAM)index, (LPARAM) (DWORD)i+iFirstNum);
|