diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /plugins/QuickMessages | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/QuickMessages')
-rw-r--r-- | plugins/QuickMessages/Utils.c | 26 | ||||
-rw-r--r-- | plugins/QuickMessages/main.c | 28 | ||||
-rw-r--r-- | plugins/QuickMessages/options.c | 92 |
3 files changed, 73 insertions, 73 deletions
diff --git a/plugins/QuickMessages/Utils.c b/plugins/QuickMessages/Utils.c index 787d74800b..8adf1a13bd 100644 --- a/plugins/QuickMessages/Utils.c +++ b/plugins/QuickMessages/Utils.c @@ -205,7 +205,7 @@ void CleanSettings(int buttonnum,int from) }
mir_snprintf(szMEntry,255,"EntryName_%u_%u",buttonnum,from);
- while(!DBGetContactSettingTString(NULL, PLGNAME,szMEntry,&dbv)){
+ while(!DBGetContactSettingTString(NULL, PLGNAME,szMEntry,&dbv)) {
DBDeleteContactSetting(NULL, PLGNAME,szMEntry);
mir_snprintf(szMEntry,255,"EntryValue_%u_%u",buttonnum,from);
DBDeleteContactSetting(NULL, PLGNAME,szMEntry);
@@ -274,7 +274,7 @@ void InitButtonsList() {
TCHAR* pszBName=NULL;
ListData* ld=NULL;
- if(!(pszBName=getMenuEntry(i,0,3))){
+ if (!(pszBName=getMenuEntry(i,0,3))) {
g_iButtonsCount=i;
DBWriteContactSettingByte(NULL, PLGNAME,"ButtonsCount", (BYTE)g_iButtonsCount);
break;}
@@ -292,7 +292,7 @@ void InitButtonsList() TCHAR* pszEntry=NULL;
ButtonData *bd=NULL;
- if(!(pszEntry=getMenuEntry(i,j,0)))
+ if (!(pszEntry=getMenuEntry(i,j,0)))
break;
bd=mir_alloc(sizeof(ButtonData));
@@ -415,12 +415,12 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz if(TextSize&&ptszText[TextSize-1]=='\0') TextSize--;
if(ClipSize&&ptszClip[ClipSize-1]=='\0') ClipSize--;
- if(!_tcschr(ptszQValue,varstr))
+ if (!_tcschr(ptszQValue,varstr))
return ptszQValue;
while(ptszQValue[i])
{
- if(ptszQValue[i]=='%'){
+ if(ptszQValue[i]=='%') {
switch(ptszQValue[i+1])
{
case 't':{
@@ -439,7 +439,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ptszQValue[QVSize]='\0';
- if(!_tcschr(ptszQValue,varstr))
+ if (!_tcschr(ptszQValue,varstr))
return ptszQValue;
ptszQValue=tempPointer;
@@ -461,7 +461,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ptszQValue[QVSize]='\0';
- if(!_tcschr(ptszQValue,varstr))
+ if (!_tcschr(ptszQValue,varstr))
return ptszQValue;
ptszQValue=tempPointer;
@@ -493,7 +493,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ptszQValue[QVSize]='\0';
if(ptszName) mir_free(ptszName);
- if(!_tcschr(ptszQValue,varstr))
+ if (!_tcschr(ptszQValue,varstr))
return ptszQValue;
ptszQValue=tempPointer;
@@ -522,7 +522,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ptszQValue[QVSize]='\0';
- if(!_tcschr(ptszQValue,varstr))
+ if (!_tcschr(ptszQValue,varstr))
return ptszQValue;
ptszQValue=tempPointer;
@@ -544,7 +544,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ci.dwFlag =CNF_FIRSTNAME;
#endif
ci.szProto=(char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- if(!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)&&ci.pszVal){
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)&&ci.pszVal){
NameLenght=(int)_tcslen(ci.pszVal);
ptszName=ci.pszVal;
}
@@ -561,7 +561,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ptszQValue[QVSize]='\0';
- if(!_tcschr(ptszQValue,varstr))
+ if (!_tcschr(ptszQValue,varstr))
return ptszQValue;
ptszQValue=tempPointer;
@@ -583,7 +583,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz #else
ci.dwFlag =CNF_LASTNAME;
#endif
- if(!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)&&ci.pszVal){
+ if (!CallService(MS_CONTACT_GETCONTACTINFO,(WPARAM)0,(LPARAM)&ci)&&ci.pszVal){
NameLenght=(int)_tcslen(ci.pszVal);
ptszName=ci.pszVal;
}
@@ -598,7 +598,7 @@ TCHAR* ParseString(HANDLE hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptsz ptszQValue[QVSize]='\0';
- if(!_tcschr(ptszQValue,varstr))
+ if (!_tcschr(ptszQValue,varstr))
return ptszQValue;
ptszQValue=tempPointer;
diff --git a/plugins/QuickMessages/main.c b/plugins/QuickMessages/main.c index ea6016c5c5..30d22df47d 100644 --- a/plugins/QuickMessages/main.c +++ b/plugins/QuickMessages/main.c @@ -102,7 +102,7 @@ static int InputMenuPopup(WPARAM wParam,LPARAM lParam) for(i=0;i<QuickList->realCount;i++)
{
QuickData* qd= (QuickData *)QuickList->items[i];
- if((qd->dwPos+254)==mwpd->selection)
+ if ((qd->dwPos+254)==mwpd->selection)
{
CHARRANGE cr;
UINT textlenght=0;
@@ -111,8 +111,8 @@ static int InputMenuPopup(WPARAM wParam,LPARAM lParam) TCHAR* pszCBText=NULL;
BOOL bIsService=0;
- if(IsClipboardFormatAvailable(CF_TEXT)){
- if (OpenClipboard(mwpd->hwnd)){
+ if(IsClipboardFormatAvailable(CF_TEXT)) {
+ if (OpenClipboard(mwpd->hwnd)) {
HANDLE hData=NULL;
TCHAR* chBuffer=NULL;
int textLength=0;
@@ -140,7 +140,7 @@ static int InputMenuPopup(WPARAM wParam,LPARAM lParam) }
if(qd->ptszValue){
ptszQValue=ParseString(mwpd->hContact,qd->ptszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)_tcslen(qd->ptszValue),textlenght,pszCBText?(int)_tcslen(pszCBText):0);
- if((bIsService=qd->bIsService)&&ptszQValue)
+ if ((bIsService=qd->bIsService)&&ptszQValue)
#ifdef _UNICODE
CallService(mir_u2a(ptszQValue),(WPARAM)mwpd->hContact,0);
#else
@@ -184,14 +184,14 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) if(strcmp(cbcd->pszModule,PLGNAME)) return 0;
- if(!ButtonsList[cbcd->dwButtonId]) return 1;
+ if (!ButtonsList[cbcd->dwButtonId]) return 1;
sl=ButtonsList[cbcd->dwButtonId]->sl;
- if(!sl) return 1;
+ if (!sl) return 1;
- if(IsClipboardFormatAvailable(CF_TEXT)){
- if (OpenClipboard(cbcd->hwndFrom)){
+ if(IsClipboardFormatAvailable(CF_TEXT)) {
+ if (OpenClipboard(cbcd->hwndFrom)) {
HANDLE hData=NULL;
TCHAR* chBuffer=NULL;
int textLength=0;
@@ -214,7 +214,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) qsort(sl->items,sl->realCount,sizeof(ButtonData *),sstSortButtons);
hEdit=GetDlgItem(cbcd->hwndFrom,IDC_MESSAGE);
- if(!hEdit) hEdit=GetDlgItem(cbcd->hwndFrom,IDC_CHATMESSAGE);
+ if (!hEdit) hEdit=GetDlgItem(cbcd->hwndFrom,IDC_CHATMESSAGE);
cr.cpMin = cr.cpMax = 0;
SendMessage(hEdit, EM_EXGETSEL, 0, (LPARAM)&cr);
@@ -240,7 +240,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) case 1:
if(ButtonsList[cbcd->dwButtonId]->ptszQValue)
ptszQValue=ParseString(cbcd->hContact,ButtonsList[cbcd->dwButtonId]->ptszQValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)_tcslen(ButtonsList[cbcd->dwButtonId]->ptszQValue),textlenght,pszCBText?(int)_tcslen(pszCBText):0);
- if((bIsService=ButtonsList[cbcd->dwButtonId]->bIsServName)&&ptszQValue)
+ if ((bIsService=ButtonsList[cbcd->dwButtonId]->bIsServName)&&ptszQValue)
#ifdef _UNICODE
CallService(mir_u2a(ptszQValue),(WPARAM)cbcd->hContact,0);
#else
@@ -253,7 +253,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) bd=(ButtonData *)sl->items[0];
if(bd&&bd->pszValue){
ptszQValue=ParseString(cbcd->hContact,bd->pszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)_tcslen(bd->pszValue),textlenght,pszCBText?(int)_tcslen(pszCBText):0);
- if((bIsService=bd->bIsServName)&&ptszQValue)
+ if ((bIsService=bd->bIsServName)&&ptszQValue)
#ifdef _UNICODE
CallService(mir_u2a(ptszQValue),(WPARAM)cbcd->hContact,0);
#else
@@ -304,7 +304,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) bCTRL=(GetKeyState(VK_CONTROL)&0x8000)?1:0;
if(bd->pszValue){
ptszQValue=ParseString(cbcd->hContact,bd->pszValue,pszText?pszText:_T(""),pszCBText?pszCBText:_T(""),(int)_tcslen(bd->pszValue),textlenght,pszCBText?(int)_tcslen(pszCBText):0);
- if((bIsService=bd->bIsServName)&&ptszQValue)
+ if ((bIsService=bd->bIsServName)&&ptszQValue)
#ifdef _UNICODE
CallService(mir_u2a(ptszQValue),(WPARAM)cbcd->hContact,0);
#else
@@ -316,10 +316,10 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) if(ptszQValue){
- if(!bIsService){
+ if (!bIsService){
SendMessage(hEdit, EM_REPLACESEL, TRUE, (LPARAM)ptszQValue);
- if((g_bLClickAuto&&state!=1)||(g_bRClickAuto&&state==1)||cbcd->flags&BBCF_CONTROLPRESSED||bCTRL)
+ if ((g_bLClickAuto&&state!=1)||(g_bRClickAuto&&state==1)||cbcd->flags&BBCF_CONTROLPRESSED||bCTRL)
SendMessage(cbcd->hwndFrom, WM_COMMAND,IDOK,0);
}
free(ptszQValue);
diff --git a/plugins/QuickMessages/options.c b/plugins/QuickMessages/options.c index ec2a43288c..7e7aeb978e 100644 --- a/plugins/QuickMessages/options.c +++ b/plugins/QuickMessages/options.c @@ -164,7 +164,7 @@ void SetMenuEntryProperties(HWND hdlg) bd->dwOPPos=pos++;
- if(hItem=TreeView_GetChild(hMenuTree, tvi.hItem)){
+ if(hItem=TreeView_GetChild(hMenuTree, tvi.hItem)) {
bd->fEntryOpType&=~QMF_EX_CHILD;
@@ -184,14 +184,14 @@ void SetMenuEntryProperties(HWND hdlg) }}
else
{
- if(!bd->pszOpValue)
+ if (!bd->pszOpValue)
bd->pszOpValue=mir_tstrdup(_T("Enter Value"));
}
if(TreeView_GetParent(hMenuTree, tvi.hItem))
bd->fEntryOpType|=QMF_EX_CHILD;
else bd->fEntryOpType&=~QMF_EX_CHILD;
- if(!(hItem=TreeView_GetNextSibling(hMenuTree, tvi.hItem)))
+ if (!(hItem=TreeView_GetNextSibling(hMenuTree, tvi.hItem)))
tvi.hItem=TreeView_GetNextSibling(hMenuTree, TreeView_GetParent(hMenuTree,tvi.hItem));
else
tvi.hItem=hItem;
@@ -228,7 +228,7 @@ void SaveMenuTree(HWND hdlg) SortedList * sl=NULL;
ListData* ld=ButtonsList[iBl];
- if(!ld->sl) break;
+ if (!ld->sl) break;
sl=ld->sl;
@@ -345,7 +345,7 @@ void RestoreModuleData(HWND hdlg) SortedList * sl=NULL;
ListData* ld=ButtonsList[iBl];
- if(!(sl=ld->sl)) break;
+ if (!(sl=ld->sl)) break;
if(ld->dwOPFlags&QMF_NEW)
{
@@ -425,11 +425,11 @@ static int BuildMenuTree(HWND hToolBarTree,SortedList * sl) hParent=TreeView_InsertItem( hToolBarTree, &tvis );
if(tvis.hParent) TreeView_Expand( hMenuTree, tvis.hParent, TVE_EXPAND );
- if(!bd->pszOpValue&&bd->fEntryOpType==0)
+ if (!bd->pszOpValue&&bd->fEntryOpType==0)
{
tvis.hParent = hParent;
}
-// else if(!(bd->fEntryOpType&QMF_EX_CHILD))
+// else if (!(bd->fEntryOpType&QMF_EX_CHILD))
// tvis.hParent = NULL;
}
@@ -466,9 +466,9 @@ void MoveItem( HTREEITEM hItem, HTREEITEM hInsertAfter, BOOLEAN bAsChild ) //TCHAR strbuf[128];
HTREEITEM hParent, hChild, hNewItem;
- if( !hItem || !hInsertAfter )
+ if ( !hItem || !hInsertAfter )
return;
- if( hItem == hInsertAfter )
+ if ( hItem == hInsertAfter )
return;
switch( ( ULONG_PTR )hInsertAfter ) {
@@ -483,7 +483,7 @@ void MoveItem( HTREEITEM hItem, HTREEITEM hInsertAfter, BOOLEAN bAsChild ) break;
}
// do not move a parent next to its own children!
- if( hItem == hParent )
+ if ( hItem == hParent )
return;
// prepare the insert structure
@@ -498,7 +498,7 @@ void MoveItem( HTREEITEM hItem, HTREEITEM hInsertAfter, BOOLEAN bAsChild ) }
// item should be inserted as the first child of an existing root item
- if( bAsChild ) {
+ if ( bAsChild ) {
tvis.hParent = hInsertAfter;
tvis.hInsertAfter = ( bAsChild == 2 ) ? TVI_LAST : TVI_FIRST ;
}
@@ -508,7 +508,7 @@ void MoveItem( HTREEITEM hItem, HTREEITEM hInsertAfter, BOOLEAN bAsChild ) tvis.hInsertAfter = hInsertAfter;
}
// insert the item
- if( !( hNewItem = TreeView_InsertItem( hMenuTree, &tvis ) ) )
+ if ( !( hNewItem = TreeView_InsertItem( hMenuTree, &tvis ) ) )
return;
// move children
@@ -574,7 +574,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) SetWindowLong(hMenuTree,GWL_STYLE, style);
BuildButtonsList(hButtonsList);
- if(!TreeView_GetCount(hButtonsList)) EnableWindow(GetDlgItem(hdlg,IDC_RCLICKVALUE),FALSE);
+ if (!TreeView_GetCount(hButtonsList)) EnableWindow(GetDlgItem(hdlg,IDC_RCLICKVALUE),FALSE);
oldBNameProc = (WNDPROC) SetWindowLong(GetDlgItem(hdlg,IDC_BUTTONNAME), GWLP_WNDPROC, (LONG) EditSubclassProc);
oldMNameProc = (WNDPROC) SetWindowLong(GetDlgItem(hdlg,IDC_MENUNAME) , GWLP_WNDPROC, (LONG) EditSubclassProc);
@@ -617,34 +617,34 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) break;
- if( hti.flags & TVHT_ABOVE ) {
+ if ( hti.flags & TVHT_ABOVE ) {
htiAfter = TVI_FIRST;
}
else
- if( hti.flags & ( TVHT_NOWHERE|TVHT_BELOW ) ) {
+ if ( hti.flags & ( TVHT_NOWHERE|TVHT_BELOW ) ) {
htiAfter = TVI_LAST;
}
else
- if( hti.flags & ( TVHT_ONITEM|TVHT_ONITEMRIGHT ) ) {
+ if ( hti.flags & ( TVHT_ONITEM|TVHT_ONITEMRIGHT ) ) {
// check where over the item, the pointer is
- if( !TreeView_GetItemRect( hMenuTree, hti.hItem, &rc, FALSE ) ) {
+ if ( !TreeView_GetItemRect( hMenuTree, hti.hItem, &rc, FALSE ) ) {
drag=0;
break;
}
height = ( BYTE )( rc.bottom - rc.top );
- if( hti.pt.y - ( height / 3 ) < rc.top ) {
+ if ( hti.pt.y - ( height / 3 ) < rc.top ) {
HTREEITEM hItem = hti.hItem;
- if( !( hti.hItem = TreeView_GetPrevSibling( hMenuTree, hItem ) ) ) {
- if( !( hti.hItem = TreeView_GetParent(hMenuTree, hItem ) ))
+ if ( !( hti.hItem = TreeView_GetPrevSibling( hMenuTree, hItem ) ) ) {
+ if ( !( hti.hItem = TreeView_GetParent(hMenuTree, hItem ) ))
htiAfter = TVI_FIRST;
else
bAsChild = TRUE;
}
}
else
- if( hti.pt.y + ( height / 3 ) <= rc.bottom ) {
+ if ( hti.pt.y + ( height / 3 ) <= rc.bottom ) {
bAsChild = TRUE;
}
}
@@ -658,7 +658,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) tvi.hItem=hti.hItem;
tvi.mask=TVIF_PARAM |TVIF_HANDLE;
TreeView_GetItem(hMenuTree,&tvi);
- if((bd=(ButtonData*)tvi.lParam)&&(bd->fEntryOpType&QMF_EX_SEPARATOR))
+ if ((bd=(ButtonData*)tvi.lParam)&&(bd->fEntryOpType&QMF_EX_SEPARATOR))
bAsChild = FALSE;
}
@@ -687,19 +687,19 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) ClientToScreen(hdlg,&hti.pt);
ScreenToClient(hMenuTree,&hti.pt);
TreeView_HitTest(hMenuTree,&hti);
- if( hti.flags & ( TVHT_ONITEM|TVHT_ONITEMRIGHT ) ) {
+ if ( hti.flags & ( TVHT_ONITEM|TVHT_ONITEMRIGHT ) ) {
RECT rc;
BYTE height;
- if( TreeView_GetItemRect(hMenuTree, hti.hItem, &rc, FALSE ) ) {
+ if ( TreeView_GetItemRect(hMenuTree, hti.hItem, &rc, FALSE ) ) {
height = ( BYTE )( rc.bottom - rc.top );
- if( hti.pt.y - ( height / 3 ) < rc.top ) {
+ if ( hti.pt.y - ( height / 3 ) < rc.top ) {
SetCursor( LoadCursor( NULL, IDC_ARROW ) );
TreeView_SetInsertMark( hMenuTree, hti.hItem, 0 );
}
else
- if( hti.pt.y + ( height / 3 ) > rc.bottom ) {
+ if ( hti.pt.y + ( height / 3 ) > rc.bottom ) {
SetCursor( LoadCursor( NULL, IDC_ARROW ) );
TreeView_SetInsertMark( hMenuTree, hti.hItem, 1 );
}
@@ -710,8 +710,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) }
}
else {
- if( hti.flags & TVHT_ABOVE ) SendMessage( hMenuTree, WM_VSCROLL, MAKEWPARAM( SB_LINEUP, 0 ), 0 );
- if( hti.flags & TVHT_BELOW ) SendMessage( hMenuTree, WM_VSCROLL, MAKEWPARAM( SB_LINEDOWN, 0 ), 0 );
+ if ( hti.flags & TVHT_ABOVE ) SendMessage( hMenuTree, WM_VSCROLL, MAKEWPARAM( SB_LINEUP, 0 ), 0 );
+ if ( hti.flags & TVHT_BELOW ) SendMessage( hMenuTree, WM_VSCROLL, MAKEWPARAM( SB_LINEDOWN, 0 ), 0 );
TreeView_SetInsertMark( hMenuTree, NULL, 0 );
}
}
@@ -727,7 +727,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) switch(((LPNMHDR)lparam)->idFrom) {
case 0:{
if (((LPNMHDR)lparam)->code == PSN_APPLY ) {
- if(!bNeedRestart){
+ if (!bNeedRestart){
SetMenuEntryProperties(hdlg);
SaveMenuTree(hdlg);
}
@@ -737,7 +737,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) return 1;
}
else if (((LPNMHDR)lparam)->code == PSN_RESET ) {
- if(!bNeedRestart)
+ if (!bNeedRestart)
RestoreModuleData(hdlg);
return 1;
}
@@ -779,9 +779,9 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) GetWindowText(hwndEdit, szLabel, sizeof(szLabel));
hwndEdit=NULL;
- if(!_tcslen(szLabel)) break;
+ if (!_tcslen(szLabel)) break;
if (bd = (ButtonData*)tvi.lParam){
- if(!_tcscmp(szLabel,_T("---"))){
+ if (!_tcscmp(szLabel,_T("---"))) {
if(TreeView_GetChild(hMenuTree,tvi.hItem))
break;
else{
@@ -871,7 +871,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) bd = ( ButtonData* )tvi.lParam;
if (bd) {
- if(!TreeView_GetChild(hMenuTree, tvi.hItem)&&!(bd->fEntryOpType&QMF_EX_SEPARATOR))
+ if (!TreeView_GetChild(hMenuTree, tvi.hItem)&&!(bd->fEntryOpType&QMF_EX_SEPARATOR))
{
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),TRUE);
EnableWindow(GetDlgItem(hdlg,IDC_ISSERVNAME),TRUE);
@@ -882,7 +882,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) {
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_ISSERVNAME),FALSE);
- if(!(bd->fEntryOpType&QMF_EX_SEPARATOR))
+ if (!(bd->fEntryOpType&QMF_EX_SEPARATOR))
EnableWindow(GetDlgItem(hdlg,IDC_INQMENU),FALSE);
SetWindowText(GetDlgItem(hdlg,IDC_MENUVALUE),_T(""));
}
@@ -925,7 +925,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) GetWindowText(hwndEdit, szLabel, sizeof(szLabel));
hwndEdit=NULL;
- if(!_tcslen(szLabel)) break;
+ if (!_tcslen(szLabel)) break;
tvi.pszText=szLabel;
((ListData*)tvi.lParam)->dwOPFlags|=QMF_RENAMED;
@@ -946,7 +946,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) hti=TreeView_GetSelection(hButtonsList);
- if(hti==NULL||!TreeView_GetCount(hButtonsList)){
+ if(hti==NULL||!TreeView_GetCount(hButtonsList)) {
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_ISSERVNAME),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_INQMENU),FALSE);
@@ -968,7 +968,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) EnableWindow(GetDlgItem(hdlg,IDC_ISSERVNAME2),TRUE);
CheckDlgButton(hdlg,IDC_ISSERVNAME2,((ListData*)tvi.lParam)->bIsOpServName);
- if(((ListData*)tvi.lParam)->ptszOPQValue)
+ if (((ListData*)tvi.lParam)->ptszOPQValue)
SetWindowText(GetDlgItem(hdlg,IDC_RCLICKVALUE),((ListData*)tvi.lParam)->ptszOPQValue);
else
SetWindowText(GetDlgItem(hdlg,IDC_RCLICKVALUE),_T(""));
@@ -979,9 +979,9 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) }break;
case WM_COMMAND:{
- switch(LOWORD(wparam)){
+ switch(LOWORD(wparam)) {
case IDC_VARHELP:{
- if(!g_varhelpDlg)
+ if (!g_varhelpDlg)
g_varhelpDlg=CreateDialog(hinstance,MAKEINTRESOURCE(IDD_HELPDIALOG), 0, HelpDlgProc);
else
//ShowWindow(g_varhelpDlg,SW_SHOWDEFAULT);
@@ -1027,7 +1027,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) TVITEM tvi;
ListData* ld;
- if(!(tvi.hItem=TreeView_GetSelection(hButtonsList)))
+ if (!(tvi.hItem=TreeView_GetSelection(hButtonsList)))
break;
tvi.mask=TVIF_HANDLE|TVIF_PARAM;
@@ -1038,7 +1038,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) ld->dwOPFlags|=QMF_DELETNEEDED;
TreeView_DeleteItem(hButtonsList,tvi.hItem);
- if(!TreeView_GetCount(hButtonsList))
+ if (!TreeView_GetCount(hButtonsList))
{
TreeView_DeleteAllItems(hMenuTree);
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),FALSE);
@@ -1058,8 +1058,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) SortedList *sl=NULL;
TCHAR namebuff[MAX_PATH]={'\0'};
- if(!TreeView_GetCount(hButtonsList)) break;
- if(!(tvi.hItem=TreeView_GetSelection(hButtonsList))) break;
+ if (!TreeView_GetCount(hButtonsList)) break;
+ if (!(tvi.hItem=TreeView_GetSelection(hButtonsList))) break;
bd=mir_alloc(sizeof(ButtonData));
memset(bd,0,sizeof(ButtonData));
@@ -1097,7 +1097,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) HTREEITEM hti=NULL;
ButtonData *bd=NULL;
tvi.mask=TVIF_HANDLE|TVIF_PARAM;
- if(!(tvi.hItem=TreeView_GetSelection(hMenuTree)))
+ if (!(tvi.hItem=TreeView_GetSelection(hMenuTree)))
break;
TreeView_GetItem(hMenuTree,&tvi);
hti=tvi.hItem;
@@ -1105,7 +1105,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) bd= (ButtonData*)tvi.lParam;
bd->dwOPFlags|=QMF_DELETNEEDED;
- if(tvi.hItem=TreeView_GetChild(hMenuTree,tvi.hItem)){
+ if(tvi.hItem=TreeView_GetChild(hMenuTree,tvi.hItem)) {
TCHAR strbuf[128];
while(tvi.hItem){
tvis.hInsertAfter=hti;
@@ -1122,7 +1122,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) }
TreeView_DeleteItem(hMenuTree,hti);
- if(!TreeView_GetCount(hMenuTree)){
+ if (!TreeView_GetCount(hMenuTree)) {
EnableWindow(GetDlgItem(hdlg,IDC_MENUVALUE),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_ISSERVNAME),FALSE);
EnableWindow(GetDlgItem(hdlg,IDC_INQMENU),FALSE);
|