diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-20 17:00:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-20 17:00:14 +0000 |
commit | 30ab6ceb71842f003f649b3d62b89af010cf40d1 (patch) | |
tree | b1dae7a6d545cdf622a165ba4c576d3a41d71221 /plugins | |
parent | 65461e7b4edb683cc09086fdaf49e0c2ef918bd4 (diff) |
- direct call of MS_SKIN_ADDNEWSOUND replaced with Skin_AddSound() call;
- obsolete structure SKINSOUNDDESC removed
- dynamically translated hot keys;
- checked correct LPGEN'ing of the sounds creation;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@500 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
204 files changed, 1064 insertions, 1064 deletions
diff --git a/plugins/AVS/acc.cpp b/plugins/AVS/acc.cpp index 5b6a08db3c..507245fca8 100644 --- a/plugins/AVS/acc.cpp +++ b/plugins/AVS/acc.cpp @@ -288,7 +288,7 @@ void AnimatedGifMountFrame(ACCData* data, int page) RGBQUAD *pal = fei->FI_GetPalette(dib);
bool have_transparent = false;
int transparent_color = -1;
- if ( fei->FI_IsTransparent(dib) ) {
+ if ( fei->FI_IsTransparent(dib)) {
int count = fei->FI_GetTransparencyCount(dib);
BYTE *table = fei->FI_GetTransparencyTable(dib);
for ( int i = 0; i < count; i++ ) {
diff --git a/plugins/AVS/commonheaders.h b/plugins/AVS/commonheaders.h index 70b0c88fae..5b9d4ee113 100644 --- a/plugins/AVS/commonheaders.h +++ b/plugins/AVS/commonheaders.h @@ -109,7 +109,7 @@ extern OBJLIST<protoPicCacheEntry> g_ProtoPictures, g_MyAvatars; int SetAvatarAttribute(HANDLE hContact, DWORD attrib, int mode);
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define GAIR_FAILED 1000
diff --git a/plugins/AVS/image_utils.cpp b/plugins/AVS/image_utils.cpp index 3a7c43a707..35cb33259a 100644 --- a/plugins/AVS/image_utils.cpp +++ b/plugins/AVS/image_utils.cpp @@ -18,7 +18,7 @@ extern int _DebugTrace(const char *fmt, ...); extern int _DebugTrace(HANDLE hContact, const char *fmt, ...);
-#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__) )
+#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
extern FI_INTERFACE *fei;
diff --git a/plugins/Alarms/alarmlist.cpp b/plugins/Alarms/alarmlist.cpp index 9bce8b546b..35ac1fa022 100644 --- a/plugins/Alarms/alarmlist.cpp +++ b/plugins/Alarms/alarmlist.cpp @@ -722,12 +722,13 @@ int IdleChanged(WPARAM wParam, LPARAM lParam) return 0;
}
-void InitList() {
+void InitList()
+{
InitializeCriticalSection(&alarm_cs);
- SkinAddNewSoundEx("Triggered1", Translate("Alarms"), Translate("Alert 1"));
- SkinAddNewSoundEx("Triggered2", Translate("Alarms"), Translate("Alert 2"));
- SkinAddNewSoundEx("Triggered3", Translate("Alarms"), Translate("Alert 3"));
+ SkinAddNewSoundEx("Triggered1", LPGEN("Alarms"), LPGEN("Alert 1"));
+ SkinAddNewSoundEx("Triggered2", LPGEN("Alarms"), LPGEN("Alert 2"));
+ SkinAddNewSoundEx("Triggered3", LPGEN("Alarms"), LPGEN("Alert 3"));
// load last checked time
DBCONTACTGETSETTING dbcgs;
diff --git a/plugins/Alarms/options.cpp b/plugins/Alarms/options.cpp index 685beea35b..654d39032d 100644 --- a/plugins/Alarms/options.cpp +++ b/plugins/Alarms/options.cpp @@ -323,7 +323,7 @@ static INT_PTR CALLBACK DlgProcAddEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_COMMAND:
if ( HIWORD(wParam) == CBN_SELCHANGE ) {
- switch( LOWORD(wParam) ) {
+ switch( LOWORD(wParam)) {
case IDC_DAY:
case IDC_DAYNUM:
hw = GetDlgItem(hwndDlg, IDOK);
diff --git a/plugins/BASS_interface/Main.cpp b/plugins/BASS_interface/Main.cpp index f843a4d3ad..8f7a82ae80 100644 --- a/plugins/BASS_interface/Main.cpp +++ b/plugins/BASS_interface/Main.cpp @@ -72,7 +72,7 @@ static int OnPlaySnd(WPARAM wParam, LPARAM lParam) case ID_STATUS_ONLINE: currstat <<= 1;
}
- if ( !DBGetContactSettingByte(NULL,"Skin","UseSound",0) ) doPlay = FALSE;
+ if ( !DBGetContactSettingByte(NULL,"Skin","UseSound",0)) doPlay = FALSE;
if ( QuietTime )
if (
@@ -80,7 +80,7 @@ static int OnPlaySnd(WPARAM wParam, LPARAM lParam) ((TimeWrd2 < TimeWrd1) && (TimeWrd1 <= currtime || currtime < TimeWrd2))
) doPlay = FALSE;
- if ( !(currstat & StatMask) ) doPlay = FALSE;
+ if ( !(currstat & StatMask)) doPlay = FALSE;
if ( Preview || (int)wParam==1 ) doPlay = TRUE;
diff --git a/plugins/BasicHistory/EventList.cpp b/plugins/BasicHistory/EventList.cpp index 45d6735883..8ac9e2eb37 100644 --- a/plugins/BasicHistory/EventList.cpp +++ b/plugins/BasicHistory/EventList.cpp @@ -787,7 +787,7 @@ bool EventList::GetEventData(const EventIndex& ev, EventData& data) void EventList::GetExtEventDBei(const EventIndex& ev)
{
IImport::ExternalMessage& em = importedMessages[ev.exIdx];
- gdbei.flags = (em.flags & (~(DBEF_FIRST)) ) | 0x800;
+ gdbei.flags = (em.flags & (~(DBEF_FIRST))) | 0x800;
gdbei.eventType = em.eventType;
gdbei.timestamp = em.timestamp;
}
diff --git a/plugins/Boltun/Engine/TalkEngine.cpp b/plugins/Boltun/Engine/TalkEngine.cpp index 378f8be102..550aac66cf 100644 --- a/plugins/Boltun/Engine/TalkEngine.cpp +++ b/plugins/Boltun/Engine/TalkEngine.cpp @@ -402,7 +402,7 @@ bool TalkBot::FindAny(ValueChooser<> &ch, tstring& res) void TalkBot::SplitSectences(const tstring &incomingMessage, vector<tstring>& vec)
{
- //FIXME: (THINK ABOUT IT:-) )these chars not always mark the end of sentence.
+ //FIXME: (THINK ABOUT IT:-))these chars not always mark the end of sentence.
const TCHAR symbols[] = _T(".?!");
int it = 0, len = (int)incomingMessage.length();
while (it != len)
diff --git a/plugins/Boltun/boltun.cpp b/plugins/Boltun/boltun.cpp index 6efebc906f..a4ac93341a 100644 --- a/plugins/Boltun/boltun.cpp +++ b/plugins/Boltun/boltun.cpp @@ -608,11 +608,11 @@ static int MessagePrebuild(WPARAM wParam, LPARAM lParam) ZeroMemory(&clmi, sizeof(clmi));
clmi.cbSize = sizeof(clmi);
clmi.flags = CMIM_FLAGS | CMIM_ICON | (boltunautochat ? CMIF_CHECKED : 0);
- clmi.hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE((boltunautochat ? IDI_TICK : IDI_NOTICK)) );
+ clmi.hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE((boltunautochat ? IDI_TICK : IDI_NOTICK)));
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItemAutoChat, (LPARAM)&clmi);
clmi.flags = CMIM_FLAGS | CMIM_ICON | (boltunnottochat ? CMIF_CHECKED : 0);
- clmi.hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE((boltunnottochat ? IDI_TICK : IDI_NOTICK)) );
+ clmi.hIcon = LoadIcon( GetModuleHandle(NULL), MAKEINTRESOURCE((boltunnottochat ? IDI_TICK : IDI_NOTICK)));
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuItemNotToChat, (LPARAM)&clmi);
}
return 0;
diff --git a/plugins/BossKeyPlus/BossKey.cpp b/plugins/BossKeyPlus/BossKey.cpp index deeaa1ffa8..6888a5347b 100644 --- a/plugins/BossKeyPlus/BossKey.cpp +++ b/plugins/BossKeyPlus/BossKey.cpp @@ -540,7 +540,7 @@ static int MsgWinOpening(WPARAM wParam, LPARAM lParam) // hiding new message win VOID CALLBACK WinEventProc(HWINEVENTHOOK g_hWinHook, DWORD event, HWND hwnd, LONG idObject, LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime)
{
- if (g_bWindowHidden && idObject == OBJID_WINDOW && (event == EVENT_OBJECT_CREATE || event == EVENT_OBJECT_SHOW) && (IsWindowVisible(hwnd)) )
+ if (g_bWindowHidden && idObject == OBJID_WINDOW && (event == EVENT_OBJECT_CREATE || event == EVENT_OBJECT_SHOW) && (IsWindowVisible(hwnd)))
{
if(hwnd == pcli->hwndContactList)
ShowWindow(hwnd,SW_HIDE);
diff --git a/plugins/BossKeyPlus/BossKeyIdle.cpp b/plugins/BossKeyPlus/BossKeyIdle.cpp index 403681a918..eba26fd29e 100644 --- a/plugins/BossKeyPlus/BossKeyIdle.cpp +++ b/plugins/BossKeyPlus/BossKeyIdle.cpp @@ -50,7 +50,7 @@ static bool IsUserIdle() LASTINPUTINFO ii;
ZeroMemory(&ii,sizeof(ii));
ii.cbSize=sizeof(ii);
- if ( MyGetLastInputInfo(&ii) )
+ if ( MyGetLastInputInfo(&ii))
return GetTickCount() - ii.dwTime > (minutes * 60 * 1000);
}
else {
diff --git a/plugins/BuddyExpectator/BuddyExpectator.cpp b/plugins/BuddyExpectator/BuddyExpectator.cpp index ebf4625b93..19e02d446a 100644 --- a/plugins/BuddyExpectator/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/BuddyExpectator.cpp @@ -749,10 +749,10 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) hEventUserInfoInit = HookEvent(ME_USERINFO_INITIALISE, UserinfoInit);
// add sounds support
- SkinAddNewSoundEx("buddyExpectatorReturn", Translate("BuddyExpectator"), Translate("Contact returned"));
- SkinAddNewSoundEx("buddyExpectatorStillAbsent", Translate("BuddyExpectator"), Translate("Contact still absent"));
- SkinAddNewSoundEx("buddyExpectatorMissYou", Translate("BuddyExpectator"), Translate("Miss you event"));
- SkinAddNewSoundEx("buddyExpectatorHide", Translate("BuddyExpectator"), Translate("Hide contact event"));
+ SkinAddNewSoundEx("buddyExpectatorReturn", LPGEN("BuddyExpectator"), LPGEN("Contact returned"));
+ SkinAddNewSoundEx("buddyExpectatorStillAbsent", LPGEN("BuddyExpectator"), LPGEN("Contact still absent"));
+ SkinAddNewSoundEx("buddyExpectatorMissYou", LPGEN("BuddyExpectator"), LPGEN("Miss you event"));
+ SkinAddNewSoundEx("buddyExpectatorHide", LPGEN("BuddyExpectator"), LPGEN("Hide contact event"));
timer_id = SetTimer(0, 0, 1000 * 60 * 60 * 4, TimerProc); // check every 4 hours
diff --git a/plugins/CSList/cslist.cpp b/plugins/CSList/cslist.cpp index 0f511d72ab..42740beb52 100644 --- a/plugins/CSList/cslist.cpp +++ b/plugins/CSList/cslist.cpp @@ -93,7 +93,7 @@ extern "C" __declspec( dllexport ) int Load( PLUGINLINK *link ) // set global variables
// we need 0.8.0.9 core which introduced accounts support for protocols
- CSList::bAccountsSupported = ( CSList::dwMirandaVersion >= PLUGIN_MAKE_VERSION( 0, 8, 0, 9 ) );
+ CSList::bAccountsSupported = ( CSList::dwMirandaVersion >= PLUGIN_MAKE_VERSION( 0, 8, 0, 9 ));
// are we running under Unicode core?
{
@@ -214,7 +214,7 @@ int CSList::respondDBChange( WPARAM wparam, LPARAM lparam ) }
// own setting or not a status-related setting
- else if ( hContact == NULL || lstrcmpA( cws->szSetting, "Status" ) )
+ else if ( hContact == NULL || lstrcmpA( cws->szSetting, "Status" ))
return 0;
DWORD dwEasteredUin = getDword( "EasterEggedUIN", 0x0 );
@@ -323,7 +323,7 @@ void CSList::setStatus( WORD code, StatusItem* item, char* protoName) void CSList::initIcoLib( )
{
- if ( !ServiceExists( MS_SKIN2_ADDICON ) )
+ if ( !ServiceExists( MS_SKIN2_ADDICON ))
return;
// init icons of buttons
@@ -437,7 +437,7 @@ void CSList::countPlusModProtos( char* protoName, void* arg ) {
int* protosExtraEnabled = ( int* )arg;
if ( DBGetContactSettingDword( NULL, protoName, "NonStandartXstatus", 0 ) ||
- DBGetContactSettingDword( NULL, protoName, "NonStandardXstatus", 0 ) )
+ DBGetContactSettingDword( NULL, protoName, "NonStandardXstatus", 0 ))
*protosExtraEnabled = ( *protosExtraEnabled )++;
}
@@ -461,7 +461,7 @@ void CSList::importCustomStatusUIStatusesFromAllProtos( char* protoName, void* a DBGetContactSettingTString( NULL, protoName, bufMessage, &dbv );
lstrcpy( si->tszMessage, dbv.ptszVal );
- if ( lstrlen( si->tszTitle ) || lstrlen( si->tszMessage ) )
+ if ( lstrlen( si->tszTitle ) || lstrlen( si->tszMessage ))
{
cslist->mainWindow->itemslist->list->add( si );
cslist->mainWindow->bSomethingChanged = TRUE;
@@ -475,7 +475,7 @@ void CSList::importCustomStatusUIStatusesFromAllProtos( char* protoName, void* a DBDeleteContactSetting( NULL, protoName, bufMessage );
}
}
- cslist->mainWindow->listview->reinitItems( cslist->mainWindow->itemslist->list->getListHead( ) );
+ cslist->mainWindow->listview->reinitItems( cslist->mainWindow->itemslist->list->getListHead( ));
}
@@ -536,7 +536,7 @@ void CSWindow::initIcons() {
char szTemp[MAX_PATH];
mir_snprintf(szTemp, SIZEOF(szTemp), "%s_xstatus%d", protoName, i);
- ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ) );
+ ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ));
}
}
}
@@ -554,7 +554,7 @@ void CSWindow::initIcons() {
char szTemp[MAX_PATH];
mir_snprintf(szTemp, SIZEOF(szTemp), "%s_%s", protoName, moods_names[i].szTag);
- ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ) );
+ ImageList_AddIcon( this->icons, ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szTemp ));
}
}
}
@@ -575,7 +575,7 @@ void CSWindow::initButtons( ) if ( forms[i].idc < 0 )
continue;
- SendDlgItemMessage( this->handle, forms[i].idc, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadIconExEx( forms[i].pszIconIcoLib, forms[i].iconNoIcoLib ) );
+ SendDlgItemMessage( this->handle, forms[i].idc, BM_SETIMAGE, IMAGE_ICON, ( LPARAM )LoadIconExEx( forms[i].pszIconIcoLib, forms[i].iconNoIcoLib ));
SendDlgItemMessage( this->handle, forms[i].idc, BUTTONSETASFLATBTN, TRUE, 0 ); //maybe set as BUTTONSETDEFAULT?
SendDlgItemMessage( this->handle, forms[i].idc, BUTTONADDTOOLTIP, ( WPARAM )TranslateTS(forms[i].ptszTitle), BATF_TCHAR );
}
@@ -588,9 +588,9 @@ void CSWindow::loadWindowPosition( ) int height = GetSystemMetrics( SM_CYSCREEN );
GetWindowRect( this->handle, &rect );
int x, y, defX, defY;
- defX = x = ( width + 1 - ( rect.right - rect.left ) ) >> 1;
- defY = y = ( height + 1 - ( rect.bottom - rect.top ) ) >> 1;
- if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ) )
+ defX = x = ( width + 1 - ( rect.right - rect.left )) >> 1;
+ defY = y = ( height + 1 - ( rect.bottom - rect.top )) >> 1;
+ if ( getByte( "RememberWindowPosition", DEFAULT_REMEMBER_WINDOW_POSITION ))
{
x = getWord( "PositionX", defX );
y = getWord( "PositionY", defY );
@@ -625,12 +625,12 @@ BOOL CSWindow::itemPassedFilter( ListItem< StatusItem >* li ) TCHAR filter[MAX_PATH];
GetDlgItemText( this->handle, IDC_FILTER_FIELD, filter, MAX_PATH );
- if ( lstrlen( filter ) )
+ if ( lstrlen( filter ))
{
TCHAR title[EXTRASTATUS_TITLE_LIMIT], message[EXTRASTATUS_MESSAGE_LIMIT];
lstrcpy( title, li->item->tszTitle ); lstrcpy( message, li->item->tszMessage );
- if ( strpos( _tcslwr( title ), _tcslwr( filter ) ) == -1 )
- if ( strpos( _tcslwr( message ), _tcslwr( filter ) ) == -1 )
+ if ( strpos( _tcslwr( title ), _tcslwr( filter )) == -1 )
+ if ( strpos( _tcslwr( message ), _tcslwr( filter )) == -1 )
return FALSE;
}
@@ -653,7 +653,7 @@ void CSWindow::toggleFilter( ) TCHAR filterText[255];
GetDlgItemText(this->handle, IDC_FILTER_FIELD, filterText, SIZEOF(filterText));
if ( lstrlen( filterText ) > 0 )
- SetDlgItemText( this->handle, IDC_FILTER_FIELD, TEXT( "" ) );
+ SetDlgItemText( this->handle, IDC_FILTER_FIELD, TEXT( "" ));
}
}
@@ -661,8 +661,8 @@ void CSWindow::toggleFilter( ) BOOL CSWindow::toggleButtons( )
{
int selection = ListView_GetSelectedItemMacro( this->listview->handle );
- BOOL validSelection = ( selection >= 0 && ( unsigned int )selection < this->itemslist->list->getCount( ) ) ? TRUE : FALSE;
- BOOL filterEnabled = IsWindowVisible( GetDlgItem( this->handle, IDC_FILTER_FIELD ) );
+ BOOL validSelection = ( selection >= 0 && ( unsigned int )selection < this->itemslist->list->getCount( )) ? TRUE : FALSE;
+ BOOL filterEnabled = IsWindowVisible( GetDlgItem( this->handle, IDC_FILTER_FIELD ));
BOOL somethingChanged = this->bSomethingChanged;
EnableWindow( GetDlgItem( this->handle, IDC_ADD ), !filterEnabled );
@@ -688,7 +688,7 @@ CSAMWindow::CSAMWindow( WORD action, CSWindow* parent ) if ( this->action == IDC_ADD )
this->item = new StatusItem( );
else
- this->item = new StatusItem( *this->parent->itemslist->list->get( this->parent->listview->getPositionInList( ) ) );
+ this->item = new StatusItem( *this->parent->itemslist->list->get( this->parent->listview->getPositionInList( )) );
}
@@ -758,13 +758,13 @@ void CSAMWindow::fillDialog( ) {
if ( this->action == IDC_ADD )
{
- SetWindowText( this->handle, TranslateT("Add new item") );
- SetDlgItemText( this->handle, IDOK, TranslateT("Add") );
+ SetWindowText( this->handle, TranslateT("Add new item"));
+ SetDlgItemText( this->handle, IDOK, TranslateT("Add"));
}
else
{
- SetWindowText( this->handle, TranslateT("Modify item") );
- SetDlgItemText( this->handle, IDOK, TranslateT("Modify") );
+ SetWindowText( this->handle, TranslateT("Modify item"));
+ SetDlgItemText( this->handle, IDOK, TranslateT("Modify"));
}
SendMessage( this->hCombo, CB_SETCURSEL, this->item->iIcon, 0 );
@@ -833,8 +833,8 @@ void CSAMWindow::checkItemValidity() int i = SendMessage(this->hCombo, CB_GETCURSEL, 0, 0);
lstrcpy(this->item->tszTitle, TranslateTS(moods_names[i].ptszTitle));
}
- if ( lstrcmp( this->item->tszMessage, tszInputMessage ) )
- ( lstrcpy( this->item->tszMessage, tszInputMessage ) ) && ( this->bChanged = TRUE );
+ if ( lstrcmp( this->item->tszMessage, tszInputMessage ))
+ ( lstrcpy( this->item->tszMessage, tszInputMessage )) && ( this->bChanged = TRUE );
}
@@ -913,7 +913,7 @@ void CSListView::initItems( ListItem< StatusItem >* items ) {
ListItem< StatusItem >* help = items;
for ( int i = 0; help != NULL; help = help->next, i++ )
- if ( parent->itemPassedFilter( help ) )
+ if ( parent->itemPassedFilter( help ))
addItem( help->item, i );
}
@@ -1092,7 +1092,7 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp csw->initIcons();
csw->initButtons( );
csw->listview = new CSListView( GetDlgItem( hwnd, IDC_CSLIST ), csw );
- csw->listview->initItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->initItems( csw->itemslist->list->getListHead( ));
csw->toggleButtons( );
csw->toggleEmptyListMessage( );
csw->loadWindowPosition( );
@@ -1101,7 +1101,7 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp return TRUE;
case WM_COMMAND:
- switch ( LOWORD( wparam ) )
+ switch ( LOWORD( wparam ))
{
case IDC_MODIFY:
case IDC_ADD:
@@ -1110,11 +1110,11 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp if ( csw->addModifyDlg->bChanged )
{
if ( LOWORD( wparam ) == IDC_MODIFY )
- csw->itemslist->list->remove( csw->listview->getPositionInList( ) );
+ csw->itemslist->list->remove( csw->listview->getPositionInList( ));
int selection = csw->itemslist->list->add( csw->addModifyDlg->item );
csw->bSomethingChanged = TRUE;
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
csw->listview->setFullFocusedSelection( selection );
csw->toggleButtons( );
csw->toggleEmptyListMessage( );
@@ -1123,12 +1123,12 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp break;
case IDC_REMOVE:
- if ( getByte( "ConfirmDeletion", DEFAULT_PLUGIN_CONFIRM_ITEMS_DELETION ) )
+ if ( getByte( "ConfirmDeletion", DEFAULT_PLUGIN_CONFIRM_ITEMS_DELETION ))
if ( MessageBox( hwnd, TranslateT("Do you really want to delete selected item?"), TranslateT(MODULENAME), MB_YESNO | MB_DEFBUTTON2 | MB_ICONQUESTION ) == IDNO )
break;
- csw->itemslist->list->remove( csw->listview->getPositionInList( ) );
+ csw->itemslist->list->remove( csw->listview->getPositionInList( ));
csw->bSomethingChanged = TRUE;
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
csw->toggleButtons( );
csw->toggleEmptyListMessage( );
break;
@@ -1136,12 +1136,12 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp case IDC_FAVOURITE:
{
int selection = csw->listview->getPositionInList( );
- StatusItem* f = new StatusItem( *csw->itemslist->list->get( selection ) );
+ StatusItem* f = new StatusItem( *csw->itemslist->list->get( selection ));
f->bFavourite = ! f->bFavourite;
csw->itemslist->list->remove( selection );
selection = csw->itemslist->list->add( f );
csw->bSomethingChanged = TRUE;
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
csw->listview->setFullFocusedSelection( selection );
csw->toggleButtons( );
}
@@ -1152,7 +1152,7 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp csw->itemslist->list->destroy( );
csw->itemslist->loadItems(csw->protoName);
csw->bSomethingChanged = FALSE;
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
csw->toggleButtons( );
csw->toggleEmptyListMessage( );
break;
@@ -1184,14 +1184,14 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp case IDC_FILTER_FIELD:
if ( HIWORD( wparam ) == EN_CHANGE )
- csw->listview->reinitItems( csw->itemslist->list->getListHead( ) );
+ csw->listview->reinitItems( csw->itemslist->list->getListHead( ));
break;
case IDCLOSE: // close and save, no custom status
case IDCANCEL: // close and save, no custom status
case IDC_CANCEL: // close and save, cancel custom status
case IDOK: // close and save, set selected custom status
- if ( LOWORD( wparam ) == IDOK && csw->toggleButtons( ) )
+ if ( LOWORD( wparam ) == IDOK && csw->toggleButtons( ))
cslist->setStatus(IDOK, csw->itemslist->list->get(csw->listview->getPositionInList()), csw->protoName);
if ( LOWORD( wparam ) == IDC_CANCEL )
cslist->setStatus(IDC_CANCEL, NULL, csw->protoName);
@@ -1228,9 +1228,9 @@ INT_PTR CALLBACK CSWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM lp return FALSE;
case WM_CTLCOLORSTATIC:
- SetTextColor( ( HDC )wparam, RGB( 174, 174, 174 ) );
- if ( ( ( HWND )lparam == GetDlgItem( hwnd, IDC_NO_ITEMS ) ) ||
- ( ( HWND )lparam == GetDlgItem( hwnd, IDC_ADD_SAMPLE ) ) )
+ SetTextColor( ( HDC )wparam, RGB( 174, 174, 174 ));
+ if ( ( ( HWND )lparam == GetDlgItem( hwnd, IDC_NO_ITEMS )) ||
+ ( ( HWND )lparam == GetDlgItem( hwnd, IDC_ADD_SAMPLE )) )
return ( BOOL )GetStockObject( WHITE_BRUSH );
return FALSE;
}
@@ -1260,16 +1260,16 @@ INT_PTR CALLBACK CSAMWindowProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM break;
case WM_COMMAND:
- switch ( LOWORD( wparam ) )
+ switch ( LOWORD( wparam ))
{
case IDC_MESSAGE:
- csamw->checkFieldLimit( HIWORD( wparam ), LOWORD( wparam ) );
+ csamw->checkFieldLimit( HIWORD( wparam ), LOWORD( wparam ));
break;
case IDOK:
csamw->checkItemValidity( );
case IDCANCEL:
EnableWindow( csamw->parent->handle, TRUE );
- EndDialog( hwnd, LOWORD( wparam ) );
+ EndDialog( hwnd, LOWORD( wparam ));
break;
}
@@ -1307,7 +1307,7 @@ INT_PTR CALLBACK CSOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l {
EnableWindow( GetDlgItem( hwnd, IDC_ALLOW_EXTRA_ICONS ), TRUE );
CheckDlgButton( hwnd, IDC_ALLOW_EXTRA_ICONS, getByte( "AllowExtraIcons",
- DEFAULT_ALLOW_EXTRA_ICONS ) );
+ DEFAULT_ALLOW_EXTRA_ICONS ));
}
TranslateDialogDefault(hwnd);
@@ -1341,7 +1341,7 @@ INT_PTR CALLBACK CSOptionsProc( HWND hwnd, UINT message, WPARAM wparam, LPARAM l HICON LoadIconExEx( const char* IcoLibName, int NonIcoLibIcon )
{
- if ( ServiceExists( MS_SKIN2_GETICON ) ) {
+ if ( ServiceExists( MS_SKIN2_GETICON )) {
char szSettingName[64];
mir_snprintf(szSettingName, SIZEOF(szSettingName), "%s_%s", __INTERNAL_NAME, IcoLibName);
return ( HICON )CallService( MS_SKIN2_GETICON, 0, ( LPARAM )szSettingName );
diff --git a/plugins/CSList/legacy.h b/plugins/CSList/legacy.h index 7139294521..8ef63089d7 100644 --- a/plugins/CSList/legacy.h +++ b/plugins/CSList/legacy.h @@ -41,8 +41,8 @@ int cslist_parse_row( TCHAR *row, int ord ) // parse + helpItem TCHAR pIcon[4], pTitle[EXTRASTATUS_TITLE_LIMIT+2], pMsg[EXTRASTATUS_MESSAGE_LIMIT+2], pFav[4];
TCHAR scanfFormat[64];
- lstrcpy( pTitle, _T( "" ) );
- lstrcpy( pMsg, _T( "" ) );
+ lstrcpy( pTitle, _T( "" ));
+ lstrcpy( pMsg, _T( "" ));
// database row format: "%2[^]%64[^]%2048[^]%2[^]"
diff --git a/plugins/ChangeKeyboardLayout/hook_events.c b/plugins/ChangeKeyboardLayout/hook_events.c index de8f764fe5..37f317a448 100644 --- a/plugins/ChangeKeyboardLayout/hook_events.c +++ b/plugins/ChangeKeyboardLayout/hook_events.c @@ -166,8 +166,8 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) ReadPopupOptions();
// Çàðåãèì çâóê
- SkinAddNewSoundEx(SND_ChangeLayout, Translate(ModuleName), Translate("Changing Layout"));
- SkinAddNewSoundEx(SND_ChangeCase, Translate(ModuleName), Translate("Changing Case"));
+ SkinAddNewSoundEx(SND_ChangeLayout, ModuleName, LPGEN("Changing Layout"));
+ SkinAddNewSoundEx(SND_ChangeCase, ModuleName, LPGEN("Changing Case"));
// Õóê íà íàæàòèå êëàâèøè
kbHook_All = SetWindowsHookEx(WH_KEYBOARD, (HOOKPROC)Keyboard_Hook, NULL, GetCurrentThreadId());
diff --git a/plugins/Chat/manager.c b/plugins/Chat/manager.c index 9968086245..82fb61ae7b 100644 --- a/plugins/Chat/manager.c +++ b/plugins/Chat/manager.c @@ -1484,7 +1484,7 @@ TCHAR* UM_FindUserAutoComplete(USERINFO* pUserList, const TCHAR* pszOriginal, co while ( pTemp != NULL ) {
if ( pTemp->pszNick && my_strstri( pTemp->pszNick, pszOriginal) == pTemp->pszNick )
- if ( lstrcmpi( pTemp->pszNick, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->pszNick, pszName ) < 0) )
+ if ( lstrcmpi( pTemp->pszNick, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->pszNick, pszName ) < 0))
pszName = pTemp->pszNick;
pTemp = pTemp->next;
diff --git a/plugins/Chat/options.c b/plugins/Chat/options.c index 73f1bc364b..1e25f541e7 100644 --- a/plugins/Chat/options.c +++ b/plugins/Chat/options.c @@ -1083,17 +1083,17 @@ int OptionsInit(void) g_Settings.iHeight = DBGetContactSettingDword(NULL, "Chat", "roomheight", -1);
LoadGlobalSettings();
- SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
+ SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
SkinAddNewSoundEx("ChatHighlight", LPGEN("Group chats"), LPGEN("Message is highlighted"));
- SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
- SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
- SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
- SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
- SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
- SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
- SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
- SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
- SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
+ SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
+ SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
+ SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
+ SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
+ SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
+ SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
+ SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
+ SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
+ SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
if ( g_Settings.LoggingEnabled )
CallService(MS_UTILS_CREATEDIRTREET, 0, (LPARAM)g_Settings.pszLogDir);
diff --git a/plugins/Chat/services.c b/plugins/Chat/services.c index 53ed1a03c0..4a9e785691 100644 --- a/plugins/Chat/services.c +++ b/plugins/Chat/services.c @@ -610,7 +610,7 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) if ( gce->cbSize != SIZEOF_STRUCT_GCEVENT_V1 && gce->cbSize != SIZEOF_STRUCT_GCEVENT_V2 )
return GC_EVENT_WRONGVER;
- if ( !IsEventSupported( gcd->iType ) )
+ if ( !IsEventSupported( gcd->iType ))
return GC_EVENT_ERROR;
EnterCriticalSection(&cs);
diff --git a/plugins/ClientChangeNotify/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/ClientChangeNotify.cpp index 8ce9f2080d..12440b5aaa 100644 --- a/plugins/ClientChangeNotify/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/ClientChangeNotify.cpp @@ -407,7 +407,7 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam) hHooks.AddElem(HookEvent(ME_OPT_INITIALISE, OptionsDlgInit));
hHooks.AddElem(HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ContactSettingChanged));
hHooks.AddElem(HookEvent(ME_CONTACTSETTINGS_INITIALISE, ContactSettingsInit));
- SkinAddNewSound(CLIENTCHANGED_SOUND, Translate("ClientChangeNotify: Client changed"), "");
+ SkinAddNewSoundEx(CLIENTCHANGED_SOUND, NULL, LPGEN("ClientChangeNotify: Client changed"));
// updater plugin support
Update update = {0};
char szVersion[16];
diff --git a/plugins/Clist_modern/modern_aniavatars.cpp b/plugins/Clist_modern/modern_aniavatars.cpp index dcad45f439..ae57520fa2 100644 --- a/plugins/Clist_modern/modern_aniavatars.cpp +++ b/plugins/Clist_modern/modern_aniavatars.cpp @@ -195,7 +195,7 @@ int AniAva_InitModule() memset(&AniAva,0,sizeof(AniAva));
if (g_CluiData.fGDIPlusFail) return 0;
if (!( ModernGetSettingByte(NULL,"CList","AvatarsAnimated",(ServiceExists(MS_AV_GETAVATARBITMAP)&&!g_CluiData.fGDIPlusFail))
- && ModernGetSettingByte(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT) ) ) return 0;
+ && ModernGetSettingByte(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT)) ) return 0;
{
WNDCLASSEX wc;
ZeroMemory(&wc, sizeof(wc));
@@ -264,7 +264,7 @@ int AniAva_UpdateOptions() BOOL bReloadAvatars=FALSE;
BOOL bBeEnabled=(!g_CluiData.fGDIPlusFail
&& ModernGetSettingByte(NULL,"CList","AvatarsAnimated",(ServiceExists(MS_AV_GETAVATARBITMAP)&&!g_CluiData.fGDIPlusFail))
- && ModernGetSettingByte(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT) );
+ && ModernGetSettingByte(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT));
if (bBeEnabled && !AniAva.bModuleStarted)
{
AniAva_InitModule();
@@ -324,7 +324,7 @@ int AniAva_AddAvatar(HANDLE hContact, TCHAR * szFilename, int width, int heigth) }
if (i==AniAva.Objects->realCount)
{
- pavi = (ANIAVA_OBJECT *) mir_calloc( sizeof(ANIAVA_OBJECT) );
+ pavi = (ANIAVA_OBJECT *) mir_calloc( sizeof(ANIAVA_OBJECT));
pavi->hWindow = NULL;
pavi->hContact = hContact;
pavi->bInvalidPos = 0;
@@ -493,7 +493,7 @@ int AniAva_RemoveInvalidatedAvatars() for (i=0; i<AniAva.Objects->realCount; i++)
{
ANIAVA_OBJECT * pai=(ANIAVA_OBJECT *)AniAva.Objects->items[i];
- if (pai->hWindow && (pai->bInvalidPos) )
+ if (pai->hWindow && (pai->bInvalidPos))
{
SendMessage(pai->hWindow,AAM_STOP,0,0);
if (pai->bInvalidPos)//>3)
@@ -880,7 +880,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /* = NUL ske_SetRgnOpaque( tempDC, hRgn, TRUE );
}
// draw avatar
- if ( !(AniAva.bFlags & AAO_OPAQUE) )
+ if ( !(AniAva.bFlags & AAO_OPAQUE))
BitBlt(tempDC,0, 0, szWnd.cx, szWnd.cy , AniAva.hAniAvaDC , dat->ptFromPoint.x+dat->sizeAvatar.cx*dat->currentFrame, dat->ptFromPoint.y, SRCCOPY);
else
{
@@ -898,7 +898,7 @@ static void _AniAva_RenderAvatar(ANIAVA_WINDOWINFO * dat, HDC hdcParent /* = NUL if ( ( AniAva.bFlags & AAO_HAS_OVERLAY )
&& ( dat->overlayIconIdx != -1 )
- && ( AniAva.overlayIconImageList ) )
+ && ( AniAva.overlayIconImageList ))
{
// if overlay - draw overlay icon
// position - on avatar
@@ -1064,9 +1064,9 @@ static void _AniAva_AnimationTreadProc(HANDLE hExitEvent) if ( rc == WAIT_OBJECT_0 + 1 )
{
MSG msg;
- while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) )
+ while ( PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
- if ( IsDialogMessage(msg.hwnd, &msg) ) continue;
+ if ( IsDialogMessage(msg.hwnd, &msg)) continue;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
@@ -1119,7 +1119,7 @@ void _AniAva_InvalidateParent(ANIAVA_WINDOWINFO * dat) static LRESULT CALLBACK _AniAva_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ANIAVA_WINDOWINFO * dat=NULL;
- if (msg==WM_TIMER || msg==WM_DESTROY || (msg>AAM_FIRST && msg<AAM_LAST) )
+ if (msg==WM_TIMER || msg==WM_DESTROY || (msg>AAM_FIRST && msg<AAM_LAST))
dat=(ANIAVA_WINDOWINFO *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
switch (msg)
diff --git a/plugins/Clist_modern/modern_cachefuncs.cpp b/plugins/Clist_modern/modern_cachefuncs.cpp index 46e0d40b03..0a741adb90 100644 --- a/plugins/Clist_modern/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/modern_cachefuncs.cpp @@ -151,7 +151,7 @@ void CSmileyString::_CopySmileyList( SortedList *plInput ) ClcContactTextPiece *pieceFrom=(ClcContactTextPiece *) plInput->items[i];
if ( pieceFrom != NULL )
{
- ClcContactTextPiece *piece = (ClcContactTextPiece *) mir_alloc( sizeof(ClcContactTextPiece) );
+ ClcContactTextPiece *piece = (ClcContactTextPiece *) mir_alloc( sizeof(ClcContactTextPiece));
*piece=*pieceFrom;
if ( pieceFrom->type == TEXT_PIECE_TYPE_SMILEY)
piece->smiley = CopyIcon( pieceFrom->smiley );
@@ -165,7 +165,7 @@ void CSmileyString::DestroySmileyList() if ( plText == NULL ) return;
- if ( IsBadReadPtr( plText, sizeof(SortedList) ) )
+ if ( IsBadReadPtr( plText, sizeof(SortedList)) )
{
plText = NULL;
return;
@@ -180,7 +180,7 @@ void CSmileyString::DestroySmileyList() {
ClcContactTextPiece *piece = (ClcContactTextPiece *) plText->items[i];
- if ( !IsBadWritePtr(piece, sizeof(ClcContactTextPiece) ) )
+ if ( !IsBadWritePtr(piece, sizeof(ClcContactTextPiece)) )
{
if (piece->type==TEXT_PIECE_TYPE_SMILEY && piece->smiley != g_hListeningToIcon)
DestroyIcon_protect(piece->smiley);
@@ -976,7 +976,7 @@ void Cache_GetAvatar(struct ClcData *dat, struct ClcContact *contact) {
int old_pos=contact->avatar_pos;
if (g_CluiData.bSTATE!=STATE_NORMAL
- || (dat->use_avatar_service && !ServiceExists(MS_AV_GETAVATARBITMAP)) ) // workaround for avatar service and other wich destroys service on OK_TOEXIT
+ || (dat->use_avatar_service && !ServiceExists(MS_AV_GETAVATARBITMAP))) // workaround for avatar service and other wich destroys service on OK_TOEXIT
{
contact->avatar_pos = AVATAR_POS_DONT_HAVE;
contact->avatar_data = NULL;
diff --git a/plugins/Clist_modern/modern_clc.cpp b/plugins/Clist_modern/modern_clc.cpp index 5778ffe11f..1e05581498 100644 --- a/plugins/Clist_modern/modern_clc.cpp +++ b/plugins/Clist_modern/modern_clc.cpp @@ -222,7 +222,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) {
pcli->pfnClcBroadcast( INTM_GROUPSCHANGED,wParam,lParam);
}
- else if (!strcmp(cws->szSetting,"XStatusId") || !strcmp(cws->szSetting,"XStatusName") )
+ else if (!strcmp(cws->szSetting,"XStatusId") || !strcmp(cws->szSetting,"XStatusName"))
{
CLUIServices_ProtocolStatusChanged(0,(LPARAM)cws->szModule);
}
@@ -302,7 +302,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) pcli->pfnClcBroadcast( INTM_TIMEZONECHANGED,wParam,0);
else if (!strcmp(cws->szSetting,"ListeningTo"))
pcli->pfnClcBroadcast( INTM_STATUSMSGCHANGED,wParam,0);
- else if (!strcmp(cws->szSetting,"Transport") || !strcmp(cws->szSetting,"IsTransported") )
+ else if (!strcmp(cws->szSetting,"Transport") || !strcmp(cws->szSetting,"IsTransported"))
{
pcli->pfnInvalidateDisplayNameCacheEntry((HANDLE)wParam);
pcli->pfnClcBroadcast( CLM_AUTOREBUILD,wParam,0);
@@ -1008,7 +1008,7 @@ static LRESULT clcOnLButtonDown(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM {
if ( hit==dat->selection && hitFlags&CLCHT_ONITEMLABEL && dat->exStyle&CLS_EX_EDITLABELS)
{
- if ( !(dat->dragStage&DRAGSTAGEF_SKIPRENAME) )
+ if ( !(dat->dragStage&DRAGSTAGEF_SKIPRENAME))
{
SetCapture(hwnd);
dat->iDragItem=dat->selection;
@@ -1152,7 +1152,7 @@ static LRESULT clcOnMouseMove(struct ClcData *dat, HWND hwnd, UINT msg, WPARAM w pt.x= (short)LOWORD(lParam);
pt.y= (short)HIWORD(lParam);
if ( abs(pt.x-dat->ptDragStart.x)>GetSystemMetrics(SM_CXDOUBLECLK)
- ||abs(pt.y-dat->ptDragStart.y)>GetSystemMetrics(SM_CYDOUBLECLK) )
+ ||abs(pt.y-dat->ptDragStart.y)>GetSystemMetrics(SM_CYDOUBLECLK))
{
KillTimer( hwnd, TIMERID_RENAME );
dat->dragStage&=(~DRAGSTAGEF_MAYBERENAME);
@@ -1770,7 +1770,7 @@ static LRESULT clcOnIntmIconChanged(struct ClcData *dat, HWND hwnd, UINT msg, WP {
shouldShow=TRUE;
}
- if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && ((style & CLS_HIDEOFFLINE) || group->hideOffline || g_CluiData.bFilterEffective) ) // CLVM changed
+ if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && ((style & CLS_HIDEOFFLINE) || group->hideOffline || g_CluiData.bFilterEffective)) // CLVM changed
{
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
hSelItem = pcli->pfnContactToHItem(selcontact);
@@ -1968,7 +1968,7 @@ static LRESULT clcOnIntmStatusChanged(struct ClcData *dat, HWND hwnd, UINT msg, }
- if (ModernGetSettingByte(NULL,"CList","PlaceOfflineToRoot",SETTING_PLACEOOFLINETOROOT_DEFAULT) )
+ if (ModernGetSettingByte(NULL,"CList","PlaceOfflineToRoot",SETTING_PLACEOOFLINETOROOT_DEFAULT))
{
SendMessage(hwnd,CLM_AUTOREBUILD,0,0);
}
diff --git a/plugins/Clist_modern/modern_clcitems.cpp b/plugins/Clist_modern/modern_clcitems.cpp index 367bbb57de..89e0395129 100644 --- a/plugins/Clist_modern/modern_clcitems.cpp +++ b/plugins/Clist_modern/modern_clcitems.cpp @@ -54,7 +54,7 @@ void AddSubcontacts(struct ClcData *dat, struct ClcContact * cont, BOOL showOffl hsub=(HANDLE)CallService(MS_MC_GETSUBCONTACT,(WPARAM)cont->hContact,j);
cacheEntry=(pdisplayNameCacheEntry)pcli->pfnGetCacheEntry(hsub);
wStatus=pdnce___GetStatus( cacheEntry );
- if (showOfflineHereGroup||(!(ModernGetSettingByte(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) && ModernGetSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT) ) ||
+ if (showOfflineHereGroup||(!(ModernGetSettingByte(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) && ModernGetSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT)) ||
wStatus!=ID_STATUS_OFFLINE )
//&&
//(!cacheEntry->Hidden || style&CLS_SHOWHIDDEN)
@@ -337,7 +337,7 @@ int RestoreSelection( struct ClcData *dat, HANDLE hSelected ) ClcContact * selcontact = NULL;
ClcGroup * selgroup = NULL;
- if ( !hSelected || !pcli->pfnFindItem( dat->hWnd, dat, hSelected, &selcontact, &selgroup, NULL) )
+ if ( !hSelected || !pcli->pfnFindItem( dat->hWnd, dat, hSelected, &selcontact, &selgroup, NULL))
{
dat->selection = -1;
return dat->selection;
@@ -345,11 +345,11 @@ int RestoreSelection( struct ClcData *dat, HANDLE hSelected ) if ( !selcontact->isSubcontact )
{
- dat->selection = pcli->pfnGetRowsPriorTo( &dat->list, selgroup, li.List_IndexOf((SortedList*)&selgroup->cl, selcontact ) );
+ dat->selection = pcli->pfnGetRowsPriorTo( &dat->list, selgroup, li.List_IndexOf((SortedList*)&selgroup->cl, selcontact ));
}
else
{
- dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, selgroup, li.List_IndexOf((SortedList*)&selgroup->cl, selcontact->subcontacts ) );
+ dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, selgroup, li.List_IndexOf((SortedList*)&selgroup->cl, selcontact->subcontacts ));
if (dat->selection != -1 )
dat->selection += selcontact->isSubcontact;
@@ -675,7 +675,7 @@ void pdnce___SetStatus( pdisplayNameCacheEntry pdnce, WORD wStatus ) }
struct ClcContact* cliCreateClcContact( void )
{
- struct ClcContact* contact=(struct ClcContact*)mir_calloc(sizeof( struct ClcContact ) );
+ struct ClcContact* contact=(struct ClcContact*)mir_calloc(sizeof( struct ClcContact ));
memset((void*)contact->iWideExtraImage,0xFF,sizeof(contact->iWideExtraImage));
return contact;
}
diff --git a/plugins/Clist_modern/modern_clcopts.cpp b/plugins/Clist_modern/modern_clcopts.cpp index ee97d8c1cf..4585205f2f 100644 --- a/plugins/Clist_modern/modern_clcopts.cpp +++ b/plugins/Clist_modern/modern_clcopts.cpp @@ -220,13 +220,13 @@ void GetFontSetting(int i,LOGFONT *lf,COLORREF *colour,BYTE *effect, COLORREF *e if ( fontOptionsList[index].fontID == i )
break;
}
- if ( index == SIZEOF(fontOptionsList) )
+ if ( index == SIZEOF(fontOptionsList))
return;
FontIDT fontid = {0};
fontid.cbSize = FontID_SIZEOF_V2;
- _tcsncpy( fontid.group, fontOptionsList[index].szGroup, SIZEOF( fontid.group ) );
- _tcsncpy( fontid.name, fontOptionsList[index].szDescr, SIZEOF( fontid.name ) );
+ _tcsncpy( fontid.group, fontOptionsList[index].szGroup, SIZEOF( fontid.group ));
+ _tcsncpy( fontid.name, fontOptionsList[index].szDescr, SIZEOF( fontid.name ));
COLORREF col = CallService( MS_FONT_GETT, (WPARAM)&fontid, (LPARAM)lf );
diff --git a/plugins/Clist_modern/modern_clcpaint.cpp b/plugins/Clist_modern/modern_clcpaint.cpp index edc043da0f..548407d616 100644 --- a/plugins/Clist_modern/modern_clcpaint.cpp +++ b/plugins/Clist_modern/modern_clcpaint.cpp @@ -111,7 +111,7 @@ CLCPaint::CLCPaint() void CLCPaint::cliPaintClc( HWND hwnd, struct ClcData *dat, HDC hdc, RECT *rcPaint )
{
- if ( MirandaExiting() ) return;
+ if ( MirandaExiting()) return;
g_CluiData.mutexPaintLock++;
g_clcPainter._PaintClc( hwnd, dat, hdc, rcPaint );
g_CluiData.mutexPaintLock--;
@@ -184,7 +184,7 @@ int CLCPaint::GetBasicFontID( struct ClcContact * contact ) && _GetRealStatus( contact, ID_STATUS_OFFLINE ) != ID_STATUS_INVISIBLE )
||
( contact->flags&CONTACTF_VISTO
- && _GetRealStatus( contact, ID_STATUS_OFFLINE ) == ID_STATUS_INVISIBLE ) )
+ && _GetRealStatus( contact, ID_STATUS_OFFLINE ) == ID_STATUS_INVISIBLE ))
{
// the contact is in the always visible list and the proto is invisible
// the contact is in the always invisible and the proto is in any other mode
@@ -192,7 +192,7 @@ int CLCPaint::GetBasicFontID( struct ClcContact * contact ) }
else
{
- switch( pdnce___GetStatus( pdnce ) )
+ switch( pdnce___GetStatus( pdnce ))
{
case ID_STATUS_OFFLINE: return FONTID_OFFLINE;
case ID_STATUS_AWAY: return FONTID_AWAY;
@@ -398,7 +398,7 @@ int CLCPaint::_GetRealStatus( struct ClcContact * pContact, int nStatus ) for ( int i = 0; i<pcli->hClcProtoCount; i++ )
{
- if ( !lstrcmpA( pcli->clcProto[i].szProto, pContact->proto ) )
+ if ( !lstrcmpA( pcli->clcProto[i].szProto, pContact->proto ))
return pcli->clcProto[i].dwStatus;
}
return nStatus;
@@ -477,7 +477,7 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T else
{
// Draw text and smileys
- for ( ; i < plText->realCount && i >= 0 && pos_x < text_size->cx && len > 0; i += ( uTextFormat & DT_RTLREADING ? -1 : 1 ) )
+ for ( ; i < plText->realCount && i >= 0 && pos_x < text_size->cx && len > 0; i += ( uTextFormat & DT_RTLREADING ? -1 : 1 ))
{
ClcContactTextPiece *piece = ( ClcContactTextPiece * ) plText->items[i];
RECT text_rc = *free_rc;
@@ -491,11 +491,11 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T {
tmp_rc = text_rc;
tmp_rc.right += 50;
- ske_DrawText( hdcMem, &szText[piece->start_pos], min( len, piece->len ), &tmp_rc, DT_CALCRECT | ( uTextFormat & ~DT_END_ELLIPSIS ) );
+ ske_DrawText( hdcMem, &szText[piece->start_pos], min( len, piece->len ), &tmp_rc, DT_CALCRECT | ( uTextFormat & ~DT_END_ELLIPSIS ));
pos_x += tmp_rc.right - tmp_rc.left + 2;
if ( uTextFormat & DT_RTLREADING )
- text_rc.left = max( text_rc.left, text_rc.right - ( tmp_rc.right - tmp_rc.left ) );
+ text_rc.left = max( text_rc.left, text_rc.right - ( tmp_rc.right - tmp_rc.left ));
ske_DrawText( hdcMem, &szText[piece->start_pos], min( len, piece->len ), &text_rc, uTextFormat );
len -= piece->len;
@@ -533,7 +533,7 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T text_rc.top += ( row_height - fac_height ) >> 1;
ske_DrawIconEx( hdcMem, text_rc.left, text_rc.top, piece->smiley,
- fac_width, fac_height, 0, NULL, DI_NORMAL|( ( factor<1 )?128:0 ) ); //TO DO enchance drawing quality
+ fac_width, fac_height, 0, NULL, DI_NORMAL|( ( factor<1 )?128:0 )); //TO DO enchance drawing quality
}
else
{
@@ -551,10 +551,10 @@ void CLCPaint::_DrawTextSmiley( HDC hdcMem, RECT * free_rc, SIZE * text_size, T void CLCPaint::_AddParameter( MODERNMASK * mpModernMask, MASKPARAM * lpParam )
{
- mpModernMask->pl_Params = ( MASKPARAM * )realloc( mpModernMask->pl_Params, ( mpModernMask->dwParamCnt+1 )*sizeof( MASKPARAM ) );
- memmove( &( mpModernMask->pl_Params[mpModernMask->dwParamCnt] ), lpParam, sizeof( MASKPARAM ) );
+ mpModernMask->pl_Params = ( MASKPARAM * )realloc( mpModernMask->pl_Params, ( mpModernMask->dwParamCnt+1 )*sizeof( MASKPARAM ));
+ memmove( &( mpModernMask->pl_Params[mpModernMask->dwParamCnt] ), lpParam, sizeof( MASKPARAM ));
mpModernMask->dwParamCnt++;
- memset( lpParam, 0, sizeof( MASKPARAM ) );
+ memset( lpParam, 0, sizeof( MASKPARAM ));
}
void CLCPaint::_FillParam( MASKPARAM * lpParam, DWORD dwParamHash, const char* const szValue, DWORD dwValueHash )
@@ -563,7 +563,7 @@ void CLCPaint::_FillParam( MASKPARAM * lpParam, DWORD dwParamHash, const char* lpParam->dwId = dwParamHash;
if ( !dwValueHash && szValue && szValue[0] ) lpParam->dwValueHash = mod_CalcHash( szValue );
else lpParam->dwValueHash = dwValueHash;
- if ( szValue ) lpParam->szValue = strdupn( szValue, strlen( szValue ) );
+ if ( szValue ) lpParam->szValue = strdupn( szValue, strlen( szValue ));
else lpParam->szValue = NULL;
}
@@ -577,7 +577,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group, {
MODERNMASK * mpModernMask = NULL;
char buf[BUF2SIZE] = {0};
- mpModernMask = ( MODERNMASK* )mir_calloc( sizeof( MODERNMASK ) );
+ mpModernMask = ( MODERNMASK* )mir_calloc( sizeof( MODERNMASK ));
_AddParamShort( mpModernMask, hi_Module, hi_CL );
_AddParamShort( mpModernMask, hi_ID, hi_Row );
@@ -615,7 +615,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group, _AddParamShort( mpModernMask, hi_Type, hi_Contact );
AddParam( mpModernMask, HASH[hi_Protocol], Drawing->proto, 0 );
_AddParamShort( mpModernMask, hi_RootGroup, ( group && group->parent == NULL )?hi_True:hi_False );
- switch( GetContactCachedStatus( Drawing->hContact ) )
+ switch( GetContactCachedStatus( Drawing->hContact ))
{
// case ID_STATUS_CONNECTING: AppendChar( buf, BUFSIZE, "CONNECTING" ); break;
case ID_STATUS_ONLINE: _AddParamShort( mpModernMask, hi_Status, hi_ONLINE ); break;
@@ -667,7 +667,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group, int i, m;
m = lstrlen( b2 );
for ( i = 0; i<m;i++ )
- if ( b2[i] == TEXT( ',' ) ) b2[i] = TEXT( '.' );
+ if ( b2[i] == TEXT( ',' )) b2[i] = TEXT( '.' );
{
char* b3 = mir_utf8encodeT( b2 );
AddParam( mpModernMask, HASH[hi_Name], b3, 0 );
@@ -682,7 +682,7 @@ MODERNMASK * CLCPaint::_GetCLCContactRowBackModernMask( struct ClcGroup * group, int i, m;
m = lstrlen( b2 );
for ( i = 0; i<m;i++ )
- if ( b2[i] == TEXT( ',' ) ) b2[i] = TEXT( '.' );
+ if ( b2[i] == TEXT( ',' )) b2[i] = TEXT( '.' );
{
char * b3 = mir_utf8encodeT( b2 );
AddParam( mpModernMask, HASH[hi_Group], b3, 0 );
@@ -741,7 +741,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str RECT fr_rc = free_row_rc;
//1 draw icon
- if ( !( Drawing->type == CLCIT_GROUP && InClistWindow && dat->row_hide_group_icon ) )
+ if ( !( Drawing->type == CLCIT_GROUP && InClistWindow && dat->row_hide_group_icon ))
{
int iImage = -1;
// Get image
@@ -798,7 +798,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str p_rect.bottom = p_rect.top+ICON_HEIGHT;
if ( ( Drawing->type == CLCIT_GROUP || Drawing->type == CLCIT_CONTACT || Drawing->type == CLCIT_INFO )
- && dat->extraColumnsCount > 0 && ( !InClistWindow || Drawing->type == CLCIT_CONTACT ) )
+ && dat->extraColumnsCount > 0 && ( !InClistWindow || Drawing->type == CLCIT_CONTACT ))
{
int BlendedInActiveState = dat->dbbBlendInActiveState;
int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
@@ -900,7 +900,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str if ( dat->row_align_group_mode != 2 ) //center or left
{
- int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ) )>>1:0;
+ int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ))>>1:0;
nameRect.left+= x;
nameRect.right = nameRect.left+text_size.cx;
countRect.left = nameRect.right+space_width;
@@ -928,7 +928,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str - //if ( !( szCounts && strlen( szCounts )>0 ) )
+ //if ( !( szCounts && strlen( szCounts )>0 ))
//uTextFormat|= ( dat->row_align_group_mode == 2 )?DT_RIGHT:( dat->row_align_group_mode == 1 )?DT_CENTER:DT_LEFT;
uTextFormat|= DT_VCENTER;
@@ -1041,7 +1041,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str Drawing->pos_rename_rect = rc;
}
- if ( ( !InClistWindow || !g_CluiData.fLayered )&& ( ( Drawing->type == CLCIT_DIVIDER ) || ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS ) ) )
+ if ( ( !InClistWindow || !g_CluiData.fLayered )&& ( ( Drawing->type == CLCIT_DIVIDER ) || ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS )) )
{
//???
RECT rc = fr_rc;
@@ -1069,7 +1069,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str // Call Placement
cppCalculateRowItemsPos( gl_RowRoot, free_row_rc.right-free_row_rc.left );
// Now paint
- while ( ( gl_RowTabAccess[i] != NULL || ( i<2 && Drawing->type == CLCIT_GROUP ) ) && !( i>= 2 && Drawing->type == CLCIT_GROUP ) )
+ while ( ( gl_RowTabAccess[i] != NULL || ( i<2 && Drawing->type == CLCIT_GROUP )) && !( i>= 2 && Drawing->type == CLCIT_GROUP ))
{
if ( gl_RowTabAccess[i]->r.right-gl_RowTabAccess[i]->r.left>0
@@ -1151,7 +1151,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str if ( dat->row_align_group_mode != 2 ) //center or left
{
- int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ) )>>1:0;
+ int x = ( dat->row_align_group_mode == 1 )?( wid-( text_size.cx+count_size.cx ))>>1:0;
nameRect.left+= x;
nameRect.right = nameRect.left+text_size.cx;
countRect.left = nameRect.right+space_width;
@@ -1179,7 +1179,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str - //if ( !( szCounts && strlen( szCounts )>0 ) )
+ //if ( !( szCounts && strlen( szCounts )>0 ))
//uTextFormat|= ( dat->row_align_group_mode == 2 )?DT_RIGHT:( dat->row_align_group_mode == 1 )?DT_CENTER:DT_LEFT;
uTextFormat|= DT_VCENTER;
@@ -1276,7 +1276,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str && ( ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE )
)
- && !Drawing->image_is_special ) ) )
+ && !Drawing->image_is_special )) )
{
int iImage = -1;
// Get image
@@ -1417,7 +1417,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str // Draw avatar
if ( dat->use_avatar_service )
- /*if ( ServiceExists( MS_AV_BLENDDRAWAVATAR ) )
+ /*if ( ServiceExists( MS_AV_BLENDDRAWAVATAR ))
{
AVATARDRAWREQUEST adr;
@@ -1445,7 +1445,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str }
else
{
- if ( !( Drawing->avatar_data->dwFlags&AVS_PREMULTIPLIED ) )
+ if ( !( Drawing->avatar_data->dwFlags&AVS_PREMULTIPLIED ))
{
HDC hdcTmp = CreateCompatibleDC( hdcMem );
RECT r = {0, 0, w, h};
@@ -1496,7 +1496,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str //TODO fix overlays
// Draw overlay
if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
- && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ) )
+ && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
p_rect.top = p_rect.bottom - ICON_HEIGHT;
p_rect.left = p_rect.right - ICON_HEIGHT;
@@ -1528,7 +1528,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str int item;
item = ExtIconFromStatusMode( Drawing->hContact, Drawing->proto,
- Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ) );
+ Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ));
if ( item != -1 )
_DrawStatusIcon( Drawing, dat, item, hdcMem,
p_rect.left, p_rect.top, ICON_HEIGHT, ICON_HEIGHT,
@@ -1553,7 +1553,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str {
if ( Drawing->type == CLCIT_CONTACT &&
- ( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ) )
+ ( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ))
{
int BlendedInActiveState = dat->dbbBlendInActiveState;
int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
@@ -1616,7 +1616,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str case TC_EXTRA9:
{
if ( Drawing->type == CLCIT_CONTACT &&
- ( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ) )
+ ( !Drawing->isSubcontact || dat->dbbMetaHideExtra == 0 && dat->extraColumnsCount > 0 ))
{
int eNum = gl_RowTabAccess[i]->type-TC_EXTRA1;
if ( eNum<dat->extraColumnsCount )
@@ -1660,7 +1660,7 @@ void CLCPaint::_PaintRowItemsEx( HWND hwnd, HDC hdcMem, struct ClcData *dat, str {
// Select font
ChangeToFont( hdcMem, dat, FONTID_CONTACT_TIME, NULL );
- ske_DrawText( hdcMem, szResult, lstrlen( szResult ), &p_rect, DT_NOPREFIX | DT_SINGLELINE|( dat->text_rtl ? DT_RTLREADING : 0 ) );
+ ske_DrawText( hdcMem, szResult, lstrlen( szResult ), &p_rect, DT_NOPREFIX | DT_SINGLELINE|( dat->text_rtl ? DT_RTLREADING : 0 ));
}
break;
}
@@ -1799,14 +1799,14 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, struct ClcData *dat ) else if ( !g_CluiData.fLayered )
paintMode = DM_NON_LAYERED;
- if ( !(paintMode&DM_CONTROL) && !CLUI_IsInMainWindow( hWnd ) )
+ if ( !(paintMode&DM_CONTROL) && !CLUI_IsInMainWindow( hWnd ))
paintMode |= DM_FLOAT;
LONG lStyle = GetWindowLongPtr( hWnd, GWL_STYLE );
int nStatus = _GetGeneralisedStatus();
if ( ( lStyle & WS_DISABLED )
- || ( dat->greyoutFlags & pcli->pfnClcStatusToPf2( nStatus ) )
- || ( ( dat->greyoutFlags & GREYF_UNFOCUS) && ( GetFocus() != hWnd ) ) )
+ || ( dat->greyoutFlags & pcli->pfnClcStatusToPf2( nStatus ))
+ || ( ( dat->greyoutFlags & GREYF_UNFOCUS) && ( GetFocus() != hWnd )) )
paintMode |= DM_GRAY;
if ( lStyle&CLS_GREYALTERNATE )
@@ -1817,7 +1817,7 @@ int CLCPaint::_DetermineDrawMode( HWND hWnd, struct ClcData *dat ) void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT& clRect, _PaintContext& pc )
{
- if ( paintMode&DM_GRAY && !(paintMode&DM_LAYERED) )
+ if ( paintMode&DM_GRAY && !(paintMode&DM_LAYERED))
{
pc.hdcMem2 = CreateCompatibleDC( hdc );
if ( paintMode&DM_CLASSIC )
@@ -1843,15 +1843,15 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, i }
else
{
- pc.tmpbkcolour = (!(paintMode&DM_CONTROL) && dat->bkChanged ) ? dat->bkColour : ( !dat->useWindowsColours ? dat->bkColour : GetSysColor( COLOR_3DFACE ) );
+ pc.tmpbkcolour = (!(paintMode&DM_CONTROL) && dat->bkChanged ) ? dat->bkColour : ( !dat->useWindowsColours ? dat->bkColour : GetSysColor( COLOR_3DFACE ));
pc.tmpforecolour = /*(paintMode&DM_CONTROL) ? */dat->fontModernInfo[FONTID_CONTACTS].colour;
}
if ( paintMode&DM_GREYALTERNATE )
{
- int rDelta = ( GetRValue( pc.tmpbkcolour ) > GetRValue( pc.tmpforecolour ) ) ? -10 : 10;
- int gDelta = ( GetGValue( pc.tmpbkcolour ) > GetGValue( pc.tmpforecolour ) ) ? -10 : 10;
- int bDelta = ( GetBValue( pc.tmpbkcolour ) > GetBValue( pc.tmpforecolour ) ) ? -10 : 10;
+ int rDelta = ( GetRValue( pc.tmpbkcolour ) > GetRValue( pc.tmpforecolour )) ? -10 : 10;
+ int gDelta = ( GetGValue( pc.tmpbkcolour ) > GetGValue( pc.tmpforecolour )) ? -10 : 10;
+ int bDelta = ( GetBValue( pc.tmpbkcolour ) > GetBValue( pc.tmpforecolour )) ? -10 : 10;
int rValue = GetRValue( pc.tmpbkcolour ) + rDelta;
int gValue = GetRValue( pc.tmpbkcolour ) + gDelta;
int bValue = GetRValue( pc.tmpbkcolour ) + bDelta;
@@ -1860,7 +1860,7 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, i BYTE bgValue = ( gValue >255) ? 255 : gValue < 0 ? 0 : (BYTE)gValue;
BYTE bbValue = ( bValue >255) ? 255 : bValue < 0 ? 0 : (BYTE)bValue;
- pc.hBrushAlternateGrey = CreateSolidBrush( GetNearestColor( pc.hdcMem, RGB( brValue, bgValue, bbValue ) ) );
+ pc.hBrushAlternateGrey = CreateSolidBrush( GetNearestColor( pc.hdcMem, RGB( brValue, bgValue, bbValue )) );
}
// Set some draw states
@@ -1874,18 +1874,18 @@ void CLCPaint::_PreparePaintContext( HWND hWnd, struct ClcData * dat, HDC hdc, i void CLCPaint::_DrawBackground( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT * rcPaint, RECT& clRect, _PaintContext& pc )
{
- if ( paintMode&(DM_FLOAT|DM_CONTROL) )
+ if ( paintMode&(DM_FLOAT|DM_CONTROL))
{
HBRUSH hBrush = CreateSolidBrush( pc.tmpbkcolour );
FillRect( pc.hdcMem, rcPaint, hBrush );
DeleteObject( hBrush );
ske_SetRectOpaque( pc.hdcMem, rcPaint );
- if ( !( paintMode&DM_GREYALTERNATE ) )
+ if ( !( paintMode&DM_GREYALTERNATE ))
SkinDrawGlyph( pc.hdcMem, &clRect, rcPaint, "CL,ID=Background,Type=Control" );
}
else if ( paintMode&DM_CLASSIC)
{
- if ( !_DrawNonEnginedBackground( hWnd, pc.hdcMem, rcPaint, clRect, dat ) )
+ if ( !_DrawNonEnginedBackground( hWnd, pc.hdcMem, rcPaint, clRect, dat ))
{
HBRUSH hBrush = CreateSolidBrush( pc.tmpbkcolour );
FillRect( pc.hdcMem, rcPaint, hBrush );
@@ -1995,12 +1995,12 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo // Store pos
Drawing->pos_indent = free_row_rc.left;
- ZeroMemory( &Drawing->pos_check, sizeof( Drawing->pos_check ) );
- ZeroMemory( &Drawing->pos_avatar, sizeof( Drawing->pos_avatar ) );
- ZeroMemory( &Drawing->pos_icon, sizeof( Drawing->pos_icon ) );
- ZeroMemory( &Drawing->pos_label, sizeof( Drawing->pos_label ) );
- ZeroMemory( &Drawing->pos_rename_rect, sizeof( Drawing->pos_rename_rect ) );
- ZeroMemory( &Drawing->pos_extra, sizeof( Drawing->pos_extra ) );
+ ZeroMemory( &Drawing->pos_check, sizeof( Drawing->pos_check ));
+ ZeroMemory( &Drawing->pos_avatar, sizeof( Drawing->pos_avatar ));
+ ZeroMemory( &Drawing->pos_icon, sizeof( Drawing->pos_icon ));
+ ZeroMemory( &Drawing->pos_label, sizeof( Drawing->pos_label ));
+ ZeroMemory( &Drawing->pos_rename_rect, sizeof( Drawing->pos_rename_rect ));
+ ZeroMemory( &Drawing->pos_extra, sizeof( Drawing->pos_extra ));
// **** Draw Background
@@ -2015,10 +2015,10 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo else
SkinDrawGlyph( pc.hdcMem, &row_rc, rcPaint, "CL,ID=GreyAlternate" );
}
- if ( ! (paintMode&(DM_CLASSIC|DM_CONTROL) ) )
+ if ( ! (paintMode&(DM_CLASSIC|DM_CONTROL)) )
{
// Row background
- if ( !(paintMode&DM_CONTROL) )
+ if ( !(paintMode&DM_CONTROL))
{ //Build mpRequest string
mpRequest = _GetCLCContactRowBackModernMask( group, Drawing, indent, line_num, selected, hottrack, dat );
{
@@ -2065,7 +2065,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo int checkboxWidth;
if ( ( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
- ( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ) )
+ ( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ))
checkboxWidth = dat->checkboxSize+2;
else checkboxWidth = 0;
//background
@@ -2077,10 +2077,10 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo {
int i = y;
int row_height = row_rc.bottom-row_rc.top;
- for ( i = y; i<y+row_height; i+= max( dat->row_min_heigh, 1 ) )
+ for ( i = y; i<y+row_height; i+= max( dat->row_min_heigh, 1 ))
{
ImageList_DrawEx( dat->himlHighlight, 0, pc.hdcMem, 0, i, clRect.right,
- min( y+row_height-i, max( dat->row_min_heigh, 1 ) ), CLR_NONE, CLR_NONE,
+ min( y+row_height-i, max( dat->row_min_heigh, 1 )), CLR_NONE, CLR_NONE,
dat->exStyle&CLS_EX_NOTRANSLUCENTSEL?ILD_NORMAL:ILD_BLEND25 );
}
SetTextColor( pc.hdcMem, paintMode&DM_CONTROL ? GetSysColor( COLOR_HIGHLIGHTTEXT ) : dat->selTextColour );
@@ -2091,7 +2091,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo {
int i;
int row_height = row_rc.bottom-row_rc.top-1;
- for ( i = y+1; i<y+row_height; i+= max( dat->row_min_heigh, 1 ) )
+ for ( i = y+1; i<y+row_height; i+= max( dat->row_min_heigh, 1 ))
{
ImageList_DrawEx( dat->himlHighlight, 0, pc.hdcMem, 1, i, clRect.right-2,
min( y+row_height-i, max( dat->row_min_heigh, 1 )), CLR_NONE, CLR_NONE,
@@ -2107,7 +2107,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo // **** Checkboxes
if ( ( lStyle&CLS_CHECKBOXES && Drawing->type == CLCIT_CONTACT ) ||
( lStyle&CLS_GROUPCHECKBOXES && Drawing->type == CLCIT_GROUP ) ||
- ( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ) )
+ ( Drawing->type == CLCIT_INFO && Drawing->flags&CLCIIF_CHECKBOX ))
{
//RECT rc;
rc = free_row_rc;
@@ -2117,10 +2117,10 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo if ( dat->text_rtl != 0 ) _RTLRect( &rc, free_row_rc.right, 0 );
- if ( xpt_IsThemed( dat->hCheckBoxTheme ) ) {
+ if ( xpt_IsThemed( dat->hCheckBoxTheme )) {
xpt_DrawThemeBackground( dat->hCheckBoxTheme, pc.hdcMem, BP_CHECKBOX, Drawing->flags&CONTACTF_CHECKED?( hottrack?CBS_CHECKEDHOT:CBS_CHECKEDNORMAL ):( hottrack?CBS_UNCHECKEDHOT:CBS_UNCHECKEDNORMAL ), &rc, &rc );
}
- else DrawFrameControl( pc.hdcMem, &rc, DFC_BUTTON, DFCS_BUTTONCHECK|DFCS_FLAT|( Drawing->flags&CONTACTF_CHECKED?DFCS_CHECKED:0 )|( hottrack?DFCS_HOT:0 ) );
+ else DrawFrameControl( pc.hdcMem, &rc, DFC_BUTTON, DFCS_BUTTONCHECK|DFCS_FLAT|( Drawing->flags&CONTACTF_CHECKED?DFCS_CHECKED:0 )|( hottrack?DFCS_HOT:0 ));
left_pos += dat->checkboxSize + EXTRA_CHECKBOX_SPACE + HORIZONTAL_SPACE;
free_row_rc.left = row_rc.left + left_pos;
@@ -2154,7 +2154,7 @@ void CLCPaint::_DrawLines( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMo y += dat->row_heights[line_num];
//increment by subcontacts
if ( ( group->cl.items && group->scanIndex<group->cl.count && group->cl.items[group->scanIndex]->subcontacts != NULL && group->cl.items[group->scanIndex]->type != CLCIT_GROUP )
- && ( group->cl.items[group->scanIndex]->SubExpanded && dat->expandMeta ) )
+ && ( group->cl.items[group->scanIndex]->SubExpanded && dat->expandMeta ))
{
if ( subindex<group->cl.items[group->scanIndex]->SubAllocated-1 )
subindex++;
@@ -2219,7 +2219,7 @@ void CLCPaint::_DrawInsertionMark( struct ClcData * dat, RECT& clRect, _PaintCon void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int paintMode, RECT* rcPaint, RECT& clRect, _PaintContext& pc )
{
- if ( !( paintMode&DM_GRAY ) && ( paintMode & DM_DRAW_OFFSCREEN ) )
+ if ( !( paintMode&DM_GRAY ) && ( paintMode & DM_DRAW_OFFSCREEN ))
{
BitBlt( hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem, rcPaint->left, rcPaint->top, SRCCOPY );
}
@@ -2227,7 +2227,7 @@ void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int p if ( ( paintMode&DM_GRAY ) && hdc && hdc != pc.hdcMem )
{
BLENDFUNCTION bf = {AC_SRC_OVER, 0, 80, AC_SRC_ALPHA };
- BOOL a = ( ( paintMode&DM_GRAY ) && ( ( paintMode&DM_NON_LAYERED) ) );
+ BOOL a = ( ( paintMode&DM_GRAY ) && ( ( paintMode&DM_NON_LAYERED)) );
ske_AlphaBlend( a ? pc.hdcMem2 : hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, bf );
if ( a )
BitBlt( hdc, rcPaint->left, rcPaint->top, rcPaint->right-rcPaint->left, rcPaint->bottom-rcPaint->top, pc.hdcMem2, rcPaint->left, rcPaint->top, SRCCOPY );
@@ -2236,7 +2236,7 @@ void CLCPaint::_CopyPaintToDest( HWND hWnd, struct ClcData * dat, HDC hdc, int p void CLCPaint::_FreePaintContext( _PaintContext& pc )
{
if ( pc.hBrushAlternateGrey ) DeleteObject( pc.hBrushAlternateGrey );
- SelectObject( pc.hdcMem, (HFONT) GetStockObject( DEFAULT_GUI_FONT ) );
+ SelectObject( pc.hdcMem, (HFONT) GetStockObject( DEFAULT_GUI_FONT ));
if ( pc.fRelease&_PaintContext::release_hdcmem )
{
SelectObject( pc.hdcMem, pc.oldbmp );
@@ -2254,8 +2254,8 @@ void CLCPaint::_PaintClc( HWND hwnd, struct ClcData *dat, HDC hdc, RECT *_rcPain {
g_CluiData.t_now = time( NULL );
- if ( _rcPaint && IsRectEmpty( _rcPaint ) ) return; // check if draw area is not empty
- if ( !IsWindowVisible( hwnd ) ) return; // and window is visible
+ if ( _rcPaint && IsRectEmpty( _rcPaint )) return; // check if draw area is not empty
+ if ( !IsWindowVisible( hwnd )) return; // and window is visible
RECT clRect;
GetClientRect( hwnd, &clRect );
@@ -2338,7 +2338,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct // Now let's check what we have to draw
for ( item_iterator = 0 ; item_iterator < NUM_ITEM_TYPE && free_row_rc.left < free_row_rc.right ; item_iterator++ )
{
- if ( Drawing->ext_nItemsNum>= SIZEOF( Drawing->ext_mpItemsDesc ) ) break;
+ if ( Drawing->ext_nItemsNum>= SIZEOF( Drawing->ext_mpItemsDesc )) break;
if ( left )
item = item_iterator;
else
@@ -2391,7 +2391,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct else
{
// Has to keep the empty space??
- if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ) )
+ if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
{
// Make rectangle
rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
@@ -2436,8 +2436,8 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct RECT rc;
int iImage = -1;
BOOL has_avatar = ( ( dat->use_avatar_service && Drawing->avatar_data != NULL ) ||
- ( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE ) )
- && !( CheckMiniMode( dat, selected, hottrack ) );
+ ( !dat->use_avatar_service && Drawing->avatar_pos != AVATAR_POS_DONT_HAVE ))
+ && !( CheckMiniMode( dat, selected, hottrack ));
if ( Drawing->type == CLCIT_CONTACT
&& dat->icon_hide_on_avatar
@@ -2446,7 +2446,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct && !Drawing->image_is_special )
{
// Don't have to draw, but has to keep the empty space?
- if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ) )
+ if ( ( left && !dat->row_align_left_items_to_left ) || ( !left && !dat->row_align_right_items_to_right ))
{
rc = _GetRectangle( dat, &row_rc, &free_row_rc, &left_pos, &right_pos,
left, dat->iconXSpace, dat->iconXSpace, ICON_HEIGHT, HORIZONTAL_SPACE );
@@ -2467,7 +2467,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
&& GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons )
&& dat->avatars_overlay_type == SETTING_AVATAR_OVERLAY_TYPE_CONTACT
- ) ) )
+ )) )
{
// Don't have to draw and don't have to keep the empty space
break;
@@ -2586,7 +2586,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct SIZE third_line_text_size = {0};
SIZE space_size = {0};
SIZE counts_size = {0};
- char *szCounts = NULL;//mir_tstrdup( TEXT( "" ) );
+ char *szCounts = NULL;//mir_tstrdup( TEXT( "" ));
int free_width;
int free_height;
int max_bottom_selection_border = SELECTION_BORDER;
@@ -2700,7 +2700,7 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct }
}
- else if ( Drawing->type == CLCIT_CONTACT && !CheckMiniMode( dat, selected, hottrack ) )
+ else if ( Drawing->type == CLCIT_CONTACT && !CheckMiniMode( dat, selected, hottrack ))
{
int tmp;
PDNCE pdnce = ( PDNCE )( ( Drawing->type == CLCIT_CONTACT )?pcli->pfnGetCacheEntry( Drawing->hContact ):NULL );
@@ -2733,9 +2733,9 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct text_rc.bottom = text_rc.top + free_row_rc.bottom - free_row_rc.top - free_height;
if ( dat->text_align_right )
- text_rc.left = max( free_row_rc.left, min( text_rc.left, free_row_rc.right - second_line_text_size.cx ) );
+ text_rc.left = max( free_row_rc.left, min( text_rc.left, free_row_rc.right - second_line_text_size.cx ));
else
- text_rc.right = min( free_row_rc.right, max( text_rc.right, free_row_rc.left + second_line_text_size.cx ) );
+ text_rc.right = min( free_row_rc.right, max( text_rc.right, free_row_rc.left + second_line_text_size.cx ));
selection_text_rc.top = text_rc.top;
selection_text_rc.bottom = min( selection_text_rc.bottom, selection_text_rc.top + text_size.cy );
@@ -2770,9 +2770,9 @@ void CLCPaint::_CalcItemsPos( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct text_rc.bottom = text_rc.top + free_row_rc.bottom - free_row_rc.top - free_height;
if ( dat->text_align_right )
- text_rc.left = max( free_row_rc.left, min( text_rc.left, free_row_rc.right - third_line_text_size.cx ) );
+ text_rc.left = max( free_row_rc.left, min( text_rc.left, free_row_rc.right - third_line_text_size.cx ));
else
- text_rc.right = min( free_row_rc.right, max( text_rc.right, free_row_rc.left + third_line_text_size.cx ) );
+ text_rc.right = min( free_row_rc.right, max( text_rc.right, free_row_rc.left + third_line_text_size.cx ));
selection_text_rc.top = text_rc.top;
selection_text_rc.bottom = min( selection_text_rc.bottom, selection_text_rc.top + text_size.cy );
@@ -2957,17 +2957,17 @@ void CLCPaint::_GetBlendMode( IN struct ClcData *dat, IN struct ClcContact * Dra int mode;
int BlendedInActiveState = ( dat->dbbBlendInActiveState );
int BlendValue = dat->dbbBlend25 ? ILD_BLEND25 : ILD_BLEND50;
- if ( selected && ( bFlag&GIM_SELECTED_AFFECT ) )
+ if ( selected && ( bFlag&GIM_SELECTED_AFFECT ))
{
colourFg = dat->selBkColour;
mode = BlendedInActiveState?ILD_NORMAL:ILD_SELECTED;
}
- else if ( hottrack && ( bFlag&GIM_HOT_AFFECT ) )
+ else if ( hottrack && ( bFlag&GIM_HOT_AFFECT ))
{
mode = BlendedInActiveState?ILD_NORMAL:ILD_FOCUS;
colourFg = dat->hotTextColour;
}
- else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST && ( bFlag&GIM_TEMP_AFFECT ) )
+ else if ( Drawing->type == CLCIT_CONTACT && Drawing->flags&CONTACTF_NOTONLIST && ( bFlag&GIM_TEMP_AFFECT ))
{
colourFg = dat->fontModernInfo[FONTID_NOTONLIST].colour;
mode = BlendValue;
@@ -3000,7 +3000,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo int overlayIdx = -1;
int blendmode = 255;
if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
- && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ) )
+ && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
switch( dat->avatars_overlay_type )
{
@@ -3009,7 +3009,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo break;
case SETTING_AVATAR_OVERLAY_TYPE_PROTOCOL:
overlayIdx = ExtIconFromStatusMode( Drawing->hContact, Drawing->proto,
- Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ) );
+ Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ));
break;
case SETTING_AVATAR_OVERLAY_TYPE_CONTACT:
overlayIdx = Drawing->iImage;
@@ -3034,7 +3034,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo if ( dat->avatars_use_custom_corner_size )
round_radius = dat->avatars_custom_corner_size;
else
- round_radius = min( _rcWidth( prcItem ), _rcHeight( prcItem ) ) / 5;
+ round_radius = min( _rcWidth( prcItem ), _rcHeight( prcItem )) / 5;
}
// draw borders
if ( dat->avatars_draw_border )
@@ -3072,7 +3072,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo DeleteObject( rgn );
// Draw overlays
if ( dat->avatars_draw_overlay && dat->avatars_maxheight_size >= ICON_HEIGHT + ( dat->avatars_draw_border ? 2 : 0 )
- && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ) )
+ && GetContactCachedStatus( Drawing->hContact ) - ID_STATUS_OFFLINE < MAX_REGS( g_pAvatarOverlayIcons ))
{
POINT ptOverlay = { prcItem->right-ICON_HEIGHT, prcItem->bottom-ICON_HEIGHT };
if ( dat->avatars_draw_border )
@@ -3096,7 +3096,7 @@ void CLCPaint::_DrawContactAvatar( HDC hdcMem, struct ClcData *dat, struct ClcCo int item;
item = ExtIconFromStatusMode( Drawing->hContact, Drawing->proto,
- Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ) );
+ Drawing->proto == NULL ? ID_STATUS_OFFLINE : GetContactCachedStatus( Drawing->hContact ));
if ( item != -1 )
_DrawStatusIcon( Drawing, dat, item, hdcMem,
ptOverlay.x, ptOverlay.y, ICON_HEIGHT, ICON_HEIGHT,
@@ -3281,12 +3281,12 @@ void CLCPaint::_DrawContactLine( HDC hdcMem, struct ClcData *dat, struct ClcCont { //Subtract icon rect from left and right.
RECT rcTemp;
IntersectRect( &rcTemp, &Drawing->pos_icon, &rc1 );
- if ( !IsRectEmpty( &rcTemp ) ) rc1.right = rcTemp.left;
+ if ( !IsRectEmpty( &rcTemp )) rc1.right = rcTemp.left;
IntersectRect( &rcTemp, &Drawing->pos_icon, &rc2 );
- if ( !IsRectEmpty( &rcTemp ) ) rc2.left = rcTemp.right;
+ if ( !IsRectEmpty( &rcTemp )) rc2.left = rcTemp.right;
}
- if ( rc1.right-rc1.left>= 6 && !IsRectEmpty( &rc1 ) )
+ if ( rc1.right-rc1.left>= 6 && !IsRectEmpty( &rc1 ))
{
DrawEdge( hdcMem, &rc1, BDR_SUNKENOUTER, BF_RECT );
ske_SetRectOpaque( hdcMem, &rc1 );
@@ -3295,7 +3295,7 @@ void CLCPaint::_DrawContactLine( HDC hdcMem, struct ClcData *dat, struct ClcCont RECT rcTemp = rc2;
IntersectRect( &rc2, &rcTemp, rcPaint );
}
- if ( rc2.right-rc2.left>= 6 && !IsRectEmpty( &rc2 ) )
+ if ( rc2.right-rc2.left>= 6 && !IsRectEmpty( &rc2 ))
{
DrawEdge( hdcMem, &rc2, BDR_SUNKENOUTER, BF_RECT );
ske_SetRectOpaque( hdcMem, &rc2 );
@@ -3322,7 +3322,7 @@ void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, struct ClcData *dat, st for ( i = 0; i<Drawing->ext_nItemsNum; i++ )
{
RECT * prcItem = &( Drawing->ext_mpItemsDesc[i].itemRect );
- if ( __IsVisible( rcPaint, prcItem ) || ( Drawing->ext_mpItemsDesc[i].itemType == CIT_AVATAR && Drawing->avatar_pos == AVATAR_POS_ANIMATED ) )
+ if ( __IsVisible( rcPaint, prcItem ) || ( Drawing->ext_mpItemsDesc[i].itemType == CIT_AVATAR && Drawing->avatar_pos == AVATAR_POS_ANIMATED ))
{
switch( Drawing->ext_mpItemsDesc[i].itemType )
{
@@ -3357,13 +3357,13 @@ void CLCPaint::_DrawContactItems( HWND hwnd, HDC hdcMem, struct ClcData *dat, st }
}
if ( ( Drawing->type == CLCIT_GROUP && dat->exStyle&CLS_EX_LINEWITHGROUPS )
- ||( Drawing->type == CLCIT_DIVIDER ) )
+ ||( Drawing->type == CLCIT_DIVIDER ))
_DrawContactLine( hdcMem, dat, Drawing, free_row_rc, rcPaint, text_rc );
}
void CLCPaint::_PaintRowItems ( HWND hwnd, HDC hdcMem, struct ClcData *dat, struct ClcContact *Drawing, RECT row_rc, RECT free_row_rc, int left_pos, int right_pos, int selected, int hottrack, RECT *rcPaint )
{
//Extended LAYOUT
- if ( gl_RowRoot && ( dat->hWnd == pcli->hwndContactTree ) )
+ if ( gl_RowRoot && ( dat->hWnd == pcli->hwndContactTree ))
{
_PaintRowItemsEx( hwnd, hdcMem, dat, Drawing, row_rc, free_row_rc, left_pos, right_pos, selected, hottrack, rcPaint );
ske_ResetTextEffect( hdcMem );
diff --git a/plugins/Clist_modern/modern_clcutils.cpp b/plugins/Clist_modern/modern_clcutils.cpp index 5ba8924e8c..33830c6e63 100644 --- a/plugins/Clist_modern/modern_clcutils.cpp +++ b/plugins/Clist_modern/modern_clcutils.cpp @@ -75,7 +75,7 @@ int cliHitTest(HWND hwnd,struct ClcData *dat,int testx,int testy,struct ClcConta /////////
if ( ((testx<hitcontact->pos_indent) && !dat->text_rtl) ||
- ((testx>clRect.right-hitcontact->pos_indent) && dat->text_rtl) )
+ ((testx>clRect.right-hitcontact->pos_indent) && dat->text_rtl))
{
if(flags) *flags|=CLCHT_ONITEMINDENT;
return hit;
@@ -159,7 +159,7 @@ void cliScrollTo(HWND hwnd,struct ClcData *dat,int desty,int noSmooth) | GetKeyState( VK_PRIOR )
| GetKeyState( VK_NEXT )
| GetKeyState( VK_HOME )
- | GetKeyState( VK_END ) ) & 0x8000 );
+ | GetKeyState( VK_END )) & 0x8000 );
if (!noSmooth && !keyDown)
{
diff --git a/plugins/Clist_modern/modern_clistevents.cpp b/plugins/Clist_modern/modern_clistevents.cpp index 1c938a83aa..8f3f667d85 100644 --- a/plugins/Clist_modern/modern_clistevents.cpp +++ b/plugins/Clist_modern/modern_clistevents.cpp @@ -115,7 +115,7 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle) mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA | MIIM_BITMAP | MIIM_ID;
if (p->cle.pszService && ( !strncmp("SRMsg/ReadMessage", p->cle.pszService, SIZEOF("SRMsg/ReadMessage"))
- || !strncmp("GChat/DblClickEvent", p->cle.pszService, SIZEOF("GChat/DblClickEvent")) ))
+ || !strncmp("GChat/DblClickEvent", p->cle.pszService, SIZEOF("GChat/DblClickEvent"))))
{
// dup check only for msg events
diff --git a/plugins/Clist_modern/modern_clistmod.cpp b/plugins/Clist_modern/modern_clistmod.cpp index baa92d5e95..64143550da 100644 --- a/plugins/Clist_modern/modern_clistmod.cpp +++ b/plugins/Clist_modern/modern_clistmod.cpp @@ -357,7 +357,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) { if (IsIconic(hWnd) || !IsWindowVisible(hWnd))
return GWVS_HIDDEN;
- else if ( ModernGetSettingByte(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT) || !ModernGetSettingByte(NULL, "CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT) )
+ else if ( ModernGetSettingByte(NULL,"CList","OnDesktop",SETTING_ONDESKTOP_DEFAULT) || !ModernGetSettingByte(NULL, "CList", "BringToFront", SETTING_BRINGTOFRONT_DEFAULT))
return GWVS_VISIBLE;
else if ( hwndFocused == pcli->hwndContactList || GetParent(hwndFocused) == pcli->hwndContactList )
return GWVS_VISIBLE;
@@ -513,7 +513,7 @@ int cliShowHide(WPARAM wParam,LPARAM lParam) return 0;
}
- if ( (bShow == TRUE || lParam == 1) )
+ if ( (bShow == TRUE || lParam == 1))
{
Sync( CLUIFrames_ActivateSubContainers, TRUE );
CLUI_ShowWindowMod(pcli->hwndContactList, SW_RESTORE);
diff --git a/plugins/Clist_modern/modern_clistopts.cpp b/plugins/Clist_modern/modern_clistopts.cpp index e16323619c..198678312b 100644 --- a/plugins/Clist_modern/modern_clistopts.cpp +++ b/plugins/Clist_modern/modern_clistopts.cpp @@ -419,7 +419,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_SIZE_PIXELS3),FALSE);
EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), FALSE );
}
- if ( !IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ) )
+ if ( !IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ))
{
EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), FALSE );
}
@@ -481,7 +481,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_WIDTH_SPIN),enabled);
EnableWindow(GetDlgItem(hwndDlg,IDC_AVATAR_SIZE_PIXELS),enabled);
- EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), enabled && IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ) );
+ EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), enabled && IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ));
// }
// else
// {
@@ -492,7 +492,7 @@ static INT_PTR CALLBACK DlgProcItemAvatarOpts(HWND hwndDlg, UINT msg, WPARAM wPa }
else if (LOWORD(wParam)==IDC_SHOW_ANIAVATARS)
{
- EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ) );
+ EnableWindow( GetDlgItem( hwndDlg, IDC_AVATAR_FASTDRAW), IsDlgButtonChecked( hwndDlg, IDC_SHOW_ANIAVATARS ));
}
else if (LOWORD(wParam)==IDC_AVATAR_DRAW_BORDER)
diff --git a/plugins/Clist_modern/modern_clui.cpp b/plugins/Clist_modern/modern_clui.cpp index 914c0e240b..5929ecfc87 100644 --- a/plugins/Clist_modern/modern_clui.cpp +++ b/plugins/Clist_modern/modern_clui.cpp @@ -176,14 +176,14 @@ int CLUI::OnEvent_DBSettingChanging(WPARAM wParam,LPARAM lParam) if (dbcws==NULL) return(0);
if (MirandaExiting()) return 0;
- if ( ( dbcws->value.type==DBVT_WORD && !mir_strcmp(dbcws->szSetting,"ApparentMode") ) ||
+ if ( ( dbcws->value.type==DBVT_WORD && !mir_strcmp(dbcws->szSetting,"ApparentMode")) ||
( dbcws->value.type==DBVT_ASCIIZ &&
( ( !mir_strcmp(dbcws->szSetting,"e-mail") ||
!mir_strcmp(dbcws->szSetting,"Mye-mail0") ||
- !mir_strcmp(dbcws->szSetting,"Cellular") ) ||
+ !mir_strcmp(dbcws->szSetting,"Cellular")) ||
( !mir_strcmp(dbcws->szModule,"UserInfo") &&
( !mir_strcmp(dbcws->szSetting,"MyPhone0") ||
- !mir_strcmp(dbcws->szSetting,"Mye-mail0") ) ) ) ) )
+ !mir_strcmp(dbcws->szSetting,"Mye-mail0")) )) ))
ExtraImage_SetAllExtraIcons(pcli->hwndContactTree,(HANDLE)wParam);
return(0);
};
@@ -393,7 +393,7 @@ HRESULT CLUI::FillAlphaChannel( HDC hDC, RECT * prcParent, BYTE bAlpha) RECT rcBounds;
GetRgnBox(hRgn,&rcBounds);
- if ( IsRectEmpty(&rcBounds) )
+ if ( IsRectEmpty(&rcBounds))
{
DeleteObject(hRgn);
return S_FALSE;
@@ -528,7 +528,7 @@ int CLUI_ShowWindowMod(HWND hWnd, int nCmd) {
int res=0;
- if (hWnd==pcli->hwndContactList && (nCmd==SW_HIDE || nCmd==SW_MINIMIZE) )
+ if (hWnd==pcli->hwndContactList && (nCmd==SW_HIDE || nCmd==SW_MINIMIZE))
{
AniAva_InvalidateAvatarPositions(NULL);
AniAva_RemoveInvalidatedAvatars();
@@ -1862,7 +1862,7 @@ HANDLE RegisterIcolibIconHandle(char * szIcoID, char *szSectionName, char * szD {
sid.pszDefaultFile = NULL;
sid.iDefaultIndex = 0;
- sid.hDefaultIcon = LoadSmallIcon( hDefaultModuleInst, MAKEINTRESOURCE(iDefaultResource) );
+ sid.hDefaultIcon = LoadSmallIcon( hDefaultModuleInst, MAKEINTRESOURCE(iDefaultResource));
}
hIcolibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
if ( sid.hDefaultIcon ) DestroyIcon(sid.hDefaultIcon);
@@ -1874,7 +1874,7 @@ LRESULT CLUI::PreProcessWndProc( UINT msg, WPARAM wParam, LPARAM lParam, BOOL& b {
// proxy CLUI Messages
LRESULT result = 0;
- if ( ProcessCLUIFrameInternalMsg( m_hWnd, msg, wParam, lParam, result ) )
+ if ( ProcessCLUIFrameInternalMsg( m_hWnd, msg, wParam, lParam, result ))
{
bHandled = TRUE;
return result;
@@ -2168,9 +2168,9 @@ LRESULT CLUI::OnUpdate( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ ) }
LRESULT CLUI::OnInitMenu( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
{
- if ( !CLUI::IsMainMenuInited() )
+ if ( !CLUI::IsMainMenuInited())
{
- if ( ServiceExists( MS_CLIST_MENUBUILDMAIN ) ) CallService( MS_CLIST_MENUBUILDMAIN, 0, 0 );
+ if ( ServiceExists( MS_CLIST_MENUBUILDMAIN )) CallService( MS_CLIST_MENUBUILDMAIN, 0, 0 );
CLUI::m_fMainMenuInited = TRUE;
}
return FALSE;
@@ -2178,7 +2178,7 @@ LRESULT CLUI::OnInitMenu( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ ) LRESULT CLUI::OnNcPaint( UINT msg, WPARAM wParam, LPARAM lParam )
{
int lRes = DefWindowProc( m_hWnd, msg, wParam, lParam );
- if ( !g_CluiData.fLayered && ModernGetSettingByte( NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT ) )
+ if ( !g_CluiData.fLayered && ModernGetSettingByte( NULL,"CLUI","ShowMainMenu",SETTING_SHOWMAINMENU_DEFAULT ))
{
HDC hdc = NULL;
if ( msg == WM_PRINT ) hdc=(HDC)wParam;
@@ -2300,7 +2300,7 @@ LRESULT CLUI::OnSetAllExtraIcons( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lPar LRESULT CLUI::OnCreateClc( UINT /*msg*/, WPARAM /*wParam*/, LPARAM /*lParam*/ )
{
CreateCLC();
- if ( ModernGetSettingByte( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ) )
+ if ( ModernGetSettingByte( NULL, "CList", "ShowOnStart", SETTING_SHOWONSTART_DEFAULT ))
cliShowHide( (WPARAM) m_hWnd, (LPARAM)TRUE );
PostMessage( pcli->hwndContactTree, CLM_AUTOREBUILD, 0, 0 );
@@ -2313,7 +2313,7 @@ LRESULT CLUI::OnLButtonDown( UINT msg, WPARAM wParam, LPARAM lParam ) pt.y = (short)HIWORD(lParam);
ClientToScreen( m_hWnd, &pt );
- if ( CLUI_SizingOnBorder( pt, 1 ) )
+ if ( CLUI_SizingOnBorder( pt, 1 ))
{
mutex_bIgnoreActivation = TRUE;
return FALSE;
@@ -2334,7 +2334,7 @@ LRESULT CLUI::OnParentNotify( UINT msg, WPARAM wParam, LPARAM lParam ) wParam = 0;
lParam = 0;
- if ( CLUI_SizingOnBorder( pt,1 ) )
+ if ( CLUI_SizingOnBorder( pt,1 ))
{
mutex_bIgnoreActivation = TRUE;
return 0;
@@ -2346,7 +2346,7 @@ LRESULT CLUI::OnParentNotify( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT CLUI::OnSetFocus( UINT msg, WPARAM wParam, LPARAM lParam )
{
- if ( hFrameContactTree && ( !CallService( MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM( FO_FLOATING, hFrameContactTree ), 0 ) ) )
+ if ( hFrameContactTree && ( !CallService( MS_CLIST_FRAMES_GETFRAMEOPTIONS, MAKEWPARAM( FO_FLOATING, hFrameContactTree ), 0 )) )
{
SetFocus(pcli->hwndContactTree);
}
@@ -2488,7 +2488,7 @@ LRESULT CLUI::OnUpdateBringTimer( UINT msg, WPARAM wParam, LPARAM lParam ) LRESULT CLUI::OnTimer( UINT msg, WPARAM wParam, LPARAM lParam )
{
- if ( MirandaExiting() ) return FALSE;
+ if ( MirandaExiting()) return FALSE;
if ( (int)wParam >= TM_STATUSBARUPDATE && (int)wParam<=TM_STATUSBARUPDATE+64 )
{
@@ -2623,7 +2623,7 @@ LRESULT CLUI::OnNcHitTest( UINT msg, WPARAM wParam, LPARAM lParam ) if ( (g_CluiData.fAutoSize) && ( result == HTSIZE || result == HTTOP ||
result == HTTOPLEFT || result == HTTOPRIGHT ||
result==HTBOTTOM || result==HTBOTTOMRIGHT ||
- result==HTBOTTOMLEFT) )
+ result==HTBOTTOMLEFT))
return HTCLIENT;
if (result==HTMENU)
@@ -2744,7 +2744,7 @@ LRESULT CLUI::OnListSizeChangeNotify( NMCLISTCONTROL * pnmc ) rcWindow=rcSizingRect;
else
GetWindowRect(m_hWnd,&rcWindow);
- if ( !g_CluiData.fAutoSize || pcli->hwndContactTree==0 || CallService(MS_CLIST_DOCKINGISDOCKED,0,0) )
+ if ( !g_CluiData.fAutoSize || pcli->hwndContactTree==0 || CallService(MS_CLIST_DOCKINGISDOCKED,0,0))
return FALSE;
maxHeight=ModernGetSettingByte(NULL,"CLUI","MaxSizeHeight",SETTING_MAXSIZEHEIGHT_DEFAULT);
@@ -2928,7 +2928,7 @@ LRESULT CLUI::OnContextMenu( UINT msg, WPARAM wParam, LPARAM lParam ) pt.y = rc.top + (rc.bottom - rc.top) / 2;
}
}
- if(PtInRect( &rc ,pt ) )
+ if(PtInRect( &rc ,pt ))
{
HMENU hMenu;
hMenu=(HMENU)CallService(MS_CLIST_MENUBUILDGROUP,0,0);
@@ -2954,7 +2954,7 @@ LRESULT CLUI::OnMeasureItem( UINT msg, WPARAM wParam, LPARAM lParam ) HDC hdc;
SIZE textSize;
hdc=GetDC( m_hWnd );
- GetTextExtentPoint32A( hdc, Translate("Status"), lstrlenA( Translate( "Status" ) ), &textSize );
+ GetTextExtentPoint32A( hdc, Translate("Status"), lstrlenA( Translate( "Status" )), &textSize );
pmis->itemWidth = textSize.cx;
pmis->itemHeight = 0;
ReleaseDC( m_hWnd, hdc );
@@ -2988,7 +2988,7 @@ LRESULT CLUI::OnDrawItem( UINT msg, WPARAM wParam, LPARAM lParam ) int y = (dis->rcItem.bottom + dis->rcItem.top - GetSystemMetrics(SM_CYSMICON)) / 2 + offset;
DrawState( dis->hDC, NULL, NULL, (LPARAM)hIcon, 0, x, y , 0 , 0 ,
- DST_ICON | ( dis->itemState & ODS_INACTIVE && (((FALSE))) ? DSS_DISABLED : DSS_NORMAL ) );
+ DST_ICON | ( dis->itemState & ODS_INACTIVE && (((FALSE))) ? DSS_DISABLED : DSS_NORMAL ));
CallService(MS_SKIN2_RELEASEICON, (WPARAM)hIcon, 0);
nMirMenuState=dis->itemState;
diff --git a/plugins/Clist_modern/modern_cluiframes.cpp b/plugins/Clist_modern/modern_cluiframes.cpp index ee88e5a4de..aef631a26a 100644 --- a/plugins/Clist_modern/modern_cluiframes.cpp +++ b/plugins/Clist_modern/modern_cluiframes.cpp @@ -296,7 +296,7 @@ static FRAMEWND* FindFrameByWnd( HWND hwnd ) if ( hwnd == NULL ) return( NULL );
for(i=0;i<g_nFramesCount;i++)
- if ((g_pfwFrames[i].floating)&&(g_pfwFrames[i].ContainerWnd==hwnd) )
+ if ((g_pfwFrames[i].floating)&&(g_pfwFrames[i].ContainerWnd==hwnd))
return(&g_pfwFrames[i]);
return( NULL);
@@ -351,7 +351,7 @@ FRAMEWND * FindFrameByItsHWND(HWND FrameHwnd) static void DockThumbs( FRAMEWND *pThumbLeft, FRAMEWND *pThumbRight, BOOL bMoveLeft )
{
- if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ) )
+ if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ))
{
pThumbRight->dockOpt.hwndLeft = pThumbLeft->ContainerWnd;
pThumbLeft->dockOpt.hwndRight = pThumbRight->ContainerWnd;
@@ -361,7 +361,7 @@ static void DockThumbs( FRAMEWND *pThumbLeft, FRAMEWND *pThumbRight, BOOL bMoveL static void UndockThumbs( FRAMEWND *pThumb1, FRAMEWND *pThumb2 )
{
- if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ) )
+ if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ))
{
return;
}
@@ -432,7 +432,7 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY ) if ( bMoveTogether )
{
- UndockThumbs( pThumb, FindFrameByWnd( pThumb->dockOpt.hwndLeft ) );
+ UndockThumbs( pThumb, FindFrameByWnd( pThumb->dockOpt.hwndLeft ));
GetWindowRect( pThumb->ContainerWnd, &rcOld );
}
@@ -487,23 +487,23 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY ) pt.y = rcThumb.top;
bDocked = FALSE;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right;
bDocked = TRUE;
}
- if ( PtInRect( &rcBottom, pt ) )
+ if ( PtInRect( &rcBottom, pt ))
{
nNewY = rc.bottom;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
{
nNewX = rc.left;
}
}
- if ( PtInRect( &rcTop, pt ) )
+ if ( PtInRect( &rcTop, pt ))
{
nNewY = rc.top;
bDockedLeft = bDocked;
@@ -514,7 +514,7 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY ) pt.y = rcThumb.top;
bDocked = FALSE;
- if ( !bLeading && PtInRect( &rcLeft, pt ) )
+ if ( !bLeading && PtInRect( &rcLeft, pt ))
{
if ( !bDockedLeft )
{
@@ -528,17 +528,17 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY ) }
- if ( PtInRect( &rcBottom, pt ) )
+ if ( PtInRect( &rcBottom, pt ))
{
nNewY = rc.bottom;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right - nWidth;
}
}
- if ( !bLeading && PtInRect( &rcTop, pt ) )
+ if ( !bLeading && PtInRect( &rcTop, pt ))
{
nNewY = rc.top;
bDockedRight = bDocked;
@@ -561,16 +561,16 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY ) pt.x = rcThumb.left;
pt.y = rcThumb.bottom;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right;
}
- if ( PtInRect( &rcTop, pt ) )
+ if ( PtInRect( &rcTop, pt ))
{
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
{
nNewX = rc.left;
}
@@ -581,16 +581,16 @@ static void PositionThumb( FRAMEWND *pThumb, short nX, short nY ) pt.x = rcThumb.right;
pt.y = rcThumb.bottom;
- if ( !bLeading && PtInRect( &rcLeft, pt ) )
+ if ( !bLeading && PtInRect( &rcLeft, pt ))
{
nNewX = rc.left - nWidth;
}
- if ( !bLeading && PtInRect( &rcTop, pt ) )
+ if ( !bLeading && PtInRect( &rcTop, pt ))
{
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right - nWidth;
}
@@ -748,7 +748,7 @@ static int LocateStorePosition(int Frameid,int maxstored) mir_snprintf(settingname,SIZEOF(settingname),"Name%d",i);
DBVARIANT dbv={0};
- if ( ModernGetSettingTString( NULL, CLUIFrameModule, settingname, &dbv ) )
+ if ( ModernGetSettingTString( NULL, CLUIFrameModule, settingname, &dbv ))
continue;
if ( lstrcmpi( dbv.ptszVal, g_pfwFrames[Frameid].Name ) ==0 )
@@ -2164,7 +2164,7 @@ static int CLUIFrameMoveResize(const FRAMEWND *Frame) ClientToScreen(pcli->hwndContactList,&Off);
GetWindowRect(pcli->hwndContactList,&pr);
- if ( Frame->visible && (!Frame->collapsed || Frame->wndSize.bottom-Frame->wndSize.top == 0) )
+ if ( Frame->visible && (!Frame->collapsed || Frame->wndSize.bottom-Frame->wndSize.top == 0))
{
ShowWindowAsync( Frame->OwnerWindow, SW_HIDE );
ShowWindowAsync( Frame->hWnd, SW_HIDE );
@@ -2260,7 +2260,7 @@ int CLUIFrames_GetTotalHeight() sumheight+=g_CluiData.TopClientMargin;
sumheight+=g_CluiData.BottomClientMargin;
return max(ModernGetSettingWord(NULL,"CLUI","MinHeight",SETTING_MINHEIGTH_DEFAULT),
- (sumheight+border.top+border.bottom) );
+ (sumheight+border.top+border.bottom));
}
int CLUIFramesGetMinHeight()
@@ -2476,7 +2476,7 @@ int CLUIFrames_ApplyNewSizes(int mode) for(i=0;i<g_nFramesCount;i++) {
if ( (mode==1 && g_pfwFrames[i].OwnerWindow!=(HWND)-2 && g_pfwFrames[i].OwnerWindow) ||
(mode==2 && g_pfwFrames[i].OwnerWindow==(HWND)-2) ||
- (mode==3) )
+ (mode==3))
if (g_pfwFrames[i].floating){
CLUIFrameResizeFloatingFrame(i);
}else
@@ -3089,11 +3089,11 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam if (ServiceExists(MO_CREATENEWMENUOBJECT))
{
- //if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid) ){break;};
- if (ProcessCommandProxy(MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid) ) break;
+ //if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid)){break;};
+ if (ProcessCommandProxy(MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid)) break;
}else
{
- if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),MPCF_CONTEXTFRAMEMENU),(LPARAM)Frameid) ){break;};
+ if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),MPCF_CONTEXTFRAMEMENU),(LPARAM)Frameid)){break;};
};
@@ -3147,15 +3147,15 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam if (g_pfwFrames[framepos].visible)
{AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_visible,TranslateT("Visible"));}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_visible,TranslateT("Visible") );};
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_visible,TranslateT("Visible"));};
if (g_pfwFrames[framepos].TitleBar.ShowTitleBar)
- {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_showtitlebar,TranslateT("Show TitleBar") );}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_showtitlebar,TranslateT("Show TitleBar") );};
+ {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_showtitlebar,TranslateT("Show TitleBar"));}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_showtitlebar,TranslateT("Show TitleBar"));};
if (g_pfwFrames[framepos].floating)
- {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_floating,TranslateT("Floating") );}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_floating,TranslateT("Floating") );};
+ {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_floating,TranslateT("Floating"));}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_floating,TranslateT("Floating"));};
//err=GetMenuItemCount(hmenu)
@@ -3322,7 +3322,7 @@ static LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam //IntersectRect( &rcOverlap, &rcwnd, &rcMiranda )
- if (!IntersectRect( &rcOverlap, &rcwnd, &rcMiranda ) )
+ if (!IntersectRect( &rcOverlap, &rcwnd, &rcMiranda ))
{
GetCursorPos(&curpt);
GetWindowRect( g_pfwFrames[pos].hWnd, &rcwnd );
@@ -3790,7 +3790,7 @@ static LRESULT CALLBACK CLUIFrameContainerWndProc(HWND hwnd, UINT msg, WPARAM wP //IntersectRect( &rcOverlap, &rcwnd, &rcMiranda )
- if (IntersectRect( &rcOverlap, &rcwnd, &rcMiranda ) )
+ if (IntersectRect( &rcOverlap, &rcwnd, &rcMiranda ))
{
GetCursorPos(&curpt);
GetWindowRect( g_pfwFrames[framepos].hWnd, &rcwnd );
diff --git a/plugins/Clist_modern/modern_contact.cpp b/plugins/Clist_modern/modern_contact.cpp index 23e98b695a..d8613d9a06 100644 --- a/plugins/Clist_modern/modern_contact.cpp +++ b/plugins/Clist_modern/modern_contact.cpp @@ -214,6 +214,6 @@ INT_PTR SetUseGroups(WPARAM wParam, LPARAM lParam) INT_PTR ToggleSounds(WPARAM wParam,LPARAM lParam)
{
ModernWriteSettingByte(NULL, "Skin", "UseSound",
- (BYTE) !ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );
+ (BYTE) !ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
return 0;
}
diff --git a/plugins/Clist_modern/modern_extraimage.cpp b/plugins/Clist_modern/modern_extraimage.cpp index 6f145d3c79..71433e4123 100644 --- a/plugins/Clist_modern/modern_extraimage.cpp +++ b/plugins/Clist_modern/modern_extraimage.cpp @@ -299,7 +299,7 @@ void ExtraImage_SetAllExtraIcons(HWND hwndList,HANDLE hContact) w1=ExtraImage_ExtraIDToColumnNum(EXTRA_ICON_WEB);
c1=ExtraImage_ExtraIDToColumnNum(EXTRA_ICON_CLIENT);
- memset( ImgIndex, 0, sizeof( ImgIndex ) );
+ memset( ImgIndex, 0, sizeof( ImgIndex ));
ProtoEnumAccounts( &count, &accs );
maxpr=0;
//calc only needed protocols
diff --git a/plugins/Clist_modern/modern_image_array.cpp b/plugins/Clist_modern/modern_image_array.cpp index f8381ad9e6..1c055e9357 100644 --- a/plugins/Clist_modern/modern_image_array.cpp +++ b/plugins/Clist_modern/modern_image_array.cpp @@ -56,7 +56,7 @@ static BOOL ImageArray_Alloc(LP_IMAGE_ARRAY_DATA iad, int size) }
iad->nodes = tmp;
- memset( &iad->nodes[iad->nodes_allocated_size], 0, (size_grow - iad->nodes_allocated_size) * sizeof(IMAGE_ARRAY_DATA_NODE) );
+ memset( &iad->nodes[iad->nodes_allocated_size], 0, (size_grow - iad->nodes_allocated_size) * sizeof(IMAGE_ARRAY_DATA_NODE));
}
else
{
diff --git a/plugins/Clist_modern/modern_rowtemplateopt.cpp b/plugins/Clist_modern/modern_rowtemplateopt.cpp index 756382b0f8..fd183b2c64 100644 --- a/plugins/Clist_modern/modern_rowtemplateopt.cpp +++ b/plugins/Clist_modern/modern_rowtemplateopt.cpp @@ -255,7 +255,7 @@ void rowOptAddContainer(HWND htree, HTREEITEM hti) {
int i = 0;
- ZeroMemory( rowOptTA, sizeof( rowOptTA ) );
+ ZeroMemory( rowOptTA, sizeof( rowOptTA ));
rowOptBuildTA(rowOptTmplRoot, (pROWCELL*)&rowOptTA, &i);
}
@@ -305,7 +305,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti) {
int i = 0;
- ZeroMemory( rowOptTA, sizeof( rowOptTA ) );
+ ZeroMemory( rowOptTA, sizeof( rowOptTA ));
rowOptBuildTA( (pROWCELL)tvpi.lParam, (pROWCELL*)&rowOptTA, &i );
}
@@ -315,7 +315,7 @@ void rowOptDelContainer(HWND htree, HTREEITEM hti) // Change icon at parent item
if (!prnt || (prnt!=prev)) return;
- if ( TreeView_GetChild(htree, prnt) )
+ if ( TreeView_GetChild(htree, prnt))
{
tvpi.iImage = 1;
tvpi.iSelectedImage = 0;
@@ -435,7 +435,7 @@ INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM rowOptTmplRoot = NULL;
rowParse(rowOptTmplRoot, rowOptTmplRoot, rowOptTmplStr, hbuf, seq, rowOptTA);
seq = 0;
- ZeroMemory( rowOptTA, sizeof( rowOptTA ) );
+ ZeroMemory( rowOptTA, sizeof( rowOptTA ));
rowOptBuildTA(rowOptTmplRoot, (pROWCELL*)&rowOptTA, &seq);
rowOptFillRowTree(htree);
diff --git a/plugins/Clist_modern/modern_skinbutton.cpp b/plugins/Clist_modern/modern_skinbutton.cpp index cfbfa23b7e..0f74b5a9d2 100644 --- a/plugins/Clist_modern/modern_skinbutton.cpp +++ b/plugins/Clist_modern/modern_skinbutton.cpp @@ -502,7 +502,7 @@ static LRESULT CALLBACK ModernSkinButtonWndProc(HWND hwndDlg, UINT msg, WPARAM if (bct->CommandService)
{
- if (!_CallServiceStrParams(bct->CommandService, NULL)&& (bct->ValueDBSection && bct->ValueTypeDef) )
+ if (!_CallServiceStrParams(bct->CommandService, NULL)&& (bct->ValueDBSection && bct->ValueTypeDef))
ModernSkinButtonToggleDBValue(bct->ValueDBSection,bct->ValueTypeDef);
}
bct->down=0;
@@ -746,7 +746,7 @@ int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT * r) GetWindowRect(parent,&rc);
else
rc=*r;
- if (g_CluiData.fLayered && ( draw & SBRF_DO_ALT_DRAW ) )
+ if (g_CluiData.fLayered && ( draw & SBRF_DO_ALT_DRAW ))
{
int sx,sy;
sx=rd.right-rd.left;
@@ -790,7 +790,7 @@ int ModernSkinButton_ReposButtons(HWND parent, BYTE draw, RECT * r) SetWindowPos(Buttons[i].hwnd,HWND_TOP,l,t,r-l,b-t,0);
if ( (rc.right-rc.left<Buttons[i].minW /*&& Buttons[i].minW!=0*/)
- ||(rc.bottom-rc.top<Buttons[i].minH /*&& Buttons[i].minH!=0*/) )
+ ||(rc.bottom-rc.top<Buttons[i].minH /*&& Buttons[i].minH!=0*/))
CLUI_ShowWindowMod(Buttons[i].hwnd,SW_HIDE);
else
CLUI_ShowWindowMod(Buttons[i].hwnd,SW_SHOW);
diff --git a/plugins/Clist_modern/modern_skinengine.cpp b/plugins/Clist_modern/modern_skinengine.cpp index 487285304e..7753867a9f 100644 --- a/plugins/Clist_modern/modern_skinengine.cpp +++ b/plugins/Clist_modern/modern_skinengine.cpp @@ -126,14 +126,14 @@ IniParser::IniParser( TCHAR * tcsFileName, BYTE flags ) : _Flags( flags ) _DoInit();
if ( !tcsFileName ) return;
- if ( tcsFileName[0] == _T('%') )
+ if ( tcsFileName[0] == _T('%'))
{
//TODO: Add parser of resource filename here
_LoadResourceIni( g_hInst, MAKEINTRESOURCEA(IDR_MSF_DEFAULT_SKIN), "MSF");
return;
}
- _hFile = _tfopen( tcsFileName, _T("r") );
+ _hFile = _tfopen( tcsFileName, _T("r"));
if ( _hFile != NULL )
{
@@ -188,9 +188,9 @@ HRESULT IniParser::WriteStrToDb( const char * szSection, const char * szName, co if ( This->_SecCheck)
{
//TODO check security here
- if ( wildcmp( szSection,"Skin_Description_Section",1 ) ) return S_OK;
+ if ( wildcmp( szSection,"Skin_Description_Section",1 )) return S_OK;
}
- if ( ( This->_Flags == IniParser::FLAG_ONLY_OBJECTS ) && !wildcmp( szSection, DEFAULTSKINSECTION,1 ) )
+ if ( ( This->_Flags == IniParser::FLAG_ONLY_OBJECTS ) && !wildcmp( szSection, DEFAULTSKINSECTION,1 ))
return S_OK; // skip not objects
@@ -249,7 +249,7 @@ int IniParser::GetSkinFolder( IN const TCHAR * szFileName, OUT TCHAR * pszFolder szBuff = mir_tstrdup( szFileName );
pszPos = szBuff + _tcslen( szBuff );
- while ( pszPos > szBuff && *pszPos!= _T('.') ) { pszPos--; }
+ while ( pszPos > szBuff && *pszPos!= _T('.')) { pszPos--; }
*pszPos=_T('\0');
_tcscpy( pszFolderName, szBuff );
@@ -258,7 +258,7 @@ int IniParser::GetSkinFolder( IN const TCHAR * szFileName, OUT TCHAR * pszFolder TCHAR *b3;
_tcscpy( custom_folder, pszFolderName );
b3=custom_folder + _tcslen( custom_folder );
- while ( b3 > custom_folder && *b3!= _T('\\') ) { b3--; }
+ while ( b3 > custom_folder && *b3!= _T('\\')) { b3--; }
*b3=_T('\0');
GetPrivateProfileString(_T("Skin_Description_Section"),_T("SkinFolder"),_T(""),cus,SIZEOF(custom_folder),szFileName);
@@ -316,7 +316,7 @@ HRESULT IniParser::_DoParseFile() if ( len > 0 )
{
pLine[len]='\0';
- if ( !_DoParseLine( pLine ) ) return E_FAIL;
+ if ( !_DoParseLine( pLine )) return E_FAIL;
}
else
_nLine++;
@@ -348,7 +348,7 @@ HRESULT IniParser::_DoParseResource() if ( len > 0 )
{
pLine[len]='\0';
- if ( !_DoParseLine( pLine ) ) return E_FAIL;
+ if ( !_DoParseLine( pLine )) return E_FAIL;
}
else
_nLine++;
@@ -361,7 +361,7 @@ const char * IniParser::_RemoveTailings( const char * szLine, size_t& len ) const char * pStart = szLine;
while( *pStart == ' ' || *pStart=='\t' ) pStart++; //skip spaces at begin
const char * pEnd = pStart + strlen( pStart );
- while( pEnd > pStart && ( *pEnd == ' ' || *pEnd == '\t' || *pEnd == '\n' || *pEnd == '\r' ) ) pEnd--;
+ while( pEnd > pStart && ( *pEnd == ' ' || *pEnd == '\t' || *pEnd == '\n' || *pEnd == '\r' )) pEnd--;
len = pEnd - pStart;
return pStart;
@@ -1709,7 +1709,7 @@ INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam) if (gl->hGlyph==NULL && gl->hGlyph!=(HBITMAP)-1 &&
( (gl->Style&7)==ST_IMAGE
||(gl->Style&7)==ST_FRAGMENT
- ||(gl->Style&7)==ST_SOLARIZE ) )
+ ||(gl->Style&7)==ST_SOLARIZE ))
if (gl->szFileName)
{
gl->hGlyph=ske_LoadGlyphImage(gl->szFileName);
@@ -2377,7 +2377,7 @@ static int ske_GetSkinFromDB(char * szSection, SKINOBJECTSLIST * Skin) Skin->pMaskList=(LISTMODERNMASK*)mir_alloc(sizeof(LISTMODERNMASK));
memset(Skin->pMaskList,0,sizeof(LISTMODERNMASK));
Skin->szSkinPlace= ModernGetStringA(NULL,SKIN,"SkinFolder");
- if (!Skin->szSkinPlace || (strchr(Skin->szSkinPlace, '%') && !ModernGetSettingByte(NULL,SKIN,"Modified",0)) )
+ if (!Skin->szSkinPlace || (strchr(Skin->szSkinPlace, '%') && !ModernGetSettingByte(NULL,SKIN,"Modified",0)))
{
BOOL bOnlyObjects=FALSE;
if (Skin->szSkinPlace && strchr(Skin->szSkinPlace, '%'))
@@ -2611,7 +2611,7 @@ static int ske_LoadSkinFromResource(BOOL bOnlyObjects) {
IniParser parser(g_hInst, MAKEINTRESOURCEA(IDR_MSF_DEFAULT_SKIN), "MSF", bOnlyObjects ? IniParser::FLAG_ONLY_OBJECTS : IniParser::FLAG_WITH_SETTINGS );
- if ( !parser.CheckOK() ) return 0;
+ if ( !parser.CheckOK()) return 0;
ske_DeleteAllSettingInSection("ModernSkin");
ModernWriteSettingString(NULL,SKIN,"SkinFolder","%Default%");
@@ -2629,7 +2629,7 @@ int ske_LoadSkinFromIniFile(TCHAR * szFileName, BOOL bOnlyObjects) return ske_LoadSkinFromResource( bOnlyObjects );
IniParser parser( szFileName, bOnlyObjects ? IniParser::FLAG_ONLY_OBJECTS : IniParser::FLAG_WITH_SETTINGS );
- if ( !parser.CheckOK() ) return 0;
+ if ( !parser.CheckOK()) return 0;
ske_DeleteAllSettingInSection("ModernSkin");
IniParser::GetSkinFolder(szFileName,skinFolder);
@@ -2958,7 +2958,7 @@ static BOOL ske_DrawTextEffect(BYTE* destPt,BYTE* maskPt, DWORD width, DWORD hei static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRect, UINT format, DWORD ARGBcolor)
{
- if ( !( lpString && lpRect ) )
+ if ( !( lpString && lpRect ))
{
DebugBreak();
return 0;
@@ -2980,7 +2980,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec for ( int i = 0; i < 256; i++ )
{
- gammaTbl[i]= (BYTE)( 255 * pow( (double)i / 255, gammaCfPw ) );
+ gammaTbl[i]= (BYTE)( 255 * pow( (double)i / 255, gammaCfPw ));
blueMulTbl[i] = i * blueCf;
redMulTbl[i] = i * redCf;
greenMulTbl[i] = i * greenCf;
@@ -3054,9 +3054,9 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec // replace end of string by elipsis
bNeedFreeWorkString = TRUE;
- lpWorkString = (TCHAR*) malloc( ( visibleCharCount + 4) * sizeof(TCHAR) );
+ lpWorkString = (TCHAR*) malloc( ( visibleCharCount + 4) * sizeof(TCHAR));
- memcpy( (void*) lpWorkString, lpString, visibleCharCount * sizeof(TCHAR) );
+ memcpy( (void*) lpWorkString, lpString, visibleCharCount * sizeof(TCHAR));
memcpy( (void*) ( lpWorkString + visibleCharCount ), _T("..."), 4 * sizeof(TCHAR)); // 3 + 1
nCount = visibleCharCount + 3;
@@ -3070,7 +3070,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec if ( workRectWidth > textSize.cx )
{
- if ( format & ( DT_RIGHT | DT_RTLREADING ) )
+ if ( format & ( DT_RIGHT | DT_RTLREADING ))
{
drx = workRectWidth - textSize.cx;
}
@@ -3124,8 +3124,8 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec HDC bufDC = CreateCompatibleDC( hDC );
HBITMAP bufoldbmp = (HBITMAP)SelectObject( bufDC, bufbmp );
HFONT hOldBufFont = (HFONT)SelectObject( bufDC, hFont );
- SetBkColor( bufDC, RGB( 0, 0, 0 ) );
- SetTextColor( bufDC,RGB(255,255,255) );
+ SetBkColor( bufDC, RGB( 0, 0, 0 ));
+ SetTextColor( bufDC,RGB(255,255,255));
// Copy from destination to temp buffer
BitBlt( hOffscreenDC, 0, 0, textSize.cx, textSize.cy, hDC, workRect.left + drx - 2, workRect.top + dry - 2, SRCCOPY );
@@ -3134,7 +3134,7 @@ static int ske_AlphaTextOut (HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRec TextOut( bufDC, 2, 2, lpWorkString, nCount);
MODERNEFFECT effect;
- if (ske_GetTextEffect( hDC, &effect ) )
+ if (ske_GetTextEffect( hDC, &effect ))
ske_DrawTextEffect( bits, bufbits, textSize.cx, textSize.cy, &effect );
//RenderText
@@ -3255,7 +3255,7 @@ static int ske_DrawTextWithEffectWorker( HDC hdc, LPCTSTR lpString, int nCount, INT_PTR ske_Service_DrawTextWithEffect( WPARAM wParam, LPARAM lParam )
{
DrawTextWithEffectParam * p = ( DrawTextWithEffectParam * ) wParam;
- if ( p->cbSize != sizeof(DrawTextWithEffectParam) )
+ if ( p->cbSize != sizeof(DrawTextWithEffectParam))
return FALSE;
return ske_DrawTextWithEffectWorker( p->hdc, p->lpchText, p->cchText, p->lprc, p->dwDTFormat, p->pEffect );
}
@@ -3422,7 +3422,7 @@ BOOL ske_DrawIconEx(HDC hdcDst,int xLeft,int yTop,HICON hIcon,int cxWidth,int cy BYTE hasalpha=FALSE;
alpha=alpha?alpha:255;
- if ( g_CluiData.fDisableSkinEngine && !(diFlags&0x80) )
+ if ( g_CluiData.fDisableSkinEngine && !(diFlags&0x80))
return DrawIconEx(hdcDst,xLeft,yTop,hIcon,cxWidth,cyWidth,istepIfAniCur,hbrFlickerFreeDraw,diFlags&0xFFFF7F);
if (!GetIconInfo(hIcon,&ici)) return 0;
@@ -3618,7 +3618,7 @@ int ske_RedrawCompleteWindow() static INT_PTR ske_Service_UpdateFrameImage(WPARAM wParam, LPARAM lParam) // Immideately recall paint routines for frame and refresh image
{
- if ( MirandaLoading() ) return 0;
+ if ( MirandaLoading()) return 0;
RECT wnd;
FRAMEWND *frm;
@@ -3671,7 +3671,7 @@ static INT_PTR ske_Service_UpdateFrameImage(WPARAM wParam, LPARAM lParam) }
static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) // Post request for updating
{
- if ( MirandaLoading() ) return 0;
+ if ( MirandaLoading()) return 0;
if (wParam)
{
FRAMEWND *frm=FindFrameByItsHWND((HWND)wParam);
@@ -3692,7 +3692,7 @@ static INT_PTR ske_Service_InvalidateFrameImage(WPARAM wParam, LPARAM lParam) RECT rcUpdate;
GetClientRect(frm->hWnd,&rcClient);
IntersectRect( &rcUpdate, &rcClient, &pr->rcUpdate );
- if ( IsRectEmpty( &rcUpdate ) )
+ if ( IsRectEmpty( &rcUpdate ))
return 0;
r2=CreateRectRgn( rcUpdate.left, rcUpdate.top, rcUpdate.right, rcUpdate.bottom );
}
@@ -4801,7 +4801,7 @@ BOOL SkinDBGetContactSetting(HANDLE hContact, const char* szSection, const char* if (!hContact) { //only for not contact settings
char * szSkinKey;
NEWJOINEDSTR(szSkinKey,szSection,"@",szKey);
- if ( !ModernGetSetting(hContact, SKINSETSECTION, szSkinKey, retdbv) ) {
+ if ( !ModernGetSetting(hContact, SKINSETSECTION, szSkinKey, retdbv)) {
if (bSkined) *bSkined=TRUE;
return FALSE;
} }
diff --git a/plugins/Clist_modern/modern_skinopt.cpp b/plugins/Clist_modern/modern_skinopt.cpp index 6a2296b287..3bd9650748 100644 --- a/plugins/Clist_modern/modern_skinopt.cpp +++ b/plugins/Clist_modern/modern_skinopt.cpp @@ -55,7 +55,7 @@ int SkinOptInit( WPARAM wParam, LPARAM lParam ) if ( !g_CluiData.fDisableSkinEngine )
{
//Tabbed settings
- ZeroMemory( &odp, sizeof( odp ) );
+ ZeroMemory( &odp, sizeof( odp ));
odp.cbSize = sizeof( odp );
odp.position = -200000000;
odp.hInstance = g_hInst;
@@ -115,7 +115,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara case WM_COMMAND:
{
int isLoad = 0;
- switch ( LOWORD( wParam ) )
+ switch ( LOWORD( wParam ))
{
case IDC_COLOUR_MENUNORMAL:
case IDC_COLOUR_MENUSELECTED:
@@ -132,7 +132,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TCHAR Description[400];
TCHAR text[2000];
SkinListData *sd = NULL;
- HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ) );
+ HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ));
if ( hti == 0 ) return 0;
{
TVITEM tvi = {0};
@@ -142,7 +142,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara sd = ( SkinListData* )( tvi.lParam );
}
if ( !sd ) return 0;
- if ( sd->File && !_tcschr( sd->File, _T('%') ) )
+ if ( sd->File && !_tcschr( sd->File, _T('%')) )
{
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "Author" ), TranslateT( "( unknown )" ), Author, SIZEOF( Author ), sd->File );
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "URL" ), _T( "" ), URL, SIZEOF( URL ), sd->File );
@@ -159,7 +159,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TranslateT( "Angeli-Ka (graphics), FYR (template)" ),
_T( "JID: fyr@jabber.ru" ),
_T("fyr.mirandaim.ru"),
- TranslateT( "Inside library" ) );
+ TranslateT( "Inside library" ));
}
MessageBox( hwndDlg, text, TranslateT( "Skin Information" ), MB_OK|MB_ICONINFORMATION );
}
@@ -168,7 +168,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara if ( HIWORD( wParam ) == BN_CLICKED )
{
SkinListData *sd = NULL;
- HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ) );
+ HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ));
if ( hti == 0 ) return 0;
{
TVITEM tvi = {0};
@@ -202,10 +202,10 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara }
if ( g_hCLUIOptionsWnd )
{
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT ) );
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT ));
}
}
break;
@@ -261,7 +261,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara HBITMAP hbmp, holdbmp, imgOldbmp;
int mWidth, mHeight;
RECT workRect = {0};
- HBRUSH hbr = CreateSolidBrush( GetSysColor( COLOR_3DFACE ) );
+ HBRUSH hbr = CreateSolidBrush( GetSysColor( COLOR_3DFACE ));
DRAWITEMSTRUCT *dis = ( DRAWITEMSTRUCT * )lParam;
mWidth = dis->rcItem.right-dis->rcItem.left;
mHeight = dis->rcItem.bottom-dis->rcItem.top;
@@ -363,7 +363,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TCHAR Description[400];
TCHAR text[2000];
SkinListData* sd = NULL;
- HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ) );
+ HTREEITEM hti = TreeView_GetSelection( GetDlgItem( hwndDlg, IDC_TREE1 ));
if ( hti == 0 ) return 0;
{
TVITEM tvi = {0};
@@ -374,7 +374,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara }
if ( !sd ) return 0;
- if ( sd->File && !_tcschr( sd->File, _T('%') ) )
+ if ( sd->File && !_tcschr( sd->File, _T('%')) )
{
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "Author" ), TranslateT( "( unknown )" ), Author, SIZEOF( Author ), sd->File );
GetPrivateProfileString( _T( "Skin_Description_Section" ), _T( "URL" ), _T( "" ), URL, SIZEOF( URL ), sd->File );
@@ -390,7 +390,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TranslateT( "This is second default Modern Contact list skin in Vista Aero style" ),
TranslateT( "graphics by Angeli-Ka\ntemplate by FYR" ),
_T("JID: fyr@jabber.ru"),
- _T("fyr.mirandaim.ru") );
+ _T("fyr.mirandaim.ru"));
}
ShowWindow( GetDlgItem( hwndDlg, IDC_PREVIEW ), SW_HIDE );
ShowWindow( GetDlgItem( hwndDlg, IDC_STATIC_INFO ), SW_SHOW );
@@ -400,10 +400,10 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara else
{
//no selected
- SendDlgItemMessage( hwndDlg, IDC_EDIT_SKIN_FILENAME, WM_SETTEXT, 0, ( LPARAM )TranslateT( "Select skin from list" ) );
+ SendDlgItemMessage( hwndDlg, IDC_EDIT_SKIN_FILENAME, WM_SETTEXT, 0, ( LPARAM )TranslateT( "Select skin from list" ));
EnableWindow( GetDlgItem( hwndDlg, IDC_BUTTON_APPLY_SKIN ), FALSE );
EnableWindow( GetDlgItem( hwndDlg, IDC_BUTTON_INFO ), FALSE );
- SendDlgItemMessage( hwndDlg, IDC_STATIC_INFO, WM_SETTEXT, 0, ( LPARAM )TranslateT( "Please select skin to apply" ) );
+ SendDlgItemMessage( hwndDlg, IDC_STATIC_INFO, WM_SETTEXT, 0, ( LPARAM )TranslateT( "Please select skin to apply" ));
ShowWindow( GetDlgItem( hwndDlg, IDC_PREVIEW ), SW_HIDE );
}
ShowWindow( GetDlgItem( hwndDlg, IDC_PREVIEW ), hPreviewBitmap?SW_SHOW:SW_HIDE );
@@ -451,20 +451,20 @@ int SearchSkinFiles( HWND hwndDlg, TCHAR * Folder ) {
do {
AddSkinToList( hwndDlg, Folder, fd.name );
- }while ( !_tfindnext( hFile, &fd ) );
+ }while ( !_tfindnext( hFile, &fd ));
_findclose( hFile );
}
_sntprintf( mask, SIZEOF( mask ), _T("%s\\*"), Folder );
hFile = _tfindfirst( mask, &fd );
{
do {
- if ( fd.attrib&_A_SUBDIR && !( _tcsicmp( fd.name, _T(".")) ==0 ||_tcsicmp( fd.name, _T("..") )==0 ) )
+ if ( fd.attrib&_A_SUBDIR && !( _tcsicmp( fd.name, _T(".")) ==0 ||_tcsicmp( fd.name, _T(".."))==0 ))
{//Next level of subfolders
TCHAR path[MAX_PATH];
_sntprintf( path, SIZEOF( path ), _T("%s\\%s"), Folder, fd.name );
SearchSkinFiles( hwndDlg, path );
}
- }while ( !_tfindnext( hFile, &fd ) );
+ }while ( !_tfindnext( hFile, &fd ));
_findclose( hFile );
}
return 0;
@@ -477,14 +477,14 @@ HTREEITEM FillAvailableSkinList( HWND hwndDlg ) TCHAR path[MAX_PATH];//, mask[MAX_PATH];
int attrib;
TCHAR *SkinsFolder = ModernGetStringT( NULL, "ModernData", "SkinsFolder" );
- if ( !SkinsFolder ) SkinsFolder = mir_tstrdup( _T("Skins") );
+ if ( !SkinsFolder ) SkinsFolder = mir_tstrdup( _T("Skins"));
CallService( MS_UTILS_PATHTOABSOLUTET, ( WPARAM )SkinsFolder, ( LPARAM )path );
mir_free_and_nill( SkinsFolder );
- AddSkinToList( hwndDlg, TranslateT( "Default Skin" ), _T("%Default Skin%") );
+ AddSkinToList( hwndDlg, TranslateT( "Default Skin" ), _T("%Default Skin%"));
attrib = GetFileAttributes( path );
- if ( attrib != INVALID_FILE_ATTRIBUTES && ( attrib & FILE_ATTRIBUTE_DIRECTORY ) )
+ if ( attrib != INVALID_FILE_ATTRIBUTES && ( attrib & FILE_ATTRIBUTE_DIRECTORY ))
SearchSkinFiles( hwndDlg, path );
{
TCHAR * skinfile;
@@ -505,11 +505,11 @@ HTREEITEM AddSkinToListFullName( HWND hwndDlg, TCHAR * fullName ) TCHAR path[MAX_PATH] = {0};
TCHAR file[MAX_PATH] = {0};
TCHAR *buf;
- _tcsncpy( path, fullName, SIZEOF( path ) );
+ _tcsncpy( path, fullName, SIZEOF( path ));
buf = path + _tcslen( path );
while ( buf > path )
{
- if ( *buf == _T( '\\' ) )
+ if ( *buf == _T( '\\' ))
{
*buf = _T( '\0' );
break;
@@ -517,7 +517,7 @@ HTREEITEM AddSkinToListFullName( HWND hwndDlg, TCHAR * fullName ) buf--;
}
buf++;
- _tcsncpy( file, buf, SIZEOF( file ) );
+ _tcsncpy( file, buf, SIZEOF( file ));
return AddSkinToList( hwndDlg, path, file );
}
@@ -533,16 +533,16 @@ HTREEITEM AddSkinToList( HWND hwndDlg, TCHAR * path, TCHAR* file ) TCHAR fullName[MAX_PATH] = {0};
TCHAR defskinname[MAX_PATH] = {0};
SkinListData * sd = NULL;
- sd = ( SkinListData * )mir_alloc( sizeof( SkinListData ) );
+ sd = ( SkinListData * )mir_alloc( sizeof( SkinListData ));
if ( !sd ) return 0;
_sntprintf( fullName, SIZEOF( fullName ), _T("%s\\%s"), path, file );
- memmove( defskinname, file, (_tcslen( file )-4) * sizeof(TCHAR) );
+ memmove( defskinname, file, (_tcslen( file )-4) * sizeof(TCHAR));
defskinname[_tcslen( file )+1] = _T('\0');
- if ( !file || _tcschr( file, _T('%') ) )
+ if ( !file || _tcschr( file, _T('%')) )
{
//sd->File = "%Default Skin%";
- _sntprintf( sd->File, MAX_PATH, _T("%%Default Skin%%") );
- _sntprintf( sd->Name, 100, TranslateT( "%Default Skin%" ) );
+ _sntprintf( sd->File, MAX_PATH, _T("%%Default Skin%%"));
+ _sntprintf( sd->Name, 100, TranslateT( "%Default Skin%" ));
return AddItemToTree( GetDlgItem( hwndDlg, IDC_TREE1 ), TranslateT( "Default Skin" ), sd->Name, sd );
}
else
@@ -584,7 +584,7 @@ HTREEITEM FindChild( HWND hTree, HTREEITEM Parent, TCHAR * Caption, void * data TreeView_GetItem( hTree, &tvi );
sd = ( SkinListData* )( tvi.lParam );
if ( sd )
- if ( !_tcsicmp( sd->File, ( ( SkinListData* )data )->File ) )
+ if ( !_tcsicmp( sd->File, ( ( SkinListData* )data )->File ))
return tmp;
}
else
@@ -606,8 +606,8 @@ HTREEITEM AddItemToTree( HWND hTree, TCHAR * folder, TCHAR * itemName, void * da BOOL ext = FALSE;
CallService( MS_UTILS_PATHTORELATIVET, ( WPARAM )folder, ( LPARAM )path );
ptrE = path;
- while ( *ptrE != _T('\\') && *ptrE != _T('\0') && *ptrE != _T(':') ) ptrE++;
- if ( *ptrE == _T('\\') )
+ while ( *ptrE != _T('\\') && *ptrE != _T('\0') && *ptrE != _T(':')) ptrE++;
+ if ( *ptrE == _T('\\'))
{
*ptrE = _T('\0');
ptrE++;
@@ -617,8 +617,8 @@ HTREEITEM AddItemToTree( HWND hTree, TCHAR * folder, TCHAR * itemName, void * da do
{
- while ( *ptrE!= _T('\\') && *ptrE!= _T('\0') ) ptrE++;
- if ( *ptrE == _T('\\') )
+ while ( *ptrE!= _T('\\') && *ptrE!= _T('\0')) ptrE++;
+ if ( *ptrE == _T('\\'))
{
*ptrE = _T('\0');
ptrE++;
@@ -708,10 +708,10 @@ INT_PTR SvcApplySkin(WPARAM wParam, LPARAM lParam) }
if ( g_hCLUIOptionsWnd )
{
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT ) );
- SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT ) );
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_LEFTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "LeftClientMargin", SETTING_LEFTCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_RIGHTMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "RightClientMargin", SETTING_RIGHTCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_TOPMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "TopClientMargin", SETTING_TOPCLIENTMARIGN_DEFAULT ));
+ SendDlgItemMessage( g_hCLUIOptionsWnd, IDC_BOTTOMMARGINSPIN, UDM_SETPOS, 0, ModernGetSettingByte( NULL, "CLUI", "BottomClientMargin", SETTING_BOTTOMCLIENTMARIGN_DEFAULT ));
}
return 0;
}
diff --git a/plugins/Clist_modern/modern_skinselector.cpp b/plugins/Clist_modern/modern_skinselector.cpp index 2540790d53..fcd430fb56 100644 --- a/plugins/Clist_modern/modern_skinselector.cpp +++ b/plugins/Clist_modern/modern_skinselector.cpp @@ -82,7 +82,7 @@ BOOL wildcmpi(TCHAR* name, TCHAR* mask) if (*mask == '\0') return ((BOOL)!*mask); /* true */
}
if (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
- if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name) ) name -= (size_t)(mask - last) - 1, mask = last;
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) name -= (size_t)(mask - last) - 1, mask = last;
}
}
@@ -103,7 +103,7 @@ BOOL wildcmpi(char * name, char * mask) if (*mask == '\0') return ((BOOL)!*mask); /* true */
}
if (*name == '\0') return ((BOOL)!*mask); /* *mask == EOS */
- if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name) ) name -= (size_t)(mask - last) - 1, mask = last;
+ if (*mask != '?' && _qtoupper(*mask) != _qtoupper(*name)) name -= (size_t)(mask - last) - 1, mask = last;
}
}
@@ -421,7 +421,7 @@ int ParseToModernMask(MODERNMASK * mm, char * szText) unsigned int valuelen;
int except;
- while ( _GetParamValue( szText, startPos, textLen, pszParam, paramlen, pszValue, valuelen, except) )
+ while ( _GetParamValue( szText, startPos, textLen, pszParam, paramlen, pszValue, valuelen, except))
{
if ( except & EXCEPTION_NOT_EQUAL )
param.bMaskParamFlag = MPF_NOT_EQUAL;
@@ -443,7 +443,7 @@ int ParseToModernMask(MODERNMASK * mm, char * szText) param.szValue= strdupn( pszValue, valuelen );
- if ( !(except & EXCEPTION_WILD) )
+ if ( !(except & EXCEPTION_WILD))
{
param.dwValueHash = mod_CalcHash( param.szValue );
param.bMaskParamFlag |= MPF_HASHED;
diff --git a/plugins/Clist_modern/modern_statusbar.cpp b/plugins/Clist_modern/modern_statusbar.cpp index 5e7eb0bc3b..1884cf1bd6 100644 --- a/plugins/Clist_modern/modern_statusbar.cpp +++ b/plugins/Clist_modern/modern_statusbar.cpp @@ -478,7 +478,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if ( ( ProtosData[i].showProtoName) ||
(ProtosData[i].showProtoEmails && ProtosData[i].ProtoEMailCount ) ||
(ProtosData[i].showStatusName) ||
- ((ProtosData[i].xStatusMode&8) && ProtosData[i].ProtoXStatus) )
+ ((ProtosData[i].xStatusMode&8) && ProtosData[i].ProtoXStatus))
w -= spaceWidth;
ProtosData[i].fullWidth=w;
@@ -623,7 +623,7 @@ int ModernDrawStatusBarWorker(HWND hWnd, HDC hDC) if ( ( hxIcon || hIcon) && TRUE /* TODO g_StatusBarData.bDrawLockOverlay options to draw locked proto*/ )
{
- if ( ModernGetSettingByte( NULL,ProtosData[i].AccountName,"LockMainStatus",0 ) )
+ if ( ModernGetSettingByte( NULL,ProtosData[i].AccountName,"LockMainStatus",0 ))
{
HICON hLockOverlay = LoadSkinnedIcon(SKINICON_OTHER_STATUS_LOCKED);
if (hLockOverlay != NULL)
@@ -719,7 +719,7 @@ static BOOL _ModernStatus_OnExtraIconClick( int protoIndex ) move This portion of code to related Protocols
*/
- if ( !mir_strcmpi( ProtosData[protoIndex].ProtoName, "ICQ" ) )
+ if ( !mir_strcmpi( ProtosData[protoIndex].ProtoName, "ICQ" ))
{
if ( ProtosData[protoIndex].ProtoStatus < ID_STATUS_ONLINE ) return FALSE;
@@ -740,13 +740,13 @@ static BOOL _ModernStatus_OnExtraIconClick( int protoIndex ) }
return TRUE;
}
- else if ( !mir_strcmpi( ProtosData[protoIndex].ProtoName, "JABBER" ) )
+ else if ( !mir_strcmpi( ProtosData[protoIndex].ProtoName, "JABBER" ))
{
if ( ProtosData[protoIndex].ProtoStatus < ID_STATUS_ONLINE ) return FALSE;
// Show Moods
char szService[128];
mir_snprintf(szService, SIZEOF(szService), "%s/AdvStatusSet/Mood", ProtosData[protoIndex].AccountName );
- if ( ServiceExists( szService ) )
+ if ( ServiceExists( szService ))
{
CallService( szService, 0 ,0 );
return TRUE;
@@ -987,7 +987,7 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam BOOL bShift =( GetKeyState( VK_SHIFT )&0x8000 );
BOOL bCtrl =( GetKeyState( VK_CONTROL )&0x8000 );
- if ( ( msg==WM_MBUTTONDOWN || ( msg==WM_RBUTTONDOWN && bCtrl ) || isOnExtra) && _ModernStatus_OnExtraIconClick( i ) )
+ if ( ( msg==WM_MBUTTONDOWN || ( msg==WM_RBUTTONDOWN && bCtrl ) || isOnExtra) && _ModernStatus_OnExtraIconClick( i ))
{
return TRUE;
}
@@ -1041,12 +1041,12 @@ LRESULT CALLBACK ModernStatusProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam char protoF[ sizeof(g_CluiData.protoFilter) ];
mir_snprintf( protoF, SIZEOF(protoF), "%s|", accs[i]->szModuleName );
- if ( strstri( g_CluiData.protoFilter, protoF ) )
+ if ( strstri( g_CluiData.protoFilter, protoF ))
{
char * temp = mir_utf8encodeT( accs[i]->tszAccountName );
if ( !first )
- strncat( filterName, "; ", SIZEOF(filterName) - strlen(filterName) );
- strncat( filterName, temp, SIZEOF(filterName) - strlen(filterName) );
+ strncat( filterName, "; ", SIZEOF(filterName) - strlen(filterName));
+ strncat( filterName, temp, SIZEOF(filterName) - strlen(filterName));
first = false;
mir_free( temp );
}
diff --git a/plugins/Clist_modern/modern_tbbutton.cpp b/plugins/Clist_modern/modern_tbbutton.cpp index bf0fe2add4..15bf49604e 100644 --- a/plugins/Clist_modern/modern_tbbutton.cpp +++ b/plugins/Clist_modern/modern_tbbutton.cpp @@ -309,14 +309,14 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam }
case WM_LBUTTONDOWN:
{
- int xPos=( ( int )( short ) LOWORD( lParam ) );
- int yPos=( ( int )( short ) HIWORD( lParam ) );
+ int xPos=( ( int )( short ) LOWORD( lParam ));
+ int yPos=( ( int )( short ) HIWORD( lParam ));
POINT ptMouse = { xPos, yPos };
RECT rcClient;
GetClientRect( lpSBData->hWnd, &rcClient );
- if ( !PtInRect( &rcClient, ptMouse ) )
+ if ( !PtInRect( &rcClient, ptMouse ))
{
lpSBData->fHotMark = FALSE;
ReleaseCapture();
@@ -342,14 +342,14 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam if ( GetCapture() == lpSBData->hWnd )
{
- int xPos=( ( int )( short ) LOWORD( lParam ) );
- int yPos=( ( int )( short ) HIWORD( lParam ) );
+ int xPos=( ( int )( short ) LOWORD( lParam ));
+ int yPos=( ( int )( short ) HIWORD( lParam ));
POINT ptMouse = { xPos, yPos };
RECT rcClient;
GetClientRect( lpSBData->hWnd, &rcClient );
- if ( !PtInRect( &rcClient, ptMouse ) )
+ if ( !PtInRect( &rcClient, ptMouse ))
{
lpSBData->fHotMark = FALSE;
ReleaseCapture();
@@ -449,7 +449,7 @@ static LRESULT CALLBACK TollbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam POINT pt;
GetWindowRect(hwndDlg, &rc);
GetCursorPos(&pt);
- BOOL bInside = ( PtInRect( &rc, pt ) && ( WindowFromPoint( pt ) == lpSBData->hWnd) );
+ BOOL bInside = ( PtInRect( &rc, pt ) && ( WindowFromPoint( pt ) == lpSBData->hWnd));
if ( !bInside )
{
// mouse must be gone, trigger mouse leave
@@ -622,7 +622,7 @@ static void PaintWorker(TBBUTTONDATA *lpSBData, HDC hdcPaint , POINT * pOffset) lpSBData->szButtonID, // ID
b2str(lpSBData->nStateId==PBS_HOT), // Hovered
b2str(lpSBData->nStateId==PBS_PRESSED || lpSBData->pbState == TRUE), // Pressed
- b2str(lpSBData->fFocused) ); // Focused
+ b2str(lpSBData->fFocused)); // Focused
SkinDrawGlyph(hdcMem,&rcClient,&rcClient,szRequest);
}
diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp index 50ad1064ad..7720bae7fd 100644 --- a/plugins/Clist_modern/modern_toolbar.cpp +++ b/plugins/Clist_modern/modern_toolbar.cpp @@ -250,14 +250,14 @@ static int ehhToolBarSettingsChanged( WPARAM wParam, LPARAM lParam ) if (!mir_strcmp(cws->szModule,"CList"))
{
if (!mir_strcmp(cws->szSetting,"HideOffline"))
- sttSetButtonPressed("ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) );
+ sttSetButtonPressed("ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT));
else if (!mir_strcmp(cws->szSetting,"UseGroups"))
- sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) );
+ sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
}
else if (!mir_strcmp(cws->szModule,"Skin"))
{
if (!mir_strcmp(cws->szSetting,"UseSound"))
- sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );
+ sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
}
return 0;
@@ -590,7 +590,7 @@ static void sttRegisterToolBarButton(char * pszButtonID, char * pszButtonName, static void sttSetButtonPressed( char * hButton, BOOL bPressed )
{
- CallService(MS_TB_SETBUTTONSTATEBYID, (WPARAM) hButton, (LPARAM) (bPressed ? TBST_PUSHED : TBST_RELEASED) );
+ CallService(MS_TB_SETBUTTONSTATEBYID, (WPARAM) hButton, (LPARAM) (bPressed ? TBST_PUSHED : TBST_RELEASED));
}
static void sttAddStaticSeparator( BOOL bVisibleByDefault )
{
@@ -652,9 +652,9 @@ static void sttReloadButtons() ToolBar_AddButtonToBars(mtbi);
}
tbunlock;
- sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) );
- sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) );
- sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );
+ sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT));
+ sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
+ sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
}
static int sttDBEnumProc (const char *szSetting,LPARAM lParam)
@@ -708,7 +708,7 @@ static void ToolBar_DefaultButtonRegistration() sttRegisterToolBarButton( "ShowHideOffline","Show/Hide offline contacts", MS_CLIST_TOGGLEHIDEOFFLINE,
"Hide offline contacts", "Show offline contacts", 110 /*and 111 */ , IDI_RESETVIEW, IDI_RESETVIEW, TRUE );
- sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT) );
+ sttSetButtonPressed( "ShowHideOffline", (BOOL) ModernGetSettingByte(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT));
sttRegisterToolBarButton( "DatabaseEditor","DBEditor++", "DBEditorpp/MenuCommand",
"Database Editor", NULL, 130 , IDI_RESETVIEW, IDI_RESETVIEW, TRUE );
@@ -722,12 +722,12 @@ static void ToolBar_DefaultButtonRegistration() sttRegisterToolBarButton( "UseGroups","Use/Disable groups", MS_CLIST_TOGGLEGROUPS,
"Use groups", "Disable Groups", 160 /*and 161 */ , IDI_RESETVIEW, IDI_RESETVIEW, FALSE );
- sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT) );
+ sttSetButtonPressed( "UseGroups", (BOOL) ModernGetSettingByte(NULL, "CList", "UseGroups", SETTING_USEGROUPS_DEFAULT));
sttRegisterToolBarButton( "EnableSounds","Enable/Disable sounds", MS_CLIST_TOGGLESOUNDS,
"Enable sounds", "Disable Sounds", 170 /*and 171 */ , IDI_RESETVIEW, IDI_RESETVIEW, FALSE );
- sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ) );
+ sttSetButtonPressed( "EnableSounds", (BOOL) ModernGetSettingByte(NULL, "Skin", "UseSound", SETTING_ENABLESOUNDS_DEFAULT ));
sttAddDynamicSeparator(FALSE);
@@ -777,7 +777,7 @@ static LRESULT CALLBACK ToolBar_WndProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM CLISTFrame Frame={0};
CREATESTRUCT * lpcs = (CREATESTRUCT *) lParam;
//create internal info
- MTBINFO * pMTBInfo = (MTBINFO *) mir_calloc( sizeof(MTBINFO) );
+ MTBINFO * pMTBInfo = (MTBINFO *) mir_calloc( sizeof(MTBINFO));
pMTBInfo->cbSize = sizeof(MTBINFO);
SetWindowLongPtr( hwnd, GWLP_USERDATA, (LONG_PTR) pMTBInfo );
diff --git a/plugins/Clist_mw/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/CLUIFrames/cluiframes.cpp index ab56da832d..3d5eb1d676 100644 --- a/plugins/Clist_mw/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/CLUIFrames/cluiframes.cpp @@ -293,7 +293,7 @@ static void PositionThumb( wndFrame *pThumb, short nX, short nY ) bLeading = pThumb->dockOpt.hwndRight != NULL;
if ( bMoveTogether ) {
- UndockThumbs( pThumb, FindFrameByWnd( pThumb->dockOpt.hwndLeft ) );
+ UndockThumbs( pThumb, FindFrameByWnd( pThumb->dockOpt.hwndLeft ));
GetWindowRect( pThumb->ContainerWnd, &rcOld );
}
@@ -350,7 +350,7 @@ static void PositionThumb( wndFrame *pThumb, short nX, short nY ) if ( PtInRect( &rcBottom, pt )) {
nNewY = rc.bottom;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
nNewX = rc.left;
}
@@ -401,7 +401,7 @@ static void PositionThumb( wndFrame *pThumb, short nX, short nY ) if ( PtInRect( &rcTop, pt )) {
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
nNewX = rc.left;
}
@@ -414,7 +414,7 @@ static void PositionThumb( wndFrame *pThumb, short nX, short nY ) if ( !bLeading && PtInRect( &rcTop, pt )) {
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
nNewX = rc.right - nWidth;
}
}
@@ -2226,9 +2226,9 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA case WM_COMMAND:
if ( ServiceExists(MO_CREATENEWMENUOBJECT)) {
- if (ProcessCommandProxy(MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid) ) break;
+ if (ProcessCommandProxy(MAKEWPARAM(LOWORD(wParam),0),(LPARAM)Frameid)) break;
}
- else if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),MPCF_CONTEXTFRAMEMENU),(LPARAM)Frameid) )
+ else if ( CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wParam),MPCF_CONTEXTFRAMEMENU),(LPARAM)Frameid))
break;
if (HIWORD(wParam) == 0) {//mouse events for self created menu
@@ -2278,15 +2278,15 @@ LRESULT CALLBACK CLUIFrameTitleBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA if (Frames[framepos].visible)
{AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_visible,TranslateT("Visible"));}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_visible,TranslateT("Visible") );}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_visible,TranslateT("Visible"));}
if (Frames[framepos].TitleBar.ShowTitleBar)
- {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_showtitlebar,TranslateT("Show TitleBar") );}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_showtitlebar,TranslateT("Show TitleBar") );}
+ {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_showtitlebar,TranslateT("Show TitleBar"));}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_showtitlebar,TranslateT("Show TitleBar"));}
if (Frames[framepos].floating)
- {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_floating,TranslateT("Floating") );}
- else{AppendMenu(hmenu,MF_STRING,frame_menu_floating,TranslateT("Floating") );}
+ {AppendMenu(hmenu,MF_STRING|MF_CHECKED,frame_menu_floating,TranslateT("Floating"));}
+ else{AppendMenu(hmenu,MF_STRING,frame_menu_floating,TranslateT("Floating"));}
ulockfrm();
}
diff --git a/plugins/Clist_mw/clcitems.cpp b/plugins/Clist_mw/clcitems.cpp index ae69b6ee42..0a483fb76d 100644 --- a/plugins/Clist_mw/clcitems.cpp +++ b/plugins/Clist_mw/clcitems.cpp @@ -54,7 +54,7 @@ void AddSubcontacts(struct ClcContact * cont) {
hsub = (HANDLE)CallService(MS_MC_GETSUBCONTACT,(WPARAM)cont->hContact,j);
cacheEntry = GetContactFullCacheEntry(hsub);
- if (!(DBGetContactSettingByte(NULL,"CLC","MetaHideOfflineSub",1) && DBGetContactSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT) )||
+ if (!(DBGetContactSettingByte(NULL,"CLC","MetaHideOfflineSub",1) && DBGetContactSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT))||
cacheEntry->status != ID_STATUS_OFFLINE )
{
cont->subcontacts[i].hContact = cacheEntry->hContact;
diff --git a/plugins/Clist_mw/clcpaint.cpp b/plugins/Clist_mw/clcpaint.cpp index 952ef930f2..b4fc20850f 100644 --- a/plugins/Clist_mw/clcpaint.cpp +++ b/plugins/Clist_mw/clcpaint.cpp @@ -333,7 +333,7 @@ void InternalPaintClc(HWND hwnd,struct ClcData *dat,HDC hdc,RECT *rcPaint) }
else if (Drawing->type == CLCIT_DIVIDER)
ChangeToFont(hdcMem,dat,FONTID_DIVIDERS,&fontHeight);
- else if (Drawing->type == CLCIT_CONTACT && (Drawing->flags&CONTACTF_NOTONLIST) && (!Drawing->isSubcontact) )
+ else if (Drawing->type == CLCIT_CONTACT && (Drawing->flags&CONTACTF_NOTONLIST) && (!Drawing->isSubcontact))
ChangeToFont(hdcMem,dat,FONTID_NOTONLIST,&fontHeight);
else if ( Drawing->type == CLCIT_CONTACT &&
(
diff --git a/plugins/Clist_mw/clistopts.cpp b/plugins/Clist_mw/clistopts.cpp index d2738d8aa6..b845c5a0a0 100644 --- a/plugins/Clist_mw/clistopts.cpp +++ b/plugins/Clist_mw/clistopts.cpp @@ -62,14 +62,14 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP DBCONTACTWRITESETTING * ws = (DBCONTACTWRITESETTING *)lParam;
if ( hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL
&& lstrcmpiA(ws->szModule,"CList") == 0 && lstrcmpiA(ws->szSetting,"UseGroups") == 0
- && IsWindowVisible(hwndDlg) ) {
+ && IsWindowVisible(hwndDlg)) {
CheckDlgButton(hwndDlg,IDC_DISABLEGROUPS,ws->value.bVal == 0);
}
break;
}
case WM_DESTROY:
{
- UnhookEvent( (HANDLE)GetWindowLongPtr(hwndDlg,GWLP_USERDATA) );
+ UnhookEvent( (HANDLE)GetWindowLongPtr(hwndDlg,GWLP_USERDATA));
break;
}
diff --git a/plugins/Clist_mw/clistsettings.cpp b/plugins/Clist_mw/clistsettings.cpp index 24275f4362..25206e86ba 100644 --- a/plugins/Clist_mw/clistsettings.cpp +++ b/plugins/Clist_mw/clistsettings.cpp @@ -338,10 +338,10 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) */
//name is null or (setting is myhandle)
- if (pdnce->name == NULL||(!strcmp(cws->szSetting,"MyHandle")) )
+ if (pdnce->name == NULL||(!strcmp(cws->szSetting,"MyHandle")))
InvalidateDisplayNameCacheEntryByPDNE((HANDLE)wParam,pdnce,cws->value.type);
- if ((!strcmp(cws->szSetting,"Group")) )
+ if ((!strcmp(cws->szSetting,"Group")))
InvalidateDisplayNameCacheEntryByPDNE((HANDLE)wParam,pdnce,cws->value.type);
if (!strcmp(cws->szSetting,"Hidden")) {
@@ -367,7 +367,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) }
}
}
- __except (exceptFunction(GetExceptionInformation()) )
+ __except (exceptFunction(GetExceptionInformation()))
{
}
diff --git a/plugins/Clist_mw/init.cpp b/plugins/Clist_mw/init.cpp index 2c155b744d..d5167fffd5 100644 --- a/plugins/Clist_mw/init.cpp +++ b/plugins/Clist_mw/init.cpp @@ -122,7 +122,7 @@ static int systemModulesLoaded(WPARAM wParam, LPARAM lParam) disableDefaultModule = (int*)CallService(MS_PLUGINS_GETDISABLEDEFAULTARRAY,0,0);
if (!disableDefaultModule[DEFMOD_UICLUI]) if ( LoadCLUIModule()) return 1;
}
- __except (exceptFunction(GetExceptionInformation()) )
+ __except (exceptFunction(GetExceptionInformation()))
{
return 0;
}
@@ -231,7 +231,7 @@ LBL_Error: OutputDebugStringA("CListInitialise ClistMW...Done\r\n");
}
- __except (exceptFunction(GetExceptionInformation()) )
+ __except (exceptFunction(GetExceptionInformation()))
{
return 0;
}
diff --git a/plugins/Clist_nicer/SRC/clcitems.cpp b/plugins/Clist_nicer/SRC/clcitems.cpp index 9e759946e9..b40a0a3328 100644 --- a/plugins/Clist_nicer/SRC/clcitems.cpp +++ b/plugins/Clist_nicer/SRC/clcitems.cpp @@ -46,7 +46,7 @@ static void TZ_LoadTimeZone(HANDLE hContact, struct TExtraCache *c, const char * struct ClcContact* CreateClcContact( void )
{
- struct ClcContact* p = (struct ClcContact*)mir_alloc( sizeof( struct ClcContact ) );
+ struct ClcContact* p = (struct ClcContact*)mir_alloc( sizeof( struct ClcContact ));
if ( p != NULL ) {
ZeroMemory(p, sizeof(struct ClcContact));
//p->clientId = -1;
diff --git a/plugins/Clist_nicer/coolsb/coolscroll.cpp b/plugins/Clist_nicer/coolsb/coolscroll.cpp index 882b91e8fd..ac31f86c24 100644 --- a/plugins/Clist_nicer/coolsb/coolscroll.cpp +++ b/plugins/Clist_nicer/coolsb/coolscroll.cpp @@ -1546,7 +1546,7 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam) // We temporarily set a flag preventing the subsecuent
// WM_STYLECHANGING/WM_STYLECHANGED to be forwarded to
// the original window procedure
- if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
+ if ( dwStyle & (WS_VSCROLL|WS_HSCROLL))
{
sw->bPreventStyleChange = TRUE;
SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle & ~(WS_VSCROLL|WS_HSCROLL));
@@ -1554,7 +1554,7 @@ static LRESULT NCPaint(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam) ret = CallWindowProc(sw->oldproc, hwnd, WM_NCPAINT, (WPARAM)hrgn, lParam);
- if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
+ if ( dwStyle & (WS_VSCROLL|WS_HSCROLL))
{
SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle);
sw->bPreventStyleChange = FALSE;
@@ -2686,7 +2686,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam dwStyle = GetWindowLongPtr(hwnd, GWL_STYLE);
// TURN OFF SCROLL-STYLES.
- if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
+ if ( dwStyle & (WS_VSCROLL|WS_HSCROLL))
{
sw->bPreventStyleChange = TRUE;
SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle & ~(WS_VSCROLL|WS_HSCROLL));
@@ -2696,7 +2696,7 @@ static LRESULT NCCalcSize(SCROLLWND *sw, HWND hwnd, WPARAM wParam, LPARAM lParam ret = CallWindowProc(sw->oldproc, hwnd, WM_NCCALCSIZE, wParam, lParam);
// RESTORE PREVIOUS STYLES (if present at all)
- if ( dwStyle & (WS_VSCROLL|WS_HSCROLL) )
+ if ( dwStyle & (WS_VSCROLL|WS_HSCROLL))
{
SetWindowLongPtr(hwnd, GWL_STYLE, dwStyle);
sw->bPreventStyleChange = FALSE;
diff --git a/plugins/Console/Console.c b/plugins/Console/Console.c index 360065eb41..c0e02f994b 100644 --- a/plugins/Console/Console.c +++ b/plugins/Console/Console.c @@ -328,13 +328,13 @@ static LRESULT CALLBACK SubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lPa }
*/
// CTRL
- if ( !(GetKeyState(VK_CONTROL)&0x8000) )
+ if ( !(GetKeyState(VK_CONTROL)&0x8000))
break;
switch(wParam) {
case 1: // Ctrl+A
- if ( ListView_GetSelectedCount(hwnd) != (UINT)ListView_GetItemCount(hwnd) )
+ if ( ListView_GetSelectedCount(hwnd) != (UINT)ListView_GetItemCount(hwnd))
ListView_SetItemState(hwnd, -1, LVIS_SELECTED, LVIS_SELECTED);
return 0;
@@ -614,7 +614,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,LPARA if ( !count ) break;
- if ( count == ListView_GetItemCount(dat->hList) ) {
+ if ( count == ListView_GetItemCount(dat->hList)) {
LVITEM lvi = {0};
ListView_DeleteAllItems(dat->hList);
lvi.mask = LVIF_TEXT | LVIF_IMAGE;
@@ -776,7 +776,7 @@ static INT_PTR CALLBACK ConsoleDlgProc(HWND hwndDlg,UINT message,WPARAM wParam,L if (!str) str = ""; // startup window
- lw = (LOGWIN*)mir_calloc( sizeof(LOGWIN) );
+ lw = (LOGWIN*)mir_calloc( sizeof(LOGWIN));
lw->Module = (char*)mir_strdup(str);
li.List_Insert(&lModules, lw, idx);
@@ -1033,7 +1033,7 @@ void __cdecl ConsoleThread(void* arg) break;
}
- if ( IsDialogMessage(hwnd, &msg) )
+ if ( IsDialogMessage(hwnd, &msg))
continue;
TranslateMessage(&msg);
diff --git a/plugins/CountryFlags/huffman.c b/plugins/CountryFlags/huffman.c index b253f2d48f..c460e9a66e 100644 --- a/plugins/CountryFlags/huffman.c +++ b/plugins/CountryFlags/huffman.c @@ -308,12 +308,12 @@ static void _Huffman_MakeTree( huff_sym_t *sym, huff_bitstream_t *stream ) {
if ( nodes[k].Count > 0 )
{
- if ( !node_1 || (nodes[k].Count <= node_1->Count) )
+ if ( !node_1 || (nodes[k].Count <= node_1->Count))
{
node_2 = node_1;
node_1 = &nodes[k];
}
- else if ( !node_2 || (nodes[k].Count <= node_2->Count) )
+ else if ( !node_2 || (nodes[k].Count <= node_2->Count))
{
node_2 = &nodes[k];
}
@@ -367,7 +367,7 @@ static huff_decodenode_t * _Huffman_RecoverTree( huff_decodenode_t *nodes, this_node->ChildB = (huff_decodenode_t *) 0;
/* Is this a leaf node? */
- if ( _Huffman_ReadBit( stream ) )
+ if ( _Huffman_ReadBit( stream ))
{
/* Get symbol from tree description and store in lead node */
this_node->Symbol = _Huffman_Read8Bits( stream );
@@ -494,7 +494,7 @@ void Huffman_Uncompress( unsigned char *in, unsigned char *out, while( node->Symbol < 0 )
{
/* Get next node */
- if ( _Huffman_ReadBit( &stream ) )
+ if ( _Huffman_ReadBit( &stream ))
node = node->ChildB;
else
node = node->ChildA;
diff --git a/plugins/Db3x/database.c b/plugins/Db3x/database.c index 23d5e93723..66148ecffe 100644 --- a/plugins/Db3x/database.c +++ b/plugins/Db3x/database.c @@ -96,7 +96,7 @@ int LoadDatabaseModule(void) if ( hDbFile == INVALID_HANDLE_VALUE ) {
return 1;
}
- if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL) ) {
+ if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL)) {
CloseHandle(hDbFile);
return 1;
}
diff --git a/plugins/Db3x/dbsettings.c b/plugins/Db3x/dbsettings.c index 16bf2aa2bb..bda9b844aa 100644 --- a/plugins/Db3x/dbsettings.c +++ b/plugins/Db3x/dbsettings.c @@ -551,7 +551,7 @@ static INT_PTR WriteContactSetting(WPARAM wParam,LPARAM lParam) if(tmp.value.type!=DBVT_BYTE && tmp.value.type!=DBVT_WORD && tmp.value.type!=DBVT_DWORD && tmp.value.type!=DBVT_ASCIIZ && tmp.value.type!=DBVT_UTF8 && tmp.value.type!=DBVT_BLOB)
return 1;
- if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL) )
+ if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL))
return 1;
// the db format can't tolerate more than 255 bytes of space (incl. null) for settings+module name
settingNameLen=(int)strlen(tmp.szSetting);
diff --git a/plugins/Db3x/init.c b/plugins/Db3x/init.c index 51ca5baafe..2aceba5e6b 100644 --- a/plugins/Db3x/init.c +++ b/plugins/Db3x/init.c @@ -84,7 +84,7 @@ static int grokHeader( char * profile, int * error ) return 1;
}
// read the header, which can fail (for various reasons)
- if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL) ) {
+ if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL)) {
if ( error != NULL) *error=EGROKPRF_CANTREAD;
CloseHandle(hFile);
return 1;
diff --git a/plugins/Db3x_mmap/database.c b/plugins/Db3x_mmap/database.c index b3bd3e70a0..0e8f45cc24 100644 --- a/plugins/Db3x_mmap/database.c +++ b/plugins/Db3x_mmap/database.c @@ -119,7 +119,7 @@ int LoadDatabaseModule(void) if ( hDbFile == INVALID_HANDLE_VALUE ) {
return 1;
}
- if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL) ) {
+ if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL)) {
CloseHandle(hDbFile);
return 1;
}
diff --git a/plugins/Db3x_mmap/dbsettings.c b/plugins/Db3x_mmap/dbsettings.c index ab306e8b48..451ea95501 100644 --- a/plugins/Db3x_mmap/dbsettings.c +++ b/plugins/Db3x_mmap/dbsettings.c @@ -585,7 +585,7 @@ static INT_PTR WriteContactSetting(WPARAM wParam,LPARAM lParam) if(tmp.value.type!=DBVT_BYTE && tmp.value.type!=DBVT_WORD && tmp.value.type!=DBVT_DWORD && tmp.value.type!=DBVT_ASCIIZ && tmp.value.type!=DBVT_UTF8 && tmp.value.type!=DBVT_BLOB)
return 1;
- if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL) )
+ if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL))
return 1;
// the db can not tolerate strings/blobs longer than 0xFFFF since the format writes 2 lengths
diff --git a/plugins/Db3x_mmap/init.c b/plugins/Db3x_mmap/init.c index 304c810a8e..30f8e9b60e 100644 --- a/plugins/Db3x_mmap/init.c +++ b/plugins/Db3x_mmap/init.c @@ -80,7 +80,7 @@ static int grokHeader( char * profile, int * error ) return 1;
}
// read the header, which can fail (for various reasons)
- if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL) ) {
+ if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL)) {
if ( error != NULL) *error=EGROKPRF_CANTREAD;
CloseHandle(hFile);
return 1;
diff --git a/plugins/Db_autobackups/backup.c b/plugins/Db_autobackups/backup.c index 3b0229ac56..fd27c9f09f 100644 --- a/plugins/Db_autobackups/backup.c +++ b/plugins/Db_autobackups/backup.c @@ -204,7 +204,7 @@ int Backup(TCHAR* backup_filename) VOID CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) {
time_t t = time(0), diff = t - (time_t)DBGetContactSettingDword(0, "AutoBackups", "LastBackupTimestamp", (DWORD)t);
- if(diff > (time_t)(options.period * (options.period_type == PT_MINUTES ? 60 : (options.period_type == PT_HOURS ? 60 * 60 : 60 * 60 * 24 ) )))
+ if(diff > (time_t)(options.period * (options.period_type == PT_MINUTES ? 60 : (options.period_type == PT_HOURS ? 60 * 60 : 60 * 60 * 24 ))))
Backup(NULL);
}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp b/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp index 23dab85843..2b9ba5098a 100644 --- a/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp +++ b/plugins/Dbx_mmap_SA/Dbtool/eventchain.cpp @@ -44,7 +44,7 @@ static void ConvertOldEvent( DBEvent*& dbei ) break;
} } }
else {
- if ( !is_utf8_string(( char* )dbei->blob) )
+ if ( !is_utf8_string(( char* )dbei->blob))
dbei->flags &= ~DBEF_UTF;
}
diff --git a/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp b/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp index 08bbd35016..9b1a08640e 100644 --- a/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp +++ b/plugins/Dbx_mmap_SA/Dbtool/selectdb.cpp @@ -74,7 +74,7 @@ static int AddDatabaseToList(HWND hwndList, TCHAR* filename, TCHAR* dir) _tcscpy(szName,dir);
_tcscat(szName,pName);
pDot = _tcsrchr( szName, '.' );
- if ( pDot != NULL && !_tcsicmp( pDot, _T(".dat")) )
+ if ( pDot != NULL && !_tcsicmp( pDot, _T(".dat")))
*pDot=0;
lvi.iItem = 0;
@@ -181,7 +181,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
// search in profile dir (using ini file)
- if ( lstrcmpi(szProfileDir,szMirandaProfiles) )
+ if ( lstrcmpi(szProfileDir,szMirandaProfiles))
FindAdd(hdlg, szProfileDir, _T("[ini]\\"));
FindAdd(hdlg, szMirandaProfiles, _T("[prf]\\"));
@@ -191,7 +191,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa // search in profile dir (using registry path + ini file)
if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,_T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\miranda32.exe"),0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) {
if(RegQueryValueEx(hKey,_T("Path"),NULL,NULL,(PBYTE)szMirandaPath,&cbData) == ERROR_SUCCESS) {
- if ( lstrcmp(szProfileDir,szMirandaPath) ) {
+ if ( lstrcmp(szProfileDir,szMirandaPath)) {
GetProfileDirectory(szMirandaPath,szProfileDir,SIZEOF(szProfileDir));
FindAdd(hdlg, szProfileDir, _T("[reg]\\"));
}
@@ -200,7 +200,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa }
// select
if ( opts.filename[0] )
- i = AddDatabaseToList( GetDlgItem( hdlg, IDC_DBLIST ), opts.filename, _T("") );
+ i = AddDatabaseToList( GetDlgItem( hdlg, IDC_DBLIST ), opts.filename, _T(""));
if ( i == -1 )
i = 0;
ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
@@ -250,7 +250,7 @@ INT_PTR CALLBACK SelectDbDlgProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lPa ofn.nMaxFileTitle = MAX_PATH;
if ( GetOpenFileName( &ofn )) {
int i;
- i = AddDatabaseToList( GetDlgItem(hdlg,IDC_DBLIST), str, _T("") );
+ i = AddDatabaseToList( GetDlgItem(hdlg,IDC_DBLIST), str, _T(""));
if ( i == -1 )
i=0;
ListView_SetItemState( GetDlgItem(hdlg,IDC_DBLIST), i, LVIS_SELECTED, LVIS_SELECTED );
diff --git a/plugins/Dbx_mmap_SA/database.c b/plugins/Dbx_mmap_SA/database.c index b9c1b9871f..c1e1483fb0 100644 --- a/plugins/Dbx_mmap_SA/database.c +++ b/plugins/Dbx_mmap_SA/database.c @@ -137,7 +137,7 @@ int LoadDatabaseModule(void) if ( hDbFile == INVALID_HANDLE_VALUE ) {
return 1;
}
- if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL) ) {
+ if ( !ReadFile(hDbFile,&dbHeader,sizeof(dbHeader),&dummy,NULL)) {
CloseHandle(hDbFile);
return 1;
}
diff --git a/plugins/Dbx_mmap_SA/dbsettings.c b/plugins/Dbx_mmap_SA/dbsettings.c index 1d0fb69d62..53717ecafb 100644 --- a/plugins/Dbx_mmap_SA/dbsettings.c +++ b/plugins/Dbx_mmap_SA/dbsettings.c @@ -601,7 +601,7 @@ static INT_PTR WriteContactSetting(WPARAM wParam, LPARAM lParam) if(tmp.value.type!=DBVT_BYTE && tmp.value.type!=DBVT_WORD && tmp.value.type!=DBVT_DWORD && tmp.value.type!=DBVT_ASCIIZ && tmp.value.type!=DBVT_UTF8 && tmp.value.type!=DBVT_BLOB)
return 1;
- if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL) )
+ if ((!tmp.szModule) || (!tmp.szSetting) || ((tmp.value.type == DBVT_ASCIIZ || tmp.value.type == DBVT_UTF8 )&& tmp.value.pszVal == NULL) || (tmp.value.type == DBVT_BLOB && tmp.value.pbVal == NULL))
return 1;
// the db can not tolerate strings/blobs longer than 0xFFFF since the format writes 2 lengths
diff --git a/plugins/Dbx_mmap_SA/dialogs.c b/plugins/Dbx_mmap_SA/dialogs.c index 748322692b..228db23f64 100644 --- a/plugins/Dbx_mmap_SA/dialogs.c +++ b/plugins/Dbx_mmap_SA/dialogs.c @@ -249,15 +249,15 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP char buf[512];
char * p = &buf[7];
lstrcpyA(buf,"mailto:");
- if ( GetWindowTextA(GetDlgItem(hwndDlg, LOWORD(wParam)), p, SIZEOF(buf) - 7) ) {
- CallService(MS_UTILS_OPENURL,0,(LPARAM) (LOWORD(wParam)==IDC_EMAIL ? buf : p) );
+ if ( GetWindowTextA(GetDlgItem(hwndDlg, LOWORD(wParam)), p, SIZEOF(buf) - 7)) {
+ CallService(MS_UTILS_OPENURL,0,(LPARAM) (LOWORD(wParam)==IDC_EMAIL ? buf : p));
}
break;
} } }
break;
case WM_NOTIFY:
- if ( hdr && hdr->hdr.code == LVN_ITEMCHANGED && IsWindowVisible(hdr->hdr.hwndFrom) && hdr->iItem != (-1) ) {
+ if ( hdr && hdr->hdr.code == LVN_ITEMCHANGED && IsWindowVisible(hdr->hdr.hwndFrom) && hdr->iItem != (-1)) {
iIndex = hdr->iItem;
if(hdr->uNewState & 0x2000){
for(i = 0; i < ModulesCount; i++) {
diff --git a/plugins/Dbx_mmap_SA/init.c b/plugins/Dbx_mmap_SA/init.c index c985f43d77..f13a4b5667 100644 --- a/plugins/Dbx_mmap_SA/init.c +++ b/plugins/Dbx_mmap_SA/init.c @@ -81,7 +81,7 @@ static int grokHeader( char * profile, int * error ) return 1;
}
// read the header, which can fail (for various reasons)
- if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL) ) {
+ if ( !ReadFile(hFile, &hdr, sizeof(struct DBHeader), &dummy, NULL)) {
if ( error != NULL) *error=EGROKPRF_CANTREAD;
CloseHandle(hFile);
return 1;
diff --git a/plugins/Dbx_tree/BlockManager.cpp b/plugins/Dbx_tree/BlockManager.cpp index 3be5d80506..b52298602f 100644 --- a/plugins/Dbx_tree/BlockManager.cpp +++ b/plugins/Dbx_tree/BlockManager.cpp @@ -391,7 +391,7 @@ inline CBlockManager::TCacheEntry * CBlockManager::_CacheInsert(uint32_t Idx, TB res->Next = i;
- } while (i != CMPXCHG_Ptr(*last, res, i) );
+ } while (i != CMPXCHG_Ptr(*last, res, i));
res->LastUse = time(NULL) >> 2;
diff --git a/plugins/Dbx_tree/Settings.cpp b/plugins/Dbx_tree/Settings.cpp index c4e555ec91..b4ba799c55 100644 --- a/plugins/Dbx_tree/Settings.cpp +++ b/plugins/Dbx_tree/Settings.cpp @@ -381,7 +381,7 @@ TDBTSettingHandle CSettings::FindSetting(TDBTSettingDescriptor & Descriptor) if (Descriptor.Flags & DBT_SDF_FoundValid)
return Descriptor.FoundHandle;
- uint32_t namelength = static_cast<uint32_t>( strlen(Descriptor.pszSettingName) );
+ uint32_t namelength = static_cast<uint32_t>( strlen(Descriptor.pszSettingName));
uint32_t namehash;
if (Descriptor.Flags & DBT_SDF_HashValid)
diff --git a/plugins/ExtraIcons/commons.h b/plugins/ExtraIcons/commons.h index 4b896a8c52..84b43008dd 100644 --- a/plugins/ExtraIcons/commons.h +++ b/plugins/ExtraIcons/commons.h @@ -80,7 +80,7 @@ using namespace std; extern HINSTANCE hInst;
extern PLUGINLINK *pluginLink;
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define FREE(_m_) if (_m_ != NULL) { free(_m_); _m_ = NULL; }
#define ICON_SIZE 16
diff --git a/plugins/FloatingContacts/bitmap_funcs.cpp b/plugins/FloatingContacts/bitmap_funcs.cpp index a99b5c4afe..334bf98abe 100644 --- a/plugins/FloatingContacts/bitmap_funcs.cpp +++ b/plugins/FloatingContacts/bitmap_funcs.cpp @@ -1144,7 +1144,7 @@ bool MyBitmap::loadFromFile_default(const char *fn, const char *fnAlpha) MyBitmap alpha;
if (fnAlpha && alpha.loadFromFile(fnAlpha) &&
(alpha.getWidth() == width) &&
- (alpha.getHeight() == height) )
+ (alpha.getHeight() == height))
{
for (int i = 0; i < width*height; i++)
bits[i] = (bits[i] & 0x00ffffff) | ( (alpha.bits[i] & 0x000000ff) << 24 );
diff --git a/plugins/FloatingContacts/filedrop.cpp b/plugins/FloatingContacts/filedrop.cpp index 6157e5dcf9..473c7a6814 100644 --- a/plugins/FloatingContacts/filedrop.cpp +++ b/plugins/FloatingContacts/filedrop.cpp @@ -6,7 +6,7 @@ static BOOL OnDropFiles ( HDROP hDrop, ThumbInfo *pThumb ); HRESULT STDMETHODCALLTYPE CDropTarget::QueryInterface(REFIID riid,LPVOID *ppvObj)
{
- if ( IsEqualIID( riid, IID_IDropTarget ) )
+ if ( IsEqualIID( riid, IID_IDropTarget ))
{
*ppvObj = this;
this->AddRef();
@@ -56,14 +56,14 @@ HRESULT STDMETHODCALLTYPE CDropTarget::DragEnter( IDataObject *pData, DWORD fKey ThumbInfo *pThumb;
if ( S_OK == pData->QueryGetData( &feFile ) ||
- S_OK == pData->QueryGetData( &feText ) )
+ S_OK == pData->QueryGetData( &feText ))
{
shortPt.x = pt.x;
shortPt.y = pt.y;
hwnd = WindowFromPoint( shortPt );
- if ( pThumb = thumbList.FindThumb( hwnd ) )
+ if ( pThumb = thumbList.FindThumb( hwnd ))
{
hwndCurDrag = hwnd;
pThumb->ThumbSelect( TRUE );
@@ -106,11 +106,11 @@ HRESULT STDMETHODCALLTYPE CDropTarget::Drop( IDataObject *pData,DWORD fKeyState, pThumb = (ThumbInfo*)GetWindowLongPtr( hwndCurDrag, GWLP_USERDATA );
if ( pThumb == NULL ) return( S_OK );
- if ( S_OK != pData->GetData( &fe,&stg ) )
+ if ( S_OK != pData->GetData( &fe,&stg ))
{
fe.cfFormat = CF_TEXT;
- if ( S_OK != pData->GetData( &fe,&stg ) )
+ if ( S_OK != pData->GetData( &fe,&stg ))
{
return( S_OK );
}
@@ -172,7 +172,7 @@ BOOL OnDropFiles( HDROP hDrop, ThumbInfo *pThumb ) nDroppedItemsCount = DragQueryFile( hDrop, 0xFFFFFFFF, NULL, 0 );
- ppDroppedItems = ( char** )malloc( sizeof(char*)*( nDroppedItemsCount + 1 ) );
+ ppDroppedItems = ( char** )malloc( sizeof(char*)*( nDroppedItemsCount + 1 ));
if ( ppDroppedItems == NULL )
{
@@ -183,13 +183,13 @@ BOOL OnDropFiles( HDROP hDrop, ThumbInfo *pThumb ) for ( iItem = 0; iItem < nDroppedItemsCount; ++iItem )
{
- DragQueryFileA( hDrop, iItem, szFilename, sizeof( szFilename ) );
+ DragQueryFileA( hDrop, iItem, szFilename, sizeof( szFilename ));
ppDroppedItems[ iItem ] = _strdup( szFilename );
}
nFilesCount = CountDroppedFiles( ppDroppedItems, nDroppedItemsCount );
- ppFiles = ( char** )malloc( sizeof( char *)* ( nFilesCount+1 ) );
+ ppFiles = ( char** )malloc( sizeof( char *)* ( nFilesCount+1 ));
if ( ppFiles == NULL )
{
@@ -235,13 +235,13 @@ static int CountFiles( char *szItem ) if ( fd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
{
// Skip parent directories
- if ( ( 0 != strcmp( fd.cFileName, "." ) ) &&
- ( 0 != strcmp( fd.cFileName, ".." ) ) )
+ if ( ( 0 != strcmp( fd.cFileName, "." )) &&
+ ( 0 != strcmp( fd.cFileName, ".." )) )
{
char szDirName[ MAX_PATH ];
strncpy( szDirName, szItem, MAX_PATH - 1 );
- if ( NULL != strstr( szItem, "*.*" ) )
+ if ( NULL != strstr( szItem, "*.*" ))
{
sprintf( szDirName + strlen( szDirName ) - 3, "%s\0", fd.cFileName );
}
@@ -256,7 +256,7 @@ static int CountFiles( char *szItem ) ++nCount;
}
}
- while( FALSE != FindNextFileA( hFind, &fd ) );
+ while( FALSE != FindNextFileA( hFind, &fd ));
}
return( nCount );
@@ -278,13 +278,13 @@ static void SaveFiles( char *szItem, char **ppFiles, int *pnCount ) if ( fd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
{
// Skip parent directories
- if ( ( 0 != strcmp( fd.cFileName, "." ) ) &&
- ( 0 != strcmp( fd.cFileName, ".." ) ) )
+ if ( ( 0 != strcmp( fd.cFileName, "." )) &&
+ ( 0 != strcmp( fd.cFileName, ".." )) )
{
char szDirName[ MAX_PATH ];
strncpy( szDirName, szItem, MAX_PATH - 1 );
- if ( NULL != strstr( szItem, "*.*" ) )
+ if ( NULL != strstr( szItem, "*.*" ))
{
sprintf( szDirName + strlen( szDirName ) - 3, "%s\0", fd.cFileName );
}
@@ -299,12 +299,12 @@ static void SaveFiles( char *szItem, char **ppFiles, int *pnCount ) }
else
{
- int nSize = sizeof(char) * ( strlen( szItem ) + strlen( fd.cFileName ) + sizeof( char ) );
+ int nSize = sizeof(char) * ( strlen( szItem ) + strlen( fd.cFileName ) + sizeof( char ));
char *szFile = (char*) malloc( nSize ) ;
strncpy( szFile, szItem, nSize - 1 );
- if ( NULL != strstr( szFile, "*.*" ) )
+ if ( NULL != strstr( szFile, "*.*" ))
{
szFile[ strlen( szFile ) - 3 ] = '\0';
strncat( szFile, fd.cFileName, MAX_PATH - 1 );
@@ -314,7 +314,7 @@ static void SaveFiles( char *szItem, char **ppFiles, int *pnCount ) ++( *pnCount );
}
}
- while( FALSE != FindNextFileA( hFind, &fd ) );
+ while( FALSE != FindNextFileA( hFind, &fd ));
}
}
diff --git a/plugins/FloatingContacts/main.cpp b/plugins/FloatingContacts/main.cpp index f05fda305d..199cf1ee08 100644 --- a/plugins/FloatingContacts/main.cpp +++ b/plugins/FloatingContacts/main.cpp @@ -367,7 +367,7 @@ static int OnContactDrag( WPARAM wParam, LPARAM lParam ) if ( pThumb == NULL ) {
idStatus = GetContactStatus( hContact );
- if ( !fcOpt.bHideAll && !HideOnFullScreen() && ( !fcOpt.bHideOffline || IsStatusVisible( idStatus ) ) && (!fcOpt.bHideWhenCListShow || !bIsCListShow)) {
+ if ( !fcOpt.bHideAll && !HideOnFullScreen() && ( !fcOpt.bHideOffline || IsStatusVisible( idStatus )) && (!fcOpt.bHideWhenCListShow || !bIsCListShow)) {
CreateThumbWnd( ptName, hContact, pt.x, pt.y );
pNewThumb = thumbList.FindThumbByContact( hContact );
ShowWindow( pNewThumb->hwnd, SW_SHOWNA );
@@ -377,7 +377,7 @@ static int OnContactDrag( WPARAM wParam, LPARAM lParam ) }
}
else if ( hContact == hNewContact )
- pThumb->PositionThumb( (short)( pt.x - 5 ), (short)( pt.y - 5 ) );
+ pThumb->PositionThumb( (short)( pt.x - 5 ), (short)( pt.y - 5 ));
return( hNewContact != NULL ? 1 : 0 );
}
@@ -393,16 +393,16 @@ static int OnContactDrop( WPARAM wParam, LPARAM lParam ) HANDLE hContact = ( HANDLE )wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact( hContact );
- if ( ( hNewContact == hContact ) && ( pThumb != NULL ) )
+ if ( ( hNewContact == hContact ) && ( pThumb != NULL ))
{
hNewContact = NULL;
GetWindowRect( hwndMiranda, &rcMiranda );
pThumb->GetThumbRect( &rcThumb );
- //if ( IntersectRect( &rcOverlap, &rcThumb, &rcMiranda ) )
+ //if ( IntersectRect( &rcOverlap, &rcThumb, &rcMiranda ))
//{
- // pThumb->OnLButtonDown( (short)(rcThumb.left + 5), (short)(rcThumb.top + 5) );
+ // pThumb->OnLButtonDown( (short)(rcThumb.left + 5), (short)(rcThumb.top + 5));
//}
}
@@ -417,7 +417,7 @@ static int OnContactDragStop( WPARAM wParam, LPARAM lParam ) HANDLE hContact = ( HANDLE )wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact( hContact );
- if ( ( pThumb != NULL ) && ( hNewContact == hContact ) )
+ if ( ( pThumb != NULL ) && ( hNewContact == hContact ))
{
thumbList.RemoveThumb( pThumb );
hNewContact = NULL;
@@ -452,7 +452,7 @@ static int OnContactSettingChanged( WPARAM wParam, LPARAM lParam ) if ( hContact == NULL )
{
- if (( 0 == stricmp( pdbcws->szModule, "CLC" ) ) || ( 0 == stricmp( pdbcws->szModule, sModule ) ) ) {
+ if (( 0 == stricmp( pdbcws->szModule, "CLC" )) || ( 0 == stricmp( pdbcws->szModule, sModule )) ) {
LoadDBSettings();
ApplyOptionsChanges();
}
@@ -463,15 +463,15 @@ static int OnContactSettingChanged( WPARAM wParam, LPARAM lParam ) if ( pThumb == NULL ) return( 0 );
// Only on these 2 events we need to refresh
- if ( 0 == stricmp( pdbcws->szSetting, "Status" ) )
+ if ( 0 == stricmp( pdbcws->szSetting, "Status" ))
{
idStatus = pdbcws->value.wVal;
}
- else if ( 0 == stricmp( pdbcws->szSetting, "Nick" ) )
+ else if ( 0 == stricmp( pdbcws->szSetting, "Nick" ))
{
idStatus = GetContactStatus( hContact );
}
- else if ( 0 == stricmp( pdbcws->szSetting, "MyHandle" ) )
+ else if ( 0 == stricmp( pdbcws->szSetting, "MyHandle" ))
{
idStatus = GetContactStatus( hContact );
}
@@ -520,7 +520,7 @@ static int OnPrebuildContactMenu( WPARAM wParam, LPARAM lParam ) ThumbInfo *pThumb = thumbList.FindThumbByContact( (HANDLE) wParam );
CLISTMENUITEM clmi;
- ZeroMemory( &clmi, sizeof( clmi ) );
+ ZeroMemory( &clmi, sizeof( clmi ));
clmi.cbSize = sizeof( clmi );
clmi.flags = ( pThumb == NULL ) ? CMIM_FLAGS | CMIF_HIDDEN : CMIM_FLAGS &~CMIF_HIDDEN;
@@ -650,7 +650,7 @@ static LRESULT __stdcall CommWndProc( HWND hwnd, break;
case WM_LBUTTONDOWN:
- if (pThumb) pThumb->OnLButtonDown( (short)LOWORD( lParam ), (short)HIWORD( lParam ) );
+ if (pThumb) pThumb->OnLButtonDown( (short)LOWORD( lParam ), (short)HIWORD( lParam ));
break;
case WM_MOUSEMOVE:
@@ -765,7 +765,7 @@ void ApplyOptionsChanges() static void RegisterWindowClass()
{
WNDCLASSEX wcx;
- ZeroMemory( &wcx, sizeof( wcx ) );
+ ZeroMemory( &wcx, sizeof( wcx ));
wcx.cbSize = sizeof( WNDCLASSEX );
wcx.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
@@ -823,7 +823,7 @@ static void CreateThumbWnd( TCHAR *ptszName, HANDLE hContact, int nX, int nY ) pThumb->ResizeThumb();
pThumb->SetThumbOpacity( fcOpt.thumbAlpha );
- ShowWindow( hwnd, ( fcOpt.bHideAll || HideOnFullScreen() || fcOpt.bHideOffline || (fcOpt.bHideWhenCListShow && bIsCListShow) )? SW_HIDE : SW_SHOWNA );
+ ShowWindow( hwnd, ( fcOpt.bHideAll || HideOnFullScreen() || fcOpt.bHideOffline || (fcOpt.bHideWhenCListShow && bIsCListShow))? SW_HIDE : SW_SHOWNA );
pThumb->PositionThumb( (short)nX, (short)nY );
// force repaint
@@ -839,7 +839,7 @@ static BOOL GetOSPlatform() OSVERSIONINFO VersionInfo;
// Get OS platform
- ZeroMemory( &VersionInfo, sizeof( VersionInfo ) );
+ ZeroMemory( &VersionInfo, sizeof( VersionInfo ));
VersionInfo.dwOSVersionInfoSize = sizeof( VersionInfo );
GetVersionEx( &VersionInfo );
@@ -976,7 +976,7 @@ static int ClcStatusToPf2( int status ) BOOL IsStatusVisible( int status )
{
- return ( 0 == ( dwOfflineModes & ClcStatusToPf2( status ) ) );
+ return ( 0 == ( dwOfflineModes & ClcStatusToPf2( status )) );
}
@@ -995,7 +995,7 @@ void RegHotkey( HANDLE hContact, HWND hwnd ) strncpy(szBuf, dbv.pszVal, MAX_PATH - 1);
DBFreeVariant( &dbv );
- if ( 0 != strlen( szBuf ) )
+ if ( 0 != strlen( szBuf ))
{
UINT nModifiers = 0;
char chKey = 0;
@@ -1007,15 +1007,15 @@ void RegHotkey( HANDLE hContact, HWND hwnd ) for ( i = 0; i < 2; ++i )
{
- if ( 0 == strncmp( szMod[ i ], "ALT", 19 ) )
+ if ( 0 == strncmp( szMod[ i ], "ALT", 19 ))
{
nModifiers = nModifiers | MOD_ALT;
}
- else if ( 0 == strncmp( szMod[ i ], "CTRL", 19 ) )
+ else if ( 0 == strncmp( szMod[ i ], "CTRL", 19 ))
{
nModifiers = nModifiers | MOD_CONTROL;
}
- else if ( 0 == strncmp( szMod[ i ], "SHIFT", 19 ) )
+ else if ( 0 == strncmp( szMod[ i ], "SHIFT", 19 ))
{
nModifiers = nModifiers | MOD_SHIFT;
}
@@ -1023,7 +1023,7 @@ void RegHotkey( HANDLE hContact, HWND hwnd ) chKey = szKey[ 0 ];
- RegisterHotKey( hwnd, (int)hwnd, nModifiers, VkKeyScan( chKey ) );
+ RegisterHotKey( hwnd, (int)hwnd, nModifiers, VkKeyScan( chKey ));
}
}
@@ -1042,8 +1042,8 @@ void SaveContactsPos() thumbList[i]->GetThumbRect( &rc );
- if ( 0 == GetLastError() )
- DBWriteContactSettingDword( thumbList[i]->hContact, sModule, "ThumbsPos", DB_POS_MAKE_XY(rc.left, rc.top) );
+ if ( 0 == GetLastError())
+ DBWriteContactSettingDword( thumbList[i]->hContact, sModule, "ThumbsPos", DB_POS_MAKE_XY(rc.left, rc.top));
}
}
@@ -1069,19 +1069,19 @@ static void LoadMenus() mi.cbSize = sizeof( mi );
mi.position = 0xFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( IDI_HIDE ) );
+ mi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( IDI_HIDE ));
mi.ptszName = _T("Remove thumb");
mi.pszService = sModule "/RemoveThumb";
hMenuItemRemove = Menu_AddContactMenuItem(&mi);
// Hide all thumbs main menu item
hMainHideAllThumbs = CreateServiceFunction( sModule "/MainHideAllThumbs", OnMainMenu_HideAll );
- ZeroMemory( &mi, sizeof( mi ) );
+ ZeroMemory( &mi, sizeof( mi ));
mi.cbSize = sizeof( mi );
mi.position = 0xFFFFF;
mi.flags = CMIF_TCHAR;
- mi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE ) );
+ mi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE ));
mi.ptszName = fcOpt.bHideAll ? _T("Show all thumbs") : _T("Hide all thumbs");
mi.pszService = sModule "/MainHideAllThumbs";
Menu_AddMainMenuItem(&mi);
@@ -1149,7 +1149,7 @@ BOOL HideOnFullScreen() RECT WindowRect;
GetWindowRect(hWnd, &WindowRect);
- if ( (w == (WindowRect.right - WindowRect.left) ) &&
+ if ( (w == (WindowRect.right - WindowRect.left)) &&
(h == (WindowRect.bottom - WindowRect.top)))
{
bFullscreen = TRUE;
@@ -1198,7 +1198,7 @@ static INT_PTR OnMainMenu_HideAll( WPARAM wParam, LPARAM lParam ) clmi.cbSize = sizeof( clmi );
clmi.flags = CMIM_NAME | CMIM_ICON|CMIF_TCHAR;
- clmi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE ) );
+ clmi.hIcon = LoadIcon( hInst, MAKEINTRESOURCE( fcOpt.bHideAll ? IDI_SHOW : IDI_HIDE ));
clmi.ptszName = fcOpt.bHideAll ? _T("Show all thumbs") : _T("Hide all thumbs");
b = CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hMainMenuItemHideAll, ( LPARAM )&clmi );
return 0;
@@ -1224,7 +1224,7 @@ void ShowThumbsOnHideCList() return;
for (int i = 0; i < thumbList.getCount(); ++i)
- if ( !fcOpt.bHideOffline || IsStatusVisible( GetContactStatus(thumbList[i]->hContact) ))
+ if ( !fcOpt.bHideOffline || IsStatusVisible( GetContactStatus(thumbList[i]->hContact)))
ShowWindow( thumbList[i]->hwnd, SW_SHOWNA );
}
@@ -1269,5 +1269,5 @@ static LRESULT __stdcall newMirandaWndProc( HWND hwnd, UINT uMsg, WPARAM wParam, }
}
}
- return( CallWindowProc(oldMirandaWndProc, hwnd, uMsg, wParam, lParam) );
+ return( CallWindowProc(oldMirandaWndProc, hwnd, uMsg, wParam, lParam));
}
diff --git a/plugins/FloatingContacts/thumbs.cpp b/plugins/FloatingContacts/thumbs.cpp index dffd19f153..0195ff0717 100644 --- a/plugins/FloatingContacts/thumbs.cpp +++ b/plugins/FloatingContacts/thumbs.cpp @@ -115,7 +115,7 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos) if ( fcOpt.bMoveTogether )
{
- UndockThumbs( this, thumbList.FindThumb( dockOpt.hwndLeft ) );
+ UndockThumbs( this, thumbList.FindThumb( dockOpt.hwndLeft ));
}
@@ -161,23 +161,23 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos) pt.y = rcThumb.top;
bDocked = FALSE;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right;
bDocked = TRUE;
}
- if ( PtInRect( &rcBottom, pt ) )
+ if ( PtInRect( &rcBottom, pt ))
{
nNewY = rc.bottom;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
{
nNewX = rc.left;
}
}
- if ( PtInRect( &rcTop, pt ) )
+ if ( PtInRect( &rcTop, pt ))
{
nNewY = rc.top;
bDockedLeft = bDocked;
@@ -188,7 +188,7 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos) pt.y = rcThumb.top;
bDocked = FALSE;
- if ( !bLeading && PtInRect( &rcLeft, pt ) )
+ if ( !bLeading && PtInRect( &rcLeft, pt ))
{
if ( !bDockedLeft )
{
@@ -202,17 +202,17 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos) }
- if ( PtInRect( &rcBottom, pt ) )
+ if ( PtInRect( &rcBottom, pt ))
{
nNewY = rc.bottom;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right - nWidth;
}
}
- if ( !bLeading && PtInRect( &rcTop, pt ) )
+ if ( !bLeading && PtInRect( &rcTop, pt ))
{
nNewY = rc.top;
bDockedRight = bDocked;
@@ -235,16 +235,16 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos) pt.x = rcThumb.left;
pt.y = rcThumb.bottom;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right;
}
- if ( PtInRect( &rcTop, pt ) )
+ if ( PtInRect( &rcTop, pt ))
{
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcLeft, pt ) )
+ if ( PtInRect( &rcLeft, pt ))
{
nNewX = rc.left;
}
@@ -255,16 +255,16 @@ void ThumbInfo::PositionThumbWorker(short nX, short nY, POINT *newPos) pt.x = rcThumb.right;
pt.y = rcThumb.bottom;
- if ( !bLeading && PtInRect( &rcLeft, pt ) )
+ if ( !bLeading && PtInRect( &rcLeft, pt ))
{
nNewX = rc.left - nWidth;
}
- if ( !bLeading && PtInRect( &rcTop, pt ) )
+ if ( !bLeading && PtInRect( &rcTop, pt ))
{
nNewY = rc.top - nHeight;
- if ( PtInRect( &rcRight, pt ) )
+ if ( PtInRect( &rcRight, pt ))
{
nNewX = rc.right - nWidth;
}
@@ -395,7 +395,7 @@ void ThumbInfo::RefreshContactIcon(int iIcon) void ThumbInfo::RefreshContactStatus(int idStatus)
{
- if ( IsStatusVisible( idStatus ) )
+ if ( IsStatusVisible( idStatus ))
{
RegisterFileDropping( hwnd, dropTarget );
}
@@ -404,7 +404,7 @@ void ThumbInfo::RefreshContactStatus(int idStatus) UnregisterFileDropping( hwnd );
}
- ShowWindow( hwnd, fcOpt.bHideAll || HideOnFullScreen() || ( fcOpt.bHideOffline && ( !IsStatusVisible( idStatus ) ) ) || (fcOpt.bHideWhenCListShow && bIsCListShow) ? SW_HIDE : SW_SHOWNA );
+ ShowWindow( hwnd, fcOpt.bHideAll || HideOnFullScreen() || ( fcOpt.bHideOffline && ( !IsStatusVisible( idStatus )) ) || (fcOpt.bHideWhenCListShow && bIsCListShow) ? SW_HIDE : SW_SHOWNA );
}
void ThumbInfo::DeleteContactPos()
@@ -451,15 +451,15 @@ void ThumbInfo::OnLButtonUp() if ( bMouseDown )
{
bMouseDown = FALSE;
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
// Check whether we shoud remove the window
GetWindowRect( hwndMiranda, &rcMiranda );
GetThumbRect( &rcThumb );
- if ( IntersectRect( &rcOverlap, &rcMiranda, &rcThumb ) )
+ if ( IntersectRect( &rcOverlap, &rcMiranda, &rcThumb ))
{
- if ( IsWindowVisible( hwndMiranda ) )
+ if ( IsWindowVisible( hwndMiranda ))
{
DeleteContactPos( );
thumbList.RemoveThumb( this );
@@ -504,7 +504,7 @@ void ThumbInfo::OnMouseMove(short nX, short nY, WPARAM wParam) }
else
{
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
}
// Update selection status
@@ -568,7 +568,7 @@ void ThumbInfo::ThumbDeselect(BOOL bMouse) void ThumbInfo::SetThumbOpacity(BYTE bAlpha)
{
- if ( pUpdateLayeredWindow && (bAlpha != btAlpha) )
+ if ( pUpdateLayeredWindow && (bAlpha != btAlpha))
{
btAlpha = bAlpha;
UpdateContent();
@@ -734,7 +734,7 @@ void ThumbInfo::UpdateContent() nApparentMode = DBGetContactSettingWord(hContact, szProto, "ApparentMode", 0);
if ( (nStatus == ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_ONLINE) ||
- (nStatus != ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_OFFLINE) )
+ (nStatus != ID_STATUS_INVISIBLE && nApparentMode == ID_STATUS_OFFLINE))
{
if (ID_STATUS_OFFLINE == nContactStatus)
{
@@ -887,7 +887,7 @@ void ThumbInfo::OnTimer(BYTE idTimer) void DockThumbs( ThumbInfo *pThumbLeft, ThumbInfo *pThumbRight, BOOL bMoveLeft )
{
- if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ) )
+ if ( ( pThumbRight->dockOpt.hwndLeft == NULL ) && ( pThumbLeft->dockOpt.hwndRight == NULL ))
{
pThumbRight->dockOpt.hwndLeft = pThumbLeft->hwnd;
pThumbLeft->dockOpt.hwndRight = pThumbRight->hwnd;
@@ -897,7 +897,7 @@ void DockThumbs( ThumbInfo *pThumbLeft, ThumbInfo *pThumbRight, BOOL bMoveLeft ) void UndockThumbs( ThumbInfo *pThumb1, ThumbInfo *pThumb2 )
{
- if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ) )
+ if ( ( pThumb1 == NULL ) || ( pThumb2 == NULL ))
{
return;
}
diff --git a/plugins/FreeImage/Miranda/main.cpp b/plugins/FreeImage/Miranda/main.cpp index 32b5e7a0e6..39befac6e8 100644 --- a/plugins/FreeImage/Miranda/main.cpp +++ b/plugins/FreeImage/Miranda/main.cpp @@ -419,7 +419,7 @@ unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned coun void *newdata;
long newdatalen;
//double the data block size if we need to
- while( FIIOMEM(curpos)+(long)(size*count) >= FIIOMEM(datalen) ) {
+ while( FIIOMEM(curpos)+(long)(size*count) >= FIIOMEM(datalen)) {
//if we are at or above 1G, we cant double without going negative
if ( FIIOMEM(datalen) & 0x40000000 ) {
//max 2G
@@ -443,7 +443,7 @@ unsigned __stdcall fiio_mem_WriteProc(void *buffer, unsigned size, unsigned coun }
memcpy( (char *)FIIOMEM(data) + FIIOMEM(curpos), buffer, size*count );
FIIOMEM(curpos) += size*count;
- if ( FIIOMEM(curpos) > FIIOMEM(filelen) ) {
+ if ( FIIOMEM(curpos) > FIIOMEM(filelen)) {
FIIOMEM(filelen) = FIIOMEM(curpos);
}
return count;
diff --git a/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp b/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp index d87658c24f..584870f359 100644 --- a/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp +++ b/plugins/FreeImage/Source/FreeImage/BitmapAccess.cpp @@ -939,7 +939,7 @@ FreeImage_FindFirstMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, FITAG **tag // get the metadata model
METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
TAGMAP *tagmap = NULL;
- if ( (*metadata).find(model) != (*metadata).end() ) {
+ if ( (*metadata).find(model) != (*metadata).end()) {
tagmap = (*metadata)[model];
}
if(tagmap) {
@@ -1034,7 +1034,7 @@ FreeImage_CloneMetadata(FIBITMAP *dst, FIBITMAP *src) { TAGMAP *src_tagmap = (*i).second;
if(src_tagmap) {
- if ( dst_metadata->find(model) != dst_metadata->end() ) {
+ if ( dst_metadata->find(model) != dst_metadata->end()) {
// destroy dst model
FreeImage_SetMetadata((FREE_IMAGE_MDMODEL)model, dst, NULL, NULL);
}
@@ -1168,11 +1168,11 @@ FreeImage_GetMetadata(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
if (!(*metadata).empty()) {
METADATAMAP::iterator model_iterator = metadata->find(model);
- if (model_iterator != metadata->end() ) {
+ if (model_iterator != metadata->end()) {
// this model exists : try to get the requested tag
tagmap = model_iterator->second;
TAGMAP::iterator tag_iterator = tagmap->find(key);
- if (tag_iterator != tagmap->end() ) {
+ if (tag_iterator != tagmap->end()) {
// get the requested tag
*tag = tag_iterator->second;
}
@@ -1193,7 +1193,7 @@ FreeImage_GetMetadataCount(FREE_IMAGE_MDMODEL model, FIBITMAP *dib) { // get the metadata model
METADATAMAP *metadata = ((FREEIMAGEHEADER *)dib->data)->metadata;
- if ( (*metadata).find(model) != (*metadata).end() ) {
+ if ( (*metadata).find(model) != (*metadata).end()) {
tagmap = (*metadata)[model];
}
if (!tagmap) {
diff --git a/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp b/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp index 5f677eee5c..3e81abdb95 100644 --- a/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp +++ b/plugins/FreeImage/Source/FreeImage/ColorLookup.cpp @@ -568,7 +568,7 @@ FreeImage_LookupX11Color(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nB if ( (szColor[0] == 'g' || szColor[0] == 'G') && (szColor[1] == 'r' || szColor[1] == 'R') && (szColor[2] == 'e' || szColor[2] == 'E' || szColor[2] == 'a' || szColor[2] == 'A' ) && - (szColor[3] == 'y' || szColor[3] == 'Y' ) ) { + (szColor[3] == 'y' || szColor[3] == 'Y' )) { // grey<num>, or gray<num>, num 1...100 i = strtol(szColor+4, NULL, 10); @@ -762,7 +762,7 @@ FreeImage_LookupSVGColor(const char *szColor, BYTE *nRed, BYTE *nGreen, BYTE *nB if ( (szColor[0] == 'g' || szColor[0] == 'G') && (szColor[1] == 'r' || szColor[1] == 'R') && (szColor[2] == 'e' || szColor[2] == 'E' || szColor[2] == 'a' || szColor[2] == 'A' ) && - (szColor[3] == 'y' || szColor[3] == 'Y' ) ) { + (szColor[3] == 'y' || szColor[3] == 'Y' )) { // grey<num>, or gray<num>, num 1...100 i = strtol(szColor+4, NULL, 10); diff --git a/plugins/FreeImage/Source/FreeImage/Conversion8.cpp b/plugins/FreeImage/Source/FreeImage/Conversion8.cpp index 2eaeb94671..867cf756ed 100644 --- a/plugins/FreeImage/Source/FreeImage/Conversion8.cpp +++ b/plugins/FreeImage/Source/FreeImage/Conversion8.cpp @@ -279,7 +279,7 @@ FreeImage_ConvertToGreyscale(FIBITMAP *dib) { // allocate a 24-bit buffer
- BYTE *buffer = (BYTE*)malloc( CalculatePitch(CalculateLine(width, 24)) * sizeof(BYTE) );
+ BYTE *buffer = (BYTE*)malloc( CalculatePitch(CalculateLine(width, 24)) * sizeof(BYTE));
if(NULL == buffer) {
FreeImage_Unload(new_dib);
return NULL;
diff --git a/plugins/FreeImage/Source/FreeImage/FreeImage.cpp b/plugins/FreeImage/Source/FreeImage/FreeImage.cpp index 2de6077eed..b36f10aca1 100644 --- a/plugins/FreeImage/Source/FreeImage/FreeImage.cpp +++ b/plugins/FreeImage/Source/FreeImage/FreeImage.cpp @@ -132,7 +132,7 @@ FreeImage_OutputMessageProc(int fif, const char *fmt, ...) { // check the length of the format string - int str_length = (int)( (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt) ); + int str_length = (int)( (strlen(fmt) > MSG_SIZE) ? MSG_SIZE : strlen(fmt)); // parse the format string and put the result in 'message' diff --git a/plugins/FreeImage/Source/FreeImage/Halftoning.cpp b/plugins/FreeImage/Source/FreeImage/Halftoning.cpp index 82df9b607b..1542fc9268 100644 --- a/plugins/FreeImage/Source/FreeImage/Halftoning.cpp +++ b/plugins/FreeImage/Source/FreeImage/Halftoning.cpp @@ -176,7 +176,7 @@ static FIBITMAP* OrderedDispersedDot(FIBITMAP *dib, int order) { BYTE *matrix = (BYTE*)malloc(l*l * sizeof(BYTE)); for(int i = 0; i < l*l; i++) { // according to "Purdue University: Digital Image Processing Laboratory: Image Halftoning, April 30th, 2006 - matrix[i] = (BYTE)( 255 * (((double)dithervalue(i / l, i % l, order) + 0.5) / (l*l)) ); + matrix[i] = (BYTE)( 255 * (((double)dithervalue(i / l, i % l, order) + 0.5) / (l*l))); } // perform the dithering diff --git a/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp b/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp index 2d8d6e0b4a..d69336f3f5 100644 --- a/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp +++ b/plugins/FreeImage/Source/FreeImage/PluginBMP.cpp @@ -520,7 +520,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit switch (compression) { case BI_RGB : - if ( LoadPixelData(io, handle, dib, height, pitch, bit_count) ) { + if ( LoadPixelData(io, handle, dib, height, pitch, bit_count)) { return dib; } else { throw "Error encountered while decoding BMP data"; @@ -528,7 +528,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit break; case BI_RLE4 : - if ( LoadPixelDataRLE4(io, handle, width, height, dib) ) { + if ( LoadPixelDataRLE4(io, handle, width, height, dib)) { return dib; } else { throw "Error encountered while decoding RLE4 BMP data"; @@ -536,7 +536,7 @@ LoadWindowsBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bit break; case BI_RLE8 : - if ( LoadPixelDataRLE8(io, handle, width, height, dib) ) { + if ( LoadPixelDataRLE8(io, handle, width, height, dib)) { return dib; } else { throw "Error encountered while decoding RLE8 BMP data"; @@ -747,7 +747,7 @@ LoadOS22XBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_ return dib; case BI_RLE4 : - if ( LoadPixelDataRLE4(io, handle, width, height, dib) ) { + if ( LoadPixelDataRLE4(io, handle, width, height, dib)) { return dib; } else { throw "Error encountered while decoding RLE4 BMP data"; @@ -755,7 +755,7 @@ LoadOS22XBMP(FreeImageIO *io, fi_handle handle, int flags, unsigned bitmap_bits_ break; case BI_RLE8 : - if ( LoadPixelDataRLE8(io, handle, width, height, dib) ) { + if ( LoadPixelDataRLE8(io, handle, width, height, dib)) { return dib; } else { throw "Error encountered while decoding RLE8 BMP data"; diff --git a/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp b/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp index bf7c2550ae..7af1d821d8 100644 --- a/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp +++ b/plugins/FreeImage/Source/FreeImage/PluginGIF.cpp @@ -167,7 +167,7 @@ FreeImage_SetMetadataEx(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key static BOOL FreeImage_GetMetadataEx(FREE_IMAGE_MDMODEL model, FIBITMAP *dib, const char *key, FREE_IMAGE_MDTYPE type, FITAG **tag) { - if ( FreeImage_GetMetadata(model, dib, key, tag) ) { + if ( FreeImage_GetMetadata(model, dib, key, tag)) { if ( FreeImage_GetTagType(*tag) == type ) { return TRUE; } @@ -304,7 +304,7 @@ bool StringTable::Compress(BYTE *buf, int *len) m_strmap[nextprefix] = m_nextCode; //increment the next highest valid code, increase the code size - if ( m_nextCode == (1 << m_codeSize) ) { + if ( m_nextCode == (1 << m_codeSize)) { m_codeSize++; } m_nextCode++; @@ -321,7 +321,7 @@ bool StringTable::Compress(BYTE *buf, int *len) } //increment to the next pixel - if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack) ) { + if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack)) { m_bufferShift -= m_bpp; } else { m_bufferPos++; @@ -341,7 +341,7 @@ bool StringTable::Compress(BYTE *buf, int *len) m_prefix = ch & 0x000FF; //increment to the next pixel - if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack) ) { + if ( m_bufferShift > 0 && !(m_bufferPos + 1 == m_bufferSize && m_bufferShift <= m_slack)) { m_bufferShift -= m_bpp; } else { m_bufferPos++; @@ -391,7 +391,7 @@ bool StringTable::Decompress(BYTE *buf, int *len) m_strings[m_nextCode] = m_strings[m_oldCode] + m_strings[code == m_nextCode ? m_oldCode : code][0]; } - if ( (int)m_strings[code].size() > *len - (bufpos - buf) ) { + if ( (int)m_strings[code].size() > *len - (bufpos - buf)) { //out of space, stuff the code back in for next time m_partial <<= m_codeSize; m_partialSize += m_codeSize; @@ -497,7 +497,7 @@ Validate(FreeImageIO *io, fi_handle handle) { } BOOL bResult = FALSE; - if ( !strncmp(buf, "GIF", 3) ) { + if ( !strncmp(buf, "GIF", 3)) { if ( buf[3] >= '0' && buf[3] <= '9' && buf[4] >= '0' && buf[4] <= '9' && buf[5] >= 'a' && buf[5] <= 'z' ) { bResult = TRUE; } @@ -537,7 +537,7 @@ Open(FreeImageIO *io, fi_handle handle, BOOL read) { if ( read ) { try { //Header - if ( !Validate(io, handle) ) { + if ( !Validate(io, handle)) { throw FI_MSG_ERROR_MAGIC_NUMBER; } io->seek_proc(handle, 6, SEEK_CUR); @@ -666,7 +666,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { if ( page == -1 ) { page = 0; } - if ( page < 0 || page >= (int)info->image_descriptor_offsets.size() ) { + if ( page < 0 || page >= (int)info->image_descriptor_offsets.size()) { return NULL; } @@ -787,7 +787,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { if ( pagedib != NULL ) { RGBQUAD *pal = FreeImage_GetPalette(pagedib); have_transparent = false; - if ( FreeImage_IsTransparent(pagedib) ) { + if ( FreeImage_IsTransparent(pagedib)) { int count = FreeImage_GetTransparencyCount(pagedib); BYTE *table = FreeImage_GetTransparencyTable(pagedib); for ( int i = 0; i < count; i++ ) { @@ -814,7 +814,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { //copy frame time if ( page == end ) { FITAG *tag; - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, pagedib, "FrameTime", FIDT_LONG, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, pagedib, "FrameTime", FIDT_LONG, &tag)) { delay_time = *(LONG *)FreeImage_GetTagValue(tag); } } @@ -915,7 +915,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { while( b ) { io->read_proc(stringtable->FillInputBuffer(b), b, 1, handle); int size = sizeof(buf); - while( stringtable->Decompress(buf, &size) ) { + while( stringtable->Decompress(buf, &size)) { for ( int i = 0; i < size; i++ ) { scanline[xpos] |= (buf[i] & mask) << shift; if ( shift > 0 ) { @@ -989,7 +989,7 @@ Load(FreeImageIO *io, fi_handle handle, int page, int flags, void *data) { if ( b == 11 ) { //All AEs start with an 11 byte sub-block to determine what type of AE it is char buf[11]; io->read_proc(buf, 11, 1, handle); - if ( !memcmp(buf, "NETSCAPE2.0", 11) || !memcmp(buf, "ANIMEXTS1.0", 11) ) { //Not everybody recognizes ANIMEXTS1.0 but it is valid + if ( !memcmp(buf, "NETSCAPE2.0", 11) || !memcmp(buf, "ANIMEXTS1.0", 11)) { //Not everybody recognizes ANIMEXTS1.0 but it is valid io->read_proc(&b, 1, 1, handle); if ( b == 3 ) { //we're supposed to have a 3 byte sub-block now io->read_proc(&b, 1, 1, handle); //this should be 0x01 but isn't really important @@ -1089,22 +1089,22 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void int disposal_method = GIF_DISPOSAL_BACKGROUND, delay_time = 100, transparent_color = 0; WORD left = 0, top = 0, width = (WORD)FreeImage_GetWidth(dib), height = (WORD)FreeImage_GetHeight(dib); WORD output_height = height; - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameLeft", FIDT_SHORT, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameLeft", FIDT_SHORT, &tag)) { left = *(WORD *)FreeImage_GetTagValue(tag); } - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTop", FIDT_SHORT, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTop", FIDT_SHORT, &tag)) { top = *(WORD *)FreeImage_GetTagValue(tag); } - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "NoLocalPalette", FIDT_BYTE, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "NoLocalPalette", FIDT_BYTE, &tag)) { no_local_palette = *(BYTE *)FreeImage_GetTagValue(tag) ? true : false; } - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Interlaced", FIDT_BYTE, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Interlaced", FIDT_BYTE, &tag)) { interlaced = *(BYTE *)FreeImage_GetTagValue(tag) ? true : false; } - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", FIDT_LONG, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "FrameTime", FIDT_LONG, &tag)) { delay_time = *(LONG *)FreeImage_GetTagValue(tag); } - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "DisposalMethod", FIDT_BYTE, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "DisposalMethod", FIDT_BYTE, &tag)) { disposal_method = *(BYTE *)FreeImage_GetTagValue(tag); } @@ -1119,14 +1119,14 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void if ( page == 0 ) { //gather some info WORD logicalwidth = width; // width has already been swapped... - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", FIDT_SHORT, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalWidth", FIDT_SHORT, &tag)) { logicalwidth = *(WORD *)FreeImage_GetTagValue(tag); #ifdef FREEIMAGE_BIGENDIAN SwapShort(&logicalwidth); #endif } WORD logicalheight = height; // height has already been swapped... - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", FIDT_SHORT, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "LogicalHeight", FIDT_SHORT, &tag)) { logicalheight = *(WORD *)FreeImage_GetTagValue(tag); #ifdef FREEIMAGE_BIGENDIAN SwapShort(&logicalheight); @@ -1134,7 +1134,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void } RGBQUAD *globalpalette = NULL; int globalpalette_size = 0; - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "GlobalPalette", FIDT_PALETTE, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "GlobalPalette", FIDT_PALETTE, &tag)) { globalpalette_size = FreeImage_GetTagCount(tag); if ( globalpalette_size >= 2 ) { globalpalette = (RGBQUAD *)FreeImage_GetTagValue(tag); @@ -1174,7 +1174,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void globalpalette_size = 256; packed |= 7 & GIF_PACKED_LSD_GCTSIZE; } - if ( FreeImage_GetBackgroundColor(dib, &background_color) ) { + if ( FreeImage_GetBackgroundColor(dib, &background_color)) { for ( int i = 0; i < globalpalette_size; i++ ) { if ( background_color.rgbRed == globalpalette[i].rgbRed && background_color.rgbGreen == globalpalette[i].rgbGreen && @@ -1206,7 +1206,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void //Application Extension LONG loop = 0; - if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Loop", FIDT_LONG, &tag) ) { + if ( FreeImage_GetMetadataEx(FIMD_ANIMATION, dib, "Loop", FIDT_LONG, &tag)) { loop = *(LONG *)FreeImage_GetTagValue(tag); } if ( loop != 1 ) { @@ -1250,7 +1250,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void } //Graphic Control Extension - if ( FreeImage_IsTransparent(dib) ) { + if ( FreeImage_IsTransparent(dib)) { int count = FreeImage_GetTransparencyCount(dib); BYTE *table = FreeImage_GetTransparencyTable(dib); for ( int i = 0; i < count; i++ ) { @@ -1316,9 +1316,9 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void b = sizeof(buf); while( y < output_height ) { memcpy(stringtable->FillInputBuffer(line), FreeImage_GetScanLine(dib, output_height - y - 1), line); - while( stringtable->Compress(bufptr, &size) ) { + while( stringtable->Compress(bufptr, &size)) { bufptr += size; - if ( bufptr - buf == sizeof(buf) ) { + if ( bufptr - buf == sizeof(buf)) { io->write_proc(&b, 1, 1, handle); io->write_proc(buf, sizeof(buf), 1, handle); size = sizeof(buf); @@ -1339,7 +1339,7 @@ Save(FreeImageIO *io, FIBITMAP *dib, fi_handle handle, int page, int flags, void size = (int)(bufptr - buf); BYTE last[4]; w = (WORD)stringtable->CompressEnd(last); - if ( size + w >= sizeof(buf) ) { + if ( size + w >= sizeof(buf)) { //one last full size sub-block io->write_proc(&b, 1, 1, handle); io->write_proc(buf, size, 1, handle); diff --git a/plugins/FreeImage/Source/FreeImage/PluginICO.cpp b/plugins/FreeImage/Source/FreeImage/PluginICO.cpp index 1107841d33..d0ece3514c 100644 --- a/plugins/FreeImage/Source/FreeImage/PluginICO.cpp +++ b/plugins/FreeImage/Source/FreeImage/PluginICO.cpp @@ -100,7 +100,7 @@ CalculateImageOffset(std::vector<FIBITMAP*>& vPages, int nIndex ) { // calculate the ICO header size dwSize = sizeof(ICONHEADER); // add the ICONDIRENTRY's - dwSize += (DWORD)( vPages.size() * sizeof(ICONDIRENTRY) ); + dwSize += (DWORD)( vPages.size() * sizeof(ICONDIRENTRY)); // add the sizes of the previous images for(int k = 0; k < nIndex; k++) { FIBITMAP *icon_dib = (FIBITMAP*)vPages[k]; diff --git a/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp b/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp index b6393de7aa..b69ace95bc 100644 --- a/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp +++ b/plugins/FreeImage/Source/FreeImage/PluginJPEG.cpp @@ -785,7 +785,7 @@ read_markers(j_decompress_ptr cinfo, FIBITMAP *dib) { BYTE *icc_profile = NULL; unsigned icc_length = 0; - if ( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length) ) { + if ( jpeg_read_icc_profile(cinfo, &icc_profile, &icc_length)) { // copy ICC profile data FreeImage_CreateICCProfile(dib, icc_profile, icc_length); // clean up diff --git a/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp b/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp index c40ee29c60..367cb13c96 100644 --- a/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp +++ b/plugins/FreeImage/Source/FreeImage/tmoColorConvert.cpp @@ -61,10 +61,10 @@ static const float CIE_y_b = 0.060F; static const float CIE_x_w = 0.3127F; // Illuminant D65
static const float CIE_y_w = 0.3290F;
-static const float CIE_D = ( CIE_x_r*(CIE_y_g - CIE_y_b) + CIE_x_g*(CIE_y_b - CIE_y_r) + CIE_x_b*(CIE_y_r - CIE_y_g) );
-static const float CIE_C_rD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_g - CIE_y_b) - CIE_y_w*(CIE_x_g - CIE_x_b) + CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g) );
-static const float CIE_C_gD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_b - CIE_y_r) - CIE_y_w*(CIE_x_b - CIE_x_r) - CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r) );
-static const float CIE_C_bD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_r - CIE_y_g) - CIE_y_w*(CIE_x_r - CIE_x_g) + CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r) );
+static const float CIE_D = ( CIE_x_r*(CIE_y_g - CIE_y_b) + CIE_x_g*(CIE_y_b - CIE_y_r) + CIE_x_b*(CIE_y_r - CIE_y_g));
+static const float CIE_C_rD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_g - CIE_y_b) - CIE_y_w*(CIE_x_g - CIE_x_b) + CIE_x_g*CIE_y_b - CIE_x_b*CIE_y_g));
+static const float CIE_C_gD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_b - CIE_y_r) - CIE_y_w*(CIE_x_b - CIE_x_r) - CIE_x_r*CIE_y_b + CIE_x_b*CIE_y_r));
+static const float CIE_C_bD = ( (1/CIE_y_w) * ( CIE_x_w*(CIE_y_r - CIE_y_g) - CIE_y_w*(CIE_x_r - CIE_x_g) + CIE_x_r*CIE_y_g - CIE_x_g*CIE_y_r));
/**
RGB to XYZ (no white balance)
@@ -415,8 +415,8 @@ static void findMaxMinPercentile(FIBITMAP *Y, float minPrct, float *minLum, floa std::sort(vY.begin(), vY.end());
- *minLum = vY.at( int(minPrct * vY.size()) );
- *maxLum = vY.at( int(maxPrct * vY.size()) );
+ *minLum = vY.at( int(minPrct * vY.size()));
+ *maxLum = vY.at( int(maxPrct * vY.size()));
}
/**
diff --git a/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp b/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp index 71be370b3e..bcd4524523 100644 --- a/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp +++ b/plugins/FreeImage/Source/FreeImage/tmoFattal02.cpp @@ -283,7 +283,7 @@ static FIBITMAP* PhiMatrix(FIBITMAP **gradients, float *avgGrad, int nlevels, fl }
if(k < nlevels-1) {
- // compute PHI(k) = L( PHI(k+1) ) * phi(k)
+ // compute PHI(k) = L( PHI(k+1)) * phi(k)
FIBITMAP *L = FreeImage_Rescale(phi[k+1], width, height, FILTER_BILINEAR);
if (!L) throw(1);
diff --git a/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp b/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp index dfa6553806..969aa4c950 100644 --- a/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp +++ b/plugins/FreeImage/Source/FreeImage/tmoReinhard05.cpp @@ -113,7 +113,7 @@ ToneMappingReinhard05(FIBITMAP *dib, FIBITMAP *Y, float f, float m, float a, flo for(x = 0; x < width; x++) { I_a = Y[x]; // luminance(x, y) for (i = 0; i < 3; i++) { - *color /= ( *color + pow(f * I_a, m) ); + *color /= ( *color + pow(f * I_a, m)); max_color = (*color > max_color) ? *color : max_color; min_color = (*color < min_color) ? *color : min_color; @@ -164,7 +164,7 @@ ToneMappingReinhard05(FIBITMAP *dib, FIBITMAP *Y, float f, float m, float a, flo I_l = c * *color + (1-c) * L; I_g = c * Cav[i] + (1-c) * Lav; I_a = a * I_l + (1-a) * I_g; - *color /= ( *color + pow(f * I_a, m) ); + *color /= ( *color + pow(f * I_a, m)); max_color = (*color > max_color) ? *color : max_color; min_color = (*color < min_color) ? *color : min_color; diff --git a/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp b/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp index 7046a4acc9..d38d8c1bcd 100644 --- a/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp +++ b/plugins/FreeImage/Source/FreeImageToolkit/ClassicRotate.cpp @@ -730,7 +730,7 @@ Rotate45(FIBITMAP *src, double dAngle, const void *bkcolor) { } else { // Negative angle - dOffset = dTan * ( (src_width - 1.0) * -dSinE + (1.0 - height_3) ); + dOffset = dTan * ( (src_width - 1.0) * -dSinE + (1.0 - height_3)); } for(u = 0; u < height_3; u++, dOffset += dTan) { int iShear = int(floor(dOffset)); @@ -878,7 +878,7 @@ FreeImage_Rotate(FIBITMAP *dib, double angle, const void *bkcolor) { // copy background color RGBQUAD bkcolor; - if ( FreeImage_GetBackgroundColor(dib, &bkcolor) ) { + if ( FreeImage_GetBackgroundColor(dib, &bkcolor)) { FreeImage_SetBackgroundColor(dst, &bkcolor); } diff --git a/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp b/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp index 59757287ed..753fdc736e 100644 --- a/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp +++ b/plugins/FreeImage/Source/FreeImageToolkit/CopyPaste.cpp @@ -608,7 +608,7 @@ FreeImage_Copy(FIBITMAP *src, int left, int top, int right, int bottom) { // copy background color RGBQUAD bkcolor; - if ( FreeImage_GetBackgroundColor(src, &bkcolor) ) { + if ( FreeImage_GetBackgroundColor(src, &bkcolor)) { FreeImage_SetBackgroundColor(dst, &bkcolor); } diff --git a/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp b/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp index c5345497f5..2d7399dcb2 100644 --- a/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp +++ b/plugins/FreeImage/Source/FreeImageToolkit/JPEGTransform.cpp @@ -211,7 +211,7 @@ LosslessTransform(const FilenameIO *filenameIO, FREE_IMAGE_JPEG_OPERATION operat // Prepare transformation workspace // Fails right away if perfect flag is TRUE and transformation is not perfect - if ( !jtransform_request_workspace(&srcinfo, &transfoptions) ) { + if ( !jtransform_request_workspace(&srcinfo, &transfoptions)) { FreeImage_OutputMessageProc(FIF_JPEG, "Transformation is not perfect"); throw(1); } diff --git a/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp b/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp index 6d17d45319..a31961447a 100644 --- a/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp +++ b/plugins/FreeImage/Source/FreeImageToolkit/MultigridPoissonSolver.cpp @@ -68,7 +68,7 @@ static void fmg_restrict(FIBITMAP *UC, FIBITMAP *UF, int nc) { // 0.5 * UF(row_uf, col_uf) + 0.125 * [ UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf) + UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1) ] float *uc_pixel = uc_scan + col_uc; const float *uf_center = uf_scan + col_uf; - *uc_pixel = 0.5F * *uf_center + 0.125F * ( *(uf_center + uf_pitch) + *(uf_center - uf_pitch) + *(uf_center + 1) + *(uf_center - 1) ); + *uc_pixel = 0.5F * *uf_center + 0.125F * ( *(uf_center + uf_pitch) + *(uf_center - uf_pitch) + *(uf_center + 1) + *(uf_center - 1)); } uc_scan += uc_pitch; } @@ -158,8 +158,8 @@ static void fmg_prolongate(FIBITMAP *UF, FIBITMAP *UC, int nf) { for(row_uf = 1; row_uf < nf-1; row_uf += 2) { float *uf_scan = uf_bits + row_uf * uf_pitch; for (col_uf = 0; col_uf < nf; col_uf += 2) { - // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf) ) - uf_scan[col_uf] = 0.5F * ( *(uf_scan + uf_pitch + col_uf) + *(uf_scan - uf_pitch + col_uf) ); + // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf+1, col_uf) + UF(row_uf-1, col_uf)) + uf_scan[col_uf] = 0.5F * ( *(uf_scan + uf_pitch + col_uf) + *(uf_scan - uf_pitch + col_uf)); } } } @@ -168,7 +168,7 @@ static void fmg_prolongate(FIBITMAP *UF, FIBITMAP *UC, int nf) { float *uf_scan = uf_bits; for(row_uf = 0; row_uf < nf; row_uf++) { for (col_uf = 1; col_uf < nf-1; col_uf += 2) { - // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1) ) + // calculate UF(row_uf, col_uf) = 0.5 * ( UF(row_uf, col_uf+1) + UF(row_uf, col_uf-1)) uf_scan[col_uf] = 0.5F * ( uf_scan[col_uf + 1] + uf_scan[col_uf - 1] ); } uf_scan += uf_pitch; diff --git a/plugins/FreeImage/Source/LibJPEG/jcparam.c b/plugins/FreeImage/Source/LibJPEG/jcparam.c index c5e85dda55..1c81d2ec59 100644 --- a/plugins/FreeImage/Source/LibJPEG/jcparam.c +++ b/plugins/FreeImage/Source/LibJPEG/jcparam.c @@ -422,7 +422,7 @@ jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) compptr->v_samp_factor = (vsamp), \ compptr->quant_tbl_no = (quant), \ compptr->dc_tbl_no = (dctbl), \ - compptr->ac_tbl_no = (actbl) ) + compptr->ac_tbl_no = (actbl)) /* Safety check to ensure start_compress not called yet. */ if (cinfo->global_state != CSTATE_START) diff --git a/plugins/FreeImage/Source/LibPNG/png.c b/plugins/FreeImage/Source/LibPNG/png.c index 5a490b2d92..0df53a62af 100644 --- a/plugins/FreeImage/Source/LibPNG/png.c +++ b/plugins/FreeImage/Source/LibPNG/png.c @@ -1035,13 +1035,13 @@ int png_XYZ_from_xy(png_XYZ *XYZ, png_xy xy) *
* red-scale =
* ( (green-x - blue-x) * (white-y - blue-y) -
- * (green-y - blue-y) * (white-x - blue-x) ) / white-y
+ * (green-y - blue-y) * (white-x - blue-x)) / white-y
* -------------------------------------------------------------------------
* (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x)
*
* green-scale =
* ( (red-y - blue-y) * (white-x - blue-x) -
- * (red-x - blue-x) * (white-y - blue-y) ) / white-y
+ * (red-x - blue-x) * (white-y - blue-y)) / white-y
* -------------------------------------------------------------------------
* (green-x - blue-x)*(red-y - blue-y)-(green-y - blue-y)*(red-x - blue-x)
*
diff --git a/plugins/FreeImage/Source/LibPNG/pngconf.h b/plugins/FreeImage/Source/LibPNG/pngconf.h index 3fea47b860..121d204ccd 100644 --- a/plugins/FreeImage/Source/LibPNG/pngconf.h +++ b/plugins/FreeImage/Source/LibPNG/pngconf.h @@ -182,9 +182,9 @@ * conventions of the various functions.
*/
#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
- defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\
+ defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)) &&\
( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\
- defined(_M_X64) || defined(_M_IA64) )
+ defined(_M_X64) || defined(_M_IA64))
/* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes
* builds under Cygwin or MinGW. Also includes Watcom builds but these need
* special treatment because they are not compatible with GCC or Visual C
diff --git a/plugins/FreeImage/Source/LibPNG/pngpriv.h b/plugins/FreeImage/Source/LibPNG/pngpriv.h index 5f751de23d..02cc5d8c53 100644 --- a/plugins/FreeImage/Source/LibPNG/pngpriv.h +++ b/plugins/FreeImage/Source/LibPNG/pngpriv.h @@ -532,7 +532,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; #define PNG_ROWBYTES(pixel_bits, width) \
((pixel_bits) >= 8 ? \
((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
- (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
+ (( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3))
/* PNG_OUT_OF_RANGE returns true if value is outside the range
* ideal-delta..ideal+delta. Each argument is evaluated twice.
@@ -540,7 +540,7 @@ typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp; * integers, "value" a variable. Added to libpng-1.2.6 JB
*/
#define PNG_OUT_OF_RANGE(value, ideal, delta) \
- ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
+ ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta))
/* Conversions between fixed and floating point, only defined if
* required (to make sure the code doesn't accidentally use float
diff --git a/plugins/FreeImage/Source/LibPNG/pngrtran.c b/plugins/FreeImage/Source/LibPNG/pngrtran.c index 26083a0dd5..bbee10ce56 100644 --- a/plugins/FreeImage/Source/LibPNG/pngrtran.c +++ b/plugins/FreeImage/Source/LibPNG/pngrtran.c @@ -4331,7 +4331,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row, png_structp png_ptr) ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)|
((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|
((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|
- ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));
+ ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6)));
sp++;
}
}
diff --git a/plugins/HistoryLinkListPlus/linklist_dlg.c b/plugins/HistoryLinkListPlus/linklist_dlg.c index 150e7d7d29..80d6b23f8f 100644 --- a/plugins/HistoryLinkListPlus/linklist_dlg.c +++ b/plugins/HistoryLinkListPlus/linklist_dlg.c @@ -153,7 +153,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) }
else if ( pENLink->msg == WM_LBUTTONUP )
{
- link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR) );
+ link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&pENLink->chrg));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link);
@@ -183,7 +183,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM)hSubMenu, 0);
- link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR) );
+ link = (LPTSTR)malloc( (pENLink->chrg.cpMax-pENLink->chrg.cpMin+2)*sizeof(TCHAR));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_EXSETSEL, 0, (LPARAM)(&(pENLink->chrg)));
SendDlgItemMessage(hDlg, IDC_MAIN, EM_GETSELTEXT, 0, (LPARAM)link);
@@ -191,7 +191,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) pt.y = (short) HIWORD(((ENLINK *) lParam)->lParam);
ClientToScreen(((NMHDR *) lParam)->hwndFrom, &pt);
- switch ( TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, NULL) )
+ switch ( TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hDlg, NULL))
{
case IDM_LINK_OPEN:
{
@@ -215,7 +215,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) {
size_t dataLen;
HGLOBAL hData;
- if ( !OpenClipboard(hDlg) )
+ if ( !OpenClipboard(hDlg))
break;
EmptyClipboard();
@@ -288,7 +288,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) SetDlgItemText(hDlg, IDC_STATUS, filter);
// not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
{
SetDlgItemText(hDlg, IDC_MAIN, _T(""));
@@ -317,7 +317,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) SetDlgItemText(hDlg, IDC_STATUS, filter);
// not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
{
SetDlgItemText(hDlg, IDC_MAIN, _T(""));
if ( GetMenuState(listMenu, IDM_DIR_OUT, MF_BYCOMMAND) == MF_CHECKED )
@@ -345,7 +345,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) SetDlgItemText(hDlg, IDC_STATUS, filter);
// not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
{
SetDlgItemText(hDlg, IDC_MAIN, _T(""));
if ( GetMenuState(listMenu, IDM_TYPE_WEB, MF_BYCOMMAND) == MF_CHECKED )
@@ -370,7 +370,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) else if ( wParam == IDM_TYPE_MAIL )
{
// not possible if search dialog is open
- if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( !(GetMenuState(listMenu, IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
{
SetDlgItemText(hDlg, IDC_MAIN, _T(""));
if ( GetMenuState(listMenu, IDM_TYPE_MAIL, MF_BYCOMMAND) == MF_CHECKED )
@@ -540,7 +540,7 @@ INT_PTR WINAPI SearchDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam flags = flags | SLL_DEEP;
length = GetWindowTextLength(GetDlgItem(hDlg, IDC_SEARCHSTRING))+1;
- buffer = (LPTSTR)malloc( length*sizeof(TCHAR) );
+ buffer = (LPTSTR)malloc( length*sizeof(TCHAR));
GetDlgItemText(hDlg, IDC_SEARCHSTRING, buffer, length);
WriteLinkList(hListDlg, flags, DlgParam->listStart, buffer, 0);
free(buffer);
diff --git a/plugins/HistoryLinkListPlus/linklist_fct.c b/plugins/HistoryLinkListPlus/linklist_fct.c index da7771e8c0..4d73448865 100644 --- a/plugins/HistoryLinkListPlus/linklist_fct.c +++ b/plugins/HistoryLinkListPlus/linklist_fct.c @@ -83,10 +83,10 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart) //hyperlinks are delimited by: <non-alphanumeric>"hyperlink"<whitespace>
//then all punctuation is stripped from the end of "hyperlink"
iLastAlphaNum = 0;
- while ( msg[i] && !_istalnum(msg[i]) )
+ while ( msg[i] && !_istalnum(msg[i]))
{
// support for files
- if ( (msg[i]==_T('\\')) && (msg[i+1]==_T('\\')) && (_istalnum(msg[i+2])) )
+ if ( (msg[i]==_T('\\')) && (msg[i+1]==_T('\\')) && (_istalnum(msg[i+2])))
{
break;
}
@@ -94,20 +94,20 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart) if(IsDBCSLeadByte(msg[i]) && msg[i+1]) i++;
i++;
- if ( msg[i] != _T('\n') ) charCount++;
+ if ( msg[i] != _T('\n')) charCount++;
}
- if ( msg[i] == _T('\0') ) break;
+ if ( msg[i] == _T('\0')) break;
cpWordStart = charCount;
wordStart = i;
- while ( msg[i] && !_istspace(msg[i]) )
+ while ( msg[i] && !_istspace(msg[i]))
{
if ( IsDBCSLeadByte(msg[i] ) && msg[i+1]) i++;
else
- if ( _istalnum(msg[i]) || msg[i]==_T('/') )
+ if ( _istalnum(msg[i]) || msg[i]==_T('/'))
{
cpLastAlphaNum = charCount;
iLastAlphaNum = i;
@@ -133,7 +133,7 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart) for ( j=0; j<_countof(hyperlinkPrefixes); j++ )
{
- if ( !_tcsncmp(wordsearch, hyperlinkPrefixes[j], _tcslen(hyperlinkPrefixes[j])) )
+ if ( !_tcsncmp(wordsearch, hyperlinkPrefixes[j], _tcslen(hyperlinkPrefixes[j])))
{
isLink = 1;
break;
@@ -143,7 +143,7 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart) if ( !isLink ) {
for ( j=0; j<_countof(hyperlinkSubstrings); j++ )
{
- if ( _tcsstr(wordsearch+1,hyperlinkSubstrings[j]) )
+ if ( _tcsstr(wordsearch+1,hyperlinkSubstrings[j]))
{
isLink = 1;
break;
@@ -151,7 +151,7 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart) }
}
- if ( _tcschr(wordsearch,_T('@')) && _tcschr(wordsearch,_T('.')) && !_tcschr(wordsearch,_T(':')) && !_tcschr(wordsearch,_T('/')) )
+ if ( _tcschr(wordsearch,_T('@')) && _tcschr(wordsearch,_T('.')) && !_tcschr(wordsearch,_T(':')) && !_tcschr(wordsearch,_T('/')))
{
isLink = 1; //e-mail addresses
type = LINK_MAIL;
@@ -160,15 +160,15 @@ int ExtractURI(DBEVENTINFO *dbei, HANDLE hEvent, LISTELEMENT *listStart) type = LINK_URL;
}
- if ( isLink && ( (i-wordStart+1) <= (int)(LINK_MAX - _mstrlen(_T("http://")))) )
+ if ( isLink && ( (i-wordStart+1) <= (int)(LINK_MAX - _mstrlen(_T("http://")))))
{
LPTSTR tok_ctx;
- if ( (_tcsstr(wordsearch, _T("www.")) != NULL) && (_tcsstr(wordsearch, _T("http://")) == NULL) )
+ if ( (_tcsstr(wordsearch, _T("www.")) != NULL) && (_tcsstr(wordsearch, _T("http://")) == NULL))
{
_tcsncpy_s(link, _countof(link), _T("http://"), _mstrlen(_T("http://")));
// Link longer than defined max -> cut link to max
- if ( (i-wordStart+1) > (int)(LINK_MAX-_mstrlen(_T("http://"))) )
+ if ( (i-wordStart+1) > (int)(LINK_MAX-_mstrlen(_T("http://"))))
_tcsncpy_s(link + _mstrlen(_T("http://")), _countof(link), word, LINK_MAX - _mstrlen(_T("http://")));
else
_tcsncpy_s(link + _mstrlen(_T("http://")), _countof(link), word, i-wordStart+1);
@@ -315,12 +315,12 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc if ( append == 0 )
ShowWindow(GetDlgItem(hDlg, IDC_MAIN), SW_HIDE);
- if ( (append > 0) && (GetMenuState(GetMenu(hDlg), IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED) )
+ if ( (append > 0) && (GetMenuState(GetMenu(hDlg), IDM_SEARCH, MF_BYCOMMAND) & MF_DISABLED))
return;
- if ( GetDlgItem(hDlg, IDC_MAIN) && GetDlgItem(hDlg, IDC_MESSAGE) )
+ if ( GetDlgItem(hDlg, IDC_MAIN) && GetDlgItem(hDlg, IDC_MESSAGE))
{
- SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK) );
+ SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETEVENTMASK, 0, (LPARAM)(ENM_LINK));
SendDlgItemMessage( hDlg, IDC_MAIN, EM_AUTOURLDETECT, TRUE, 0 );
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETBKGNDCOLOR, FALSE, colourSet.background);
@@ -338,7 +338,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc // How to set RTF colour, font, etc.... found at
// http://www.winehq.com/hypermail/wine-devel/2004/08/0608.html
- ZeroMemory(&pf, sizeof(pf) );
+ ZeroMemory(&pf, sizeof(pf));
pf.cbSize = sizeof(pf);
pf.dwMask = PFM_ALIGNMENT;
pf.wAlignment = PFA_LEFT;
@@ -346,7 +346,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc if ( searchString != NULL )
{
- ZeroMemory( &cf, sizeof(cf) );
+ ZeroMemory( &cf, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE | CFM_COLOR;
cf.dwEffects = CFE_BOLD;
@@ -360,7 +360,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc linePos += 2;
}
- ZeroMemory(&cf, sizeof(cf) );
+ ZeroMemory(&cf, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_FACE | CFM_BOLD;
_tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
@@ -408,16 +408,16 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc filter2 = 0;
filter3 = 0;
- if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN) )
+ if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN))
filter1 = 1;
- else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT) )
+ else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT))
filter1 = 1;
- if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL) )
+ if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL))
filter2 = 1;
- else if ( (params & WLL_URL) && (actualElement->type == LINK_URL) )
+ else if ( (params & WLL_URL) && (actualElement->type == LINK_URL))
filter2 = 1;
- else if ( (params & WLL_FILE) && (actualElement->type == LINK_FILE) )
+ else if ( (params & WLL_FILE) && (actualElement->type == LINK_FILE))
filter2 = 1;
@@ -435,7 +435,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc CallService(MS_DB_EVENT_GET, (WPARAM)actualElement->hEvent, (LPARAM)&dbe);
dbe.pBlob[dbe.cbBlob] = 0;
msg = DbGetEventTextT(&dbe, CP_ACP);
- if ( _tcsstr(msg, searchString) )
+ if ( _tcsstr(msg, searchString))
filter3 = 1;
free(dbe.pBlob);
@@ -446,14 +446,14 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc }
else
{
- if ( _tcsstr(actualElement->link, searchString) )
+ if ( _tcsstr(actualElement->link, searchString))
filter3 = 1;
}
}
else
filter3 = 1;
- if ( (filter1 == 1) && (filter2 == 1) && (filter3 == 1) )
+ if ( (filter1 == 1) && (filter2 == 1) && (filter3 == 1))
{
LPCTSTR type;
@@ -485,7 +485,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc _tcscpy_s(cf.szFaceName, _countof(cf.szFaceName), _T("Courier"));
SendDlgItemMessage( hDlg, IDC_MAIN, EM_SETCHARFORMAT, SCF_SELECTION | SCF_WORD, (LPARAM) &cf);
}
- ZeroMemory( &cf, sizeof(cf) );
+ ZeroMemory( &cf, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_COLOR;
@@ -523,7 +523,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc linePos++;
actualElement->linePos = linePos;
actCount++;
- if ( hwndProgress && ( ((int)(((float)actCount/listCount)*100.00)) % 10 == 0 ) )
+ if ( hwndProgress && ( ((int)(((float)actCount/listCount)*100.00)) % 10 == 0 ))
SendMessage(hwndProgress, WM_COMMAND, 100,((int)(((float)actCount/listCount)*100.00)));
}
@@ -536,7 +536,7 @@ void WriteLinkList(HWND hDlg, BYTE params, LISTELEMENT *listStart, LPCTSTR searc }
else if ( searchString == NULL )
{
- ZeroMemory( &cf, sizeof(cf) );
+ ZeroMemory( &cf, sizeof(cf));
cf.cbSize = sizeof(cf);
cf.dwMask = CFM_ITALIC | CFM_BOLD | CFM_FACE;
cf.dwEffects = CFE_BOLD;
@@ -817,14 +817,14 @@ void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, siz filter2 = 0;
filter3 = 0;
- if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN) )
+ if ( (params & WLL_IN) && (actualElement->direction == DIRECTION_IN))
filter1 = 1;
- else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT) )
+ else if ( (params & WLL_OUT) && (actualElement->direction == DIRECTION_OUT))
filter1 = 1;
- if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL) )
+ if ( (params & WLL_MAIL) && (actualElement->type == LINK_MAIL))
filter2 = 1;
- else if ( (params & WLL_URL) && (actualElement->type == LINK_URL) )
+ else if ( (params & WLL_URL) && (actualElement->type == LINK_URL))
filter2 = 1;
if ( searchString != NULL )
@@ -840,7 +840,7 @@ void GetListInfo(BYTE params, LISTELEMENT *listStart, LPCTSTR searchString, siz dbe.pBlob = (PBYTE)malloc(dbe.cbBlob+1);
CallService(MS_DB_EVENT_GET, (WPARAM)actualElement->hEvent, (LPARAM)&dbe);
dbe.pBlob[dbe.cbBlob] = 0;
- if ( _tcsstr((LPTSTR)dbe.pBlob, searchString) )
+ if ( _tcsstr((LPTSTR)dbe.pBlob, searchString))
filter3 = 1;
free(dbe.pBlob);
@@ -1255,7 +1255,7 @@ int DBUpdate(WPARAM wParam, LPARAM lParam) dbe.pBlob = (PBYTE)malloc((size_t)dbe.cbBlob+1);
CallService(MS_DB_EVENT_GET, (WPARAM)hEvent, (LPARAM)&dbe);
- if ( (dbe.eventType == EVENTTYPE_URL) || (dbe.eventType == EVENTTYPE_MESSAGE) )
+ if ( (dbe.eventType == EVENTTYPE_URL) || (dbe.eventType == EVENTTYPE_MESSAGE))
{
// Call function to find URIs
linkNum = ExtractURI(&dbe, hEvent, DlgParam->listStart);
@@ -1324,7 +1324,7 @@ BOOL SaveEditAsStream( HWND hDlg ) ofn.lpstrTitle = _T("Save RTF File");
ofn.Flags = OFN_OVERWRITEPROMPT;
// Get a filename or quit
- if ( ! GetSaveFileName( &ofn ) )
+ if ( ! GetSaveFileName( &ofn ))
return FALSE;
// Create the specified file
hFile = CreateFile( szFilename, GENERIC_WRITE, 0, NULL,
diff --git a/plugins/HistorySweeperLight/historysweeperlight.c b/plugins/HistorySweeperLight/historysweeperlight.c index ee99f0d5c6..50cc7e1386 100644 --- a/plugins/HistorySweeperLight/historysweeperlight.c +++ b/plugins/HistorySweeperLight/historysweeperlight.c @@ -183,7 +183,7 @@ void SweepHistoryFromContact(HANDLE hContact, CriteriaStruct Criteria, BOOL keep // should we stop processing?
// lPolicy == 1 - for time criterion, lPolicy == 2 - keep N last events, lPolicy == 3 - delete all events
- if ( (lPolicy == 1 && (unsigned)Criteria.time < dbei.timestamp) || (lPolicy == 2 && Criteria.keep > --eventsCnt) ) break;
+ if ( (lPolicy == 1 && (unsigned)Criteria.time < dbei.timestamp) || (lPolicy == 2 && Criteria.keep > --eventsCnt)) break;
doDelete = TRUE;
diff --git a/plugins/HistorySweeperLight/main.c b/plugins/HistorySweeperLight/main.c index 150f54a95f..3174ab1369 100644 --- a/plugins/HistorySweeperLight/main.c +++ b/plugins/HistorySweeperLight/main.c @@ -57,7 +57,7 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam) StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if ( !(sicd->flags & MBCF_RIGHTBUTTON) && !lstrcmpA(sicd->szModule, ModuleName)
- && DBGetContactSettingByte(NULL, ModuleName, "ChangeInMW", 0) )
+ && DBGetContactSettingByte(NULL, ModuleName, "ChangeInMW", 0))
{
int nh = sicd->dwId; HANDLE hContact = (HANDLE)wParam; StatusIconData sid = {0};
diff --git a/plugins/ListeningTo/commons.h b/plugins/ListeningTo/commons.h index 3d8aeee91a..d0a9fc5b0c 100644 --- a/plugins/ListeningTo/commons.h +++ b/plugins/ListeningTo/commons.h @@ -85,7 +85,7 @@ extern BOOL loaded; #define MIR_FREE(_X_) { mir_free(_X_); _X_ = NULL; }
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define MIN_TIME_BEETWEEN_SETS 10000 // ms
@@ -119,10 +119,10 @@ static bool IsEmpty(const WCHAR *str) return str == NULL || str[0] == 0;
}
-#define DUP(_X_) ( IsEmpty(_X_) ? NULL : mir_tstrdup(_X_) )
-#define DUPD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_tstrdup(_DEF_) : mir_tstrdup(_X_) )
-#define U2T(_X_) ( IsEmpty(_X_) ? NULL : mir_u2t(_X_) )
-#define U2TD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_u2t(_DEF_) : mir_u2t(_X_) )
+#define DUP(_X_) ( IsEmpty(_X_) ? NULL : mir_tstrdup(_X_))
+#define DUPD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_tstrdup(_DEF_) : mir_tstrdup(_X_))
+#define U2T(_X_) ( IsEmpty(_X_) ? NULL : mir_u2t(_X_))
+#define U2TD(_X_, _DEF_) ( IsEmpty(_X_) ? mir_u2t(_DEF_) : mir_u2t(_X_))
#endif // __COMMONS_H__
diff --git a/plugins/ListeningTo/listeningto.cpp b/plugins/ListeningTo/listeningto.cpp index 486a32b7a2..265c208c34 100644 --- a/plugins/ListeningTo/listeningto.cpp +++ b/plugins/ListeningTo/listeningto.cpp @@ -158,9 +158,9 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_HOTKEYS_TOGGLE, HotkeysToggle));
// Hooks
- hHooks.push_back( HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded) );
- hHooks.push_back( HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown) );
- hHooks.push_back( HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged) );
+ hHooks.push_back( HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded));
+ hHooks.push_back( HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown));
+ hHooks.push_back( HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged));
hEnableStateChangedEvent = CreateHookableEvent(ME_LISTENINGTO_ENABLE_STATE_CHANGED);
hListeningInfoChangedEvent = CreateHookableEvent(ME_LISTENINGTO_LISTENING_INFO_CHANGED);
@@ -354,7 +354,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) }
else if (hExtraIcon == NULL && ServiceExists(MS_CLIST_EXTRA_ADD_ICON))
{
- hHooks.push_back( HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, ClistExtraListRebuild) );
+ hHooks.push_back( HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, ClistExtraListRebuild));
}
{
@@ -409,7 +409,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) RegisterProtocol(protos[i]->szModuleName, protos[i]->tszAccountName);
}
- hHooks.push_back( HookEvent(ME_PROTO_ACCLISTCHANGED, AccListChanged) );
+ hHooks.push_back( HookEvent(ME_PROTO_ACCLISTCHANGED, AccListChanged));
}
else
{
@@ -433,7 +433,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) RebuildMenu();
- hHooks.push_back( HookEvent(ME_TTB_MODULELOADED, TopToolBarLoaded) );
+ hHooks.push_back( HookEvent(ME_TTB_MODULELOADED, TopToolBarLoaded));
// Variables support
if (ServiceExists(MS_VARS_REGISTERTOKEN))
@@ -562,7 +562,7 @@ int TopToolBarLoaded(WPARAM wParam, LPARAM lParam) {
BOOL enabled = ListeningToEnabled(NULL, TRUE);
- hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_TTB, TopToolBarClick) );
+ hServices.push_back( CreateServiceFunction(MS_LISTENINGTO_TTB, TopToolBarClick));
TTBButton ttb = {0};
ttb.cbSize = sizeof(ttb);
diff --git a/plugins/ListeningTo/players/itunes.cpp b/plugins/ListeningTo/players/itunes.cpp index b00e6e4189..4801b2c78f 100644 --- a/plugins/ListeningTo/players/itunes.cpp +++ b/plugins/ListeningTo/players/itunes.cpp @@ -77,20 +77,20 @@ BOOL ITunes::InitAndGetFilename() if (hwnd == NULL)
return FALSE;
- CALL( CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, __uuidof(iTunesApp), (void **)&iTunesApp) );
+ CALL( CoCreateInstance(CLSID_iTunesApp, NULL, CLSCTX_LOCAL_SERVER, __uuidof(iTunesApp), (void **)&iTunesApp));
ITPlayerState state;
- CALL( iTunesApp->get_PlayerState(&state) );
+ CALL( iTunesApp->get_PlayerState(&state));
if (state == ITPlayerStateStopped)
return FALSE;
- CALL( iTunesApp->get_CurrentTrack(&track) );
+ CALL( iTunesApp->get_CurrentTrack(&track));
if (track == NULL)
return FALSE;
- CALL( track->QueryInterface(__uuidof(file), (void **)&file) );
+ CALL( track->QueryInterface(__uuidof(file), (void **)&file));
- CALL( file->get_Location(&ret) );
+ CALL( file->get_Location(&ret));
return !IsEmpty(ret);
}
@@ -101,33 +101,33 @@ BOOL ITunes::FillCache() HRESULT hr;
long lret;
- CALL( track->get_Album(&ret) );
+ CALL( track->get_Album(&ret));
listening_info.ptszAlbum = U2T(ret);
- CALL( track->get_Artist(&ret) );
+ CALL( track->get_Artist(&ret));
listening_info.ptszArtist = U2T(ret);
- CALL( track->get_Name(&ret) );
+ CALL( track->get_Name(&ret));
listening_info.ptszTitle = U2T(ret);
- CALL( track->get_Year(&lret) );
+ CALL( track->get_Year(&lret));
if (lret > 0)
{
listening_info.ptszYear = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
_itot(lret, listening_info.ptszYear, 10);
}
- CALL( track->get_TrackNumber(&lret) );
+ CALL( track->get_TrackNumber(&lret));
if (lret > 0)
{
listening_info.ptszTrack = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
_itot(lret, listening_info.ptszTrack, 10);
}
- CALL( track->get_Genre(&ret) );
+ CALL( track->get_Genre(&ret));
listening_info.ptszGenre = U2T(ret);
- CALL( track->get_Duration(&lret) );
+ CALL( track->get_Duration(&lret));
if (lret > 0)
{
listening_info.ptszLength = (TCHAR*) mir_alloc(10 * sizeof(TCHAR));
diff --git a/plugins/ListeningTo/players/watrack.cpp b/plugins/ListeningTo/players/watrack.cpp index 133c97e57f..790613e856 100644 --- a/plugins/ListeningTo/players/watrack.cpp +++ b/plugins/ListeningTo/players/watrack.cpp @@ -101,7 +101,7 @@ void WATrack::GetData() if (playing != WAT_PLS_NORMAL
|| si == NULL
|| si->status != 1
- || ( IsEmpty(si->artist) && IsEmpty(si->title) ) )
+ || ( IsEmpty(si->artist) && IsEmpty(si->title)) )
{
return;
}
diff --git a/plugins/MenuItemEx/images.c b/plugins/MenuItemEx/images.c index aed5d99bf9..51903294bb 100644 --- a/plugins/MenuItemEx/images.c +++ b/plugins/MenuItemEx/images.c @@ -217,7 +217,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) }
-//#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__) )
+//#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
//BOOL MakeGrayscale(HBITMAP *hBitmap)
//{
diff --git a/plugins/MenuItemEx/main.c b/plugins/MenuItemEx/main.c index 8c65f0a8bc..1183559159 100644 --- a/plugins/MenuItemEx/main.c +++ b/plugins/MenuItemEx/main.c @@ -1168,7 +1168,7 @@ static int ContactSettingChanged( WPARAM wParam, LPARAM lParam ) time_t tCurrentTime;
char *lpzProto;
- if ( ( HANDLE )wParam == NULL || lstrcmpA( cws->szSetting, "Status" ) )
+ if ( ( HANDLE )wParam == NULL || lstrcmpA( cws->szSetting, "Status" ))
return 0;
newStatus = cws->value.wVal;
diff --git a/plugins/NewAwaySysMod/AwaySys.cpp b/plugins/NewAwaySysMod/AwaySys.cpp index 1e968393b9..c7fd8b5b8a 100644 --- a/plugins/NewAwaySysMod/AwaySys.cpp +++ b/plugins/NewAwaySysMod/AwaySys.cpp @@ -937,9 +937,9 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam) // we have to read the status message from contacts too... err
hServices.AddElem(CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetContactStatMsg));
- SkinAddNewSound(AWAYSYS_STATUSMSGREQUEST_SOUND, Translate("NewAwaySys: Incoming status message request"), "");
- if (ServiceExists(MS_VARS_REGISTERTOKEN))
- {
+ SkinAddNewSoundEx(AWAYSYS_STATUSMSGREQUEST_SOUND, NULL, LPGEN("NewAwaySys: Incoming status message request"));
+
+ if (ServiceExists(MS_VARS_REGISTERTOKEN)) {
struct
{
TCHAR *Name;
diff --git a/plugins/NewXstatusNotify/main.cpp b/plugins/NewXstatusNotify/main.cpp index 36fe374c5e..9d149e0c3b 100644 --- a/plugins/NewXstatusNotify/main.cpp +++ b/plugins/NewXstatusNotify/main.cpp @@ -1325,18 +1325,17 @@ void InitIcolib() void InitSound()
{
for (int i = ID_STATUS_MIN; i <= ID_STATUS_MAX; i++)
- SkinAddNewSoundEx(StatusList[Index(i)].lpzSkinSoundName, "Status Notify", StatusList[Index(i)].lpzSkinSoundDesc);
+ SkinAddNewSoundEx(StatusList[Index(i)].lpzSkinSoundName, LPGEN("Status Notify"), StatusList[Index(i)].lpzSkinSoundDesc);
- SkinAddNewSoundEx("UserFromOffline", "Status Notify", Translate("User: from offline (has priority!)"));
- SkinAddNewSoundEx(XSTATUS_SOUND_CHANGED, "Status Notify", "Extra status changed");
- SkinAddNewSoundEx(XSTATUS_SOUND_MSGCHANGED, "Status Notify", "Extra status message changed");
- SkinAddNewSoundEx(XSTATUS_SOUND_REMOVED, "Status Notify", "Extra status removed");
+ SkinAddNewSoundEx("UserFromOffline", LPGEN("Status Notify"), LPGEN("User: from offline (has priority!)"));
+ SkinAddNewSoundEx(XSTATUS_SOUND_CHANGED, LPGEN("Status Notify"), LPGEN("Extra status changed"));
+ SkinAddNewSoundEx(XSTATUS_SOUND_MSGCHANGED, LPGEN("Status Notify"), LPGEN("Extra status message changed"));
+ SkinAddNewSoundEx(XSTATUS_SOUND_REMOVED, LPGEN("Status Notify"), LPGEN("Extra status removed"));
}
void InitTopToolbar()
{
- if (ServiceExists(MS_TB_ADDBUTTON))
- {
+ if (ServiceExists(MS_TB_ADDBUTTON)) {
TBButton tbb = {0};
tbb.cbSize = sizeof(TBButton);
tbb.pszServiceName = MS_STATUSCHANGE_MENUCOMMAND;
diff --git a/plugins/Nudge/ChangeLog.txt b/plugins/Nudge/ChangeLog.txt index 5404a70544..140671c177 100644 --- a/plugins/Nudge/ChangeLog.txt +++ b/plugins/Nudge/ChangeLog.txt @@ -130,7 +130,7 @@ 0.0.0.12
===========
-+ Now possible to change the text shown when sending or receiving nudge ( [color=red]BUZZ!!![/color] for yahoo ;) )
++ Now possible to change the text shown when sending or receiving nudge ( [color=red]BUZZ!!![/color] for yahoo ;))
* Change options page.
! Now apply button is enable when changing status.
diff --git a/plugins/Nudge/main.cpp b/plugins/Nudge/main.cpp index b2f1ab36ac..5648e052a5 100644 --- a/plugins/Nudge/main.cpp +++ b/plugins/Nudge/main.cpp @@ -327,7 +327,7 @@ void LoadProtocols(void) //Load the default nudge
mir_snprintf(DefaultNudge.ProtocolName,sizeof(DefaultNudge.ProtocolName),"Default");
mir_snprintf(DefaultNudge.NudgeSoundname,sizeof(DefaultNudge.NudgeSoundname),"Nudge : Default");
- SkinAddNewSoundExT( DefaultNudge.NudgeSoundname, LPGENT("Nudge"),LPGENT("Default Nudge"));
+ SkinAddNewSoundEx( DefaultNudge.NudgeSoundname, LPGEN("Nudge"), LPGEN("Default Nudge"));
DefaultNudge.Load();
GlobalNudge.Load();
@@ -778,7 +778,7 @@ void Nudge_AddAccount(PROTOACCOUNT *proto) TCHAR soundDesc[MAXMODULELABELLENGTH + 10];
mir_sntprintf(soundDesc,sizeof(soundDesc),_T("Nudge for %s"),proto->tszAccountName);
- SkinAddNewSoundExT( newNudge->item.NudgeSoundname, LPGENT("Nudge") , soundDesc);
+ SkinAddNewSoundExT(newNudge->item.NudgeSoundname, LPGENT("Nudge"), soundDesc);
newNudge->next = NudgeList;
NudgeList = newNudge;
diff --git a/plugins/Nudge/shake.cpp b/plugins/Nudge/shake.cpp index c39d79c57b..f396c4f535 100644 --- a/plugins/Nudge/shake.cpp +++ b/plugins/Nudge/shake.cpp @@ -110,7 +110,7 @@ int TriggerShakeChat( WPARAM wParam, LPARAM lParam ) sai = (SPECIFICACTIONINFO *) lParam;
- if ( (sai->td != NULL) && (sai->td->dFlags&DF_CONTACT) )
+ if ( (sai->td != NULL) && (sai->td->dFlags&DF_CONTACT))
hContact = sai->td->hContact;
else
return 0;
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 22f60786fb..80931ee40d 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -921,7 +921,7 @@ bool MyBitmap::loadFromFile_default(const char *fn, const char *fnAlpha) MyBitmap alpha;
if (fnAlpha && alpha.loadFromFile(fnAlpha) &&
(alpha.getWidth() == width) &&
- (alpha.getHeight() == height) )
+ (alpha.getHeight() == height))
{
for (int i = 0; i < width*height; i++)
bits[i] = (bits[i] & 0x00ffffff) | ( (alpha.bits[i] & 0x000000ff) << 24 );
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp index a239965695..0a9beb7382 100644 --- a/plugins/Popup/src/main.cpp +++ b/plugins/Popup/src/main.cpp @@ -390,7 +390,7 @@ static int ModulesLoaded(WPARAM wParam,LPARAM lParam) _T("You always can download them at\r\n")
_T("http://addons.miranda-im.org/\r\n")
_T("\r\n")
- _T("Do you want to visit Miranda IM homepage now?\r\n") );
+ _T("Do you want to visit Miranda IM homepage now?\r\n"));
if (MessageBox(NULL, msg, _T("Popup Plus Error"), MB_YESNO|MB_ICONSTOP) == IDYES)
ShellExecute(NULL, _T("open"), _T("http://addons.miranda-im.org/"), NULL, NULL, SW_SHOWNORMAL);
return 0;
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index c693405bdc..97be02af44 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -246,7 +246,7 @@ HANDLE FindTreeData(LPTSTR group, LPTSTR name, BYTE typ) for(int i = 0; i < gTreeData.getCount(); i++) {
if ( gTreeData[i]->typ == typ &&
(!group || (_tcscmp(gTreeData[i]->pszTreeRoot, group) == 0)) &&
- (!name || (_tcscmp(gTreeData[i]->pszDescription, name) == 0)) )
+ (!name || (_tcscmp(gTreeData[i]->pszDescription, name) == 0)))
{
return gTreeData[i];
}
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index ff804b78f3..2bd5ab39b9 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -134,7 +134,7 @@ INT_PTR CALLBACK DlgProcPopUpAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM SetWindowLongPtr(GetDlgItem(hwnd, IDC_AVT_SIZE_SLIDE), GWLP_WNDPROC, (LONG_PTR)AvatarTrackBarWndProc);
SendDlgItemMessage(hwnd, IDC_AVT_SIZE_SLIDE, TBM_SETRANGE,FALSE,
- MAKELONG(SETTING_AVTSIZE_MIN, SETTING_AVTSIZE_MAX) );
+ MAKELONG(SETTING_AVTSIZE_MIN, SETTING_AVTSIZE_MAX));
SendDlgItemMessage(hwnd, IDC_AVT_SIZE_SLIDE, TBM_SETPOS, TRUE,
max(PopUpOptions.avatarSize, SETTING_AVTSIZE_MIN));
SetDlgItemInt(hwnd, IDC_AVT_SIZE, PopUpOptions.avatarSize, FALSE);
diff --git a/plugins/Popup/src/opt_gen.cpp b/plugins/Popup/src/opt_gen.cpp index 37d6d97d0b..667ddc7c0f 100644 --- a/plugins/Popup/src/opt_gen.cpp +++ b/plugins/Popup/src/opt_gen.cpp @@ -163,14 +163,14 @@ INT_PTR CALLBACK DlgProcPopUpGeneral(HWND hwnd, UINT msg, WPARAM wParam, LPARAM CheckDlgButton(hwnd, IDC_USEMINIMUMWIDTH, PopUpOptions.UseMinimumWidth);
SendDlgItemMessage(hwnd, IDC_MINIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(
SETTING_MAXIMUMWIDTH_MAX,
- SETTING_MINIMUMWIDTH_MIN) );
+ SETTING_MINIMUMWIDTH_MIN));
SetDlgItemInt(hwnd, IDC_MINIMUMWIDTH, PopUpOptions.MinimumWidth, FALSE);
//Maximum Width
PopUpOptions.UseMaximumWidth = PopUpOptions.DynamicResize ? PopUpOptions.UseMaximumWidth : TRUE;
CheckDlgButton(hwnd, IDC_USEMAXIMUMWIDTH, PopUpOptions.UseMaximumWidth);
SendDlgItemMessage(hwnd, IDC_MAXIMUMWIDTH_SPIN, UDM_SETRANGE, 0, (LPARAM)MAKELONG(
SETTING_MAXIMUMWIDTH_MAX,
- SETTING_MINIMUMWIDTH_MIN) );
+ SETTING_MINIMUMWIDTH_MIN));
SetDlgItemInt(hwnd, IDC_MAXIMUMWIDTH, PopUpOptions.MaximumWidth, FALSE);
//And finally let's enable/disable them.
EnableWindow(GetDlgItem(hwnd, IDC_USEMINIMUMWIDTH), PopUpOptions.DynamicResize);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 89a413e747..1dc18f43cc 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -478,7 +478,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR IDC_SKINLIST,
LB_GETITEMDATA,
(WPARAM)SendDlgItemMessage(hwndDlg, IDC_SKINLIST, LB_GETCURSEL,(WPARAM)0,(LPARAM)0),
- (LPARAM)0) );
+ (LPARAM)0));
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopUpOptions.SkinPack)) {
mir_free(PopUpOptions.SkinPack);
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 93fc5f428f..963e4e4a95 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -1750,7 +1750,7 @@ lbl_stack_fix_end: ; end of stack fix hack {
do
{
- if ( !(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) )
+ if ( !(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY))
{
HMODULE hModule = GetModuleHandleA(ffd.cFileName);
if (((char *)PluginWindowProc > (char *)hModule) &&
@@ -1760,7 +1760,7 @@ lbl_stack_fix_end: ; end of stack fix hack lstrcpynA(szBadModule, ffd.cFileName, sizeof(szBadModule));
}
}
- } while ( FindNextFileA(hFind, &ffd) );
+ } while ( FindNextFileA(hFind, &ffd));
FindClose(hFind);
}
}
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index 6cd3f7df14..509d98c908 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -1408,7 +1408,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) _T("for newer version of Popup Plus. And will not\r\n")
_T("display properly.\r\n")
_T("\r\n")
- _T("Please choose another skin.") ),
+ _T("Please choose another skin.")),
_T(MODULNAME_LONG), MB_ICONSTOP|MB_OK);
return any->skin;
diff --git a/plugins/QuickMessages/options.c b/plugins/QuickMessages/options.c index ff412f3859..9cb1a10cf7 100644 --- a/plugins/QuickMessages/options.c +++ b/plugins/QuickMessages/options.c @@ -508,12 +508,12 @@ 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
hInsertAfter = hNewItem;
- while( hChild = TreeView_GetChild( hMenuTree, hItem ) ) {
+ while( hChild = TreeView_GetChild( hMenuTree, hItem )) {
MoveItem( hChild, hInsertAfter, 2 );
}
// delete old tree
@@ -602,7 +602,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) TreeView_SetInsertMark(hMenuTree, NULL, 0 );
ReleaseCapture();
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
hti.pt.x = ( SHORT )LOWORD( lparam );
hti.pt.y = ( SHORT )HIWORD( lparam );
@@ -621,13 +621,13 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) 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;
}
@@ -636,8 +636,8 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) 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;
@@ -687,25 +687,25 @@ 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 ) {
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
TreeView_SetInsertMark( hMenuTree, hti.hItem, 0 );
}
else
if ( hti.pt.y + ( height / 3 ) > rc.bottom ) {
- SetCursor( LoadCursor( NULL, IDC_ARROW ) );
+ SetCursor( LoadCursor( NULL, IDC_ARROW ));
TreeView_SetInsertMark( hMenuTree, hti.hItem, 1 );
}
else {
TreeView_SetInsertMark( hMenuTree, NULL, 0 );
- SetCursor( LoadCursor( GetModuleHandle(NULL), MAKEINTRESOURCE( 183 ) ) );
+ SetCursor( LoadCursor( GetModuleHandle(NULL), MAKEINTRESOURCE( 183 )) );
}
}
}
diff --git a/plugins/SRMM/msgdialog.c b/plugins/SRMM/msgdialog.c index 47e099a781..a6dc2697c0 100644 --- a/plugins/SRMM/msgdialog.c +++ b/plugins/SRMM/msgdialog.c @@ -918,7 +918,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP ZeroMemory(&dbei, sizeof(dbei));
dbei.cbSize = sizeof(dbei);
CallService(MS_DB_EVENT_GET, (WPARAM) hdbEvent, (LPARAM) & dbei);
- if (( dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei) ) && !(dbei.flags & DBEF_SENT)) {
+ if (( dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei)) && !(dbei.flags & DBEF_SENT)) {
dat->lastMessage = dbei.timestamp;
PostMessage(hwndDlg, DM_UPDATELASTMESSAGE, 0, 0);
break;
@@ -1502,7 +1502,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP else
SkinPlaySound("RecvMsgInactive");
}
- if (( dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei) ) && dat->hwndStatus && !(dbei.flags & DBEF_SENT))
+ if (( dbei.eventType == EVENTTYPE_MESSAGE || DbEventIsForMsgWindow(&dbei)) && dat->hwndStatus && !(dbei.flags & DBEF_SENT))
{
dat->lastMessage = dbei.timestamp;
SendMessage(hwndDlg, DM_UPDATELASTMESSAGE, 0, 0);
diff --git a/plugins/Scriver/chat/colorchooser.c b/plugins/Scriver/chat/colorchooser.c index 4765e71a7f..c2c4d80bce 100644 --- a/plugins/Scriver/chat/colorchooser.c +++ b/plugins/Scriver/chat/colorchooser.c @@ -236,7 +236,7 @@ INT_PTR CALLBACK DlgProcColorToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, L }
if ( (pCC->bForeground && pCC->si->bFGSet && pCC->si->iFG == i) ||
- (!pCC->bForeground && pCC->si->bBGSet && pCC->si->iBG == i) ) {
+ (!pCC->bForeground && pCC->si->bBGSet && pCC->si->iBG == i)) {
rc.top = (iThisRow-1) * 20+ 1 +20 ;
rc.left = (iThisColumn-1) * 25 + 1 + 1 ;
rc.bottom = iThisRow * 20- 1 + 20 ;
diff --git a/plugins/Scriver/chat/manager.c b/plugins/Scriver/chat/manager.c index 74595f3bc0..061955af45 100644 --- a/plugins/Scriver/chat/manager.c +++ b/plugins/Scriver/chat/manager.c @@ -793,7 +793,7 @@ SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* cu while (pTemp != NULL) {
if (pTemp != currSession && !lstrcmpiA(pszModule, pTemp->pszModule)) {
if ( my_strstri( pTemp->ptszName, pszOriginal) == pTemp->ptszName ) {
- if ( prevSession != pTemp && lstrcmpi( pTemp->ptszName, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->ptszName, pszName ) < 0) ) {
+ if ( prevSession != pTemp && lstrcmpi( pTemp->ptszName, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->ptszName, pszName ) < 0)) {
pResult = pTemp;
pszName = pTemp->ptszName;
}
@@ -1273,7 +1273,7 @@ TCHAR* UM_FindUserAutoComplete(USERINFO* pUserList, const TCHAR* pszOriginal, co while ( pTemp != NULL ) {
if ( my_strstri( pTemp->pszNick, pszOriginal) == pTemp->pszNick )
- if ( lstrcmpi( pTemp->pszNick, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->pszNick, pszName ) < 0) )
+ if ( lstrcmpi( pTemp->pszNick, pszCurrent ) > 0 && ( !pszName || lstrcmpi( pTemp->pszNick, pszName ) < 0))
pszName = pTemp->pszNick;
pTemp = pTemp->next;
diff --git a/plugins/Scriver/chat/options.c b/plugins/Scriver/chat/options.c index 35be477e9d..f030359ee6 100644 --- a/plugins/Scriver/chat/options.c +++ b/plugins/Scriver/chat/options.c @@ -424,7 +424,7 @@ BOOL CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam _T("%yy%"), TranslateT("year without century, 01- 99"),
_T("%yyyy%"), TranslateT("year with century, 1901-9999"),
_T("%wday%"), TranslateT("abbreviated weekday name"),
- _T("%weekday%"), TranslateT("full weekday name") );
+ _T("%weekday%"), TranslateT("full weekday name"));
GetClientRect (GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), &rect);
rect.left = -85;
hPathTip = CreateToolTip(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), tszTooltipText, TranslateT("Variables"), &rect);
@@ -924,17 +924,17 @@ int OptionsInit(void) g_Settings.iSplitterX = DBGetContactSettingWord(NULL, "Chat", "SplitterX", 105);
LoadGlobalSettings();
- SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
+ SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
SkinAddNewSoundEx("ChatHighlight", LPGEN("Group chats"), LPGEN("Message is highlighted"));
- SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
- SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
- SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
- SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
- SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
- SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
- SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
- SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
- SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
+ SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
+ SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
+ SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
+ SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
+ SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
+ SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
+ SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
+ SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
+ SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
SetIndentSize();
return 0;
}
diff --git a/plugins/Scriver/chat/services.c b/plugins/Scriver/chat/services.c index 22afdfd389..eb72218e7a 100644 --- a/plugins/Scriver/chat/services.c +++ b/plugins/Scriver/chat/services.c @@ -461,7 +461,7 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) if ( gce->cbSize != SIZEOF_STRUCT_GCEVENT_V1 && gce->cbSize != SIZEOF_STRUCT_GCEVENT_V2 )
return GC_EVENT_WRONGVER;
- if ( !IsEventSupported( gcd->iType ) )
+ if ( !IsEventSupported( gcd->iType ))
return GC_EVENT_ERROR;
EnterCriticalSection(&cs);
diff --git a/plugins/Scriver/chat/window.c b/plugins/Scriver/chat/window.c index adae5fd909..2acd5aed25 100644 --- a/plugins/Scriver/chat/window.c +++ b/plugins/Scriver/chat/window.c @@ -2013,7 +2013,7 @@ LABEL_SHOWWINDOW: if (!IsWindowEnabled(GetDlgItem(hwndDlg,IDC_CHAT_COLOR)))
break;
- if (IsDlgButtonChecked(hwndDlg, IDC_CHAT_COLOR) ) {
+ if (IsDlgButtonChecked(hwndDlg, IDC_CHAT_COLOR)) {
if (DBGetContactSettingByte(NULL, "Chat", "RightClickFilter", 0) == 0)
SendMessage(hwndDlg, GC_SHOWCOLORCHOOSER, 0, (LPARAM)IDC_CHAT_COLOR);
else if (si->bFGSet) {
diff --git a/plugins/Scriver/multimon.h b/plugins/Scriver/multimon.h index 1ad717c554..aedd943da4 100644 --- a/plugins/Scriver/multimon.h +++ b/plugins/Scriver/multimon.h @@ -146,7 +146,7 @@ typedef struct { (*(FARPROC*)&g_pfnGetMonitorInfo = GetProcAddress(hUser32,"GetMonitorInfoW")) &&
(*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesW")) &&
(GetSystemMetrics(SM_CXVIRTUALSCREEN) >= GetSystemMetrics(SM_CXSCREEN)) &&
- (GetSystemMetrics(SM_CYVIRTUALSCREEN) >= GetSystemMetrics(SM_CYSCREEN)) )
+ (GetSystemMetrics(SM_CYVIRTUALSCREEN) >= GetSystemMetrics(SM_CYSCREEN)))
{
fInitDone = TRUE;
return TRUE;
diff --git a/plugins/Scriver/utils.c b/plugins/Scriver/utils.c index bad1314b40..8a87b5a5cb 100644 --- a/plugins/Scriver/utils.c +++ b/plugins/Scriver/utils.c @@ -120,7 +120,7 @@ TCHAR *a2t(const char *text) { }
char* t2a( const TCHAR* src ) {
-return u2a( src, CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 ) );
+return u2a( src, CallService( MS_LANGPACK_GETCODEPAGE, 0, 0 ));
}
char* t2acp( const TCHAR* src, int codepage ) {
diff --git a/plugins/SecureIM/commonheaders.cpp b/plugins/SecureIM/commonheaders.cpp index 5d6d0657c0..3838adbc76 100644 --- a/plugins/SecureIM/commonheaders.cpp +++ b/plugins/SecureIM/commonheaders.cpp @@ -45,7 +45,7 @@ LPSTR myDBGetString(HANDLE hContact,const char *szModule,const char *szSetting) DBVARIANT dbv;
dbv.type = DBVT_ASCIIZ;
DBGetContactSetting(hContact,szModule,szSetting,&dbv);
- if ( dbv.pszVal && (dbv.type==DBVT_ASCIIZ || dbv.type==DBVT_UTF8 || dbv.type==DBVT_WCHAR) )
+ if ( dbv.pszVal && (dbv.type==DBVT_ASCIIZ || dbv.type==DBVT_UTF8 || dbv.type==DBVT_WCHAR))
val = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
return val;
diff --git a/plugins/SecureIM/crypt_check.cpp b/plugins/SecureIM/crypt_check.cpp index dfa486d1de..3a4a0e0c30 100644 --- a/plugins/SecureIM/crypt_check.cpp +++ b/plugins/SecureIM/crypt_check.cpp @@ -25,7 +25,7 @@ BYTE isContactSecured(HANDLE hContact) { if (!clist_cnt) return 0;
BYTE r=0;
- if ( isProtoMetaContacts(hContact) )
+ if ( isProtoMetaContacts(hContact))
hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
for(int j=0;j<clist_cnt;j++) {
@@ -107,13 +107,13 @@ BOOL isProtoSmallPackets(HANDLE hContact) { BOOL isContactInvisible(HANDLE hContact) {
- if ( !DBGetContactSettingByte(hContact,"CList","Hidden",0) ) {
+ if ( !DBGetContactSettingByte(hContact,"CList","Hidden",0)) {
if ( !clist_cnt ) return false;
for(int j=0;j<clist_cnt;j++) {
if ( clist[j].hContact == hContact ) {
if ( !clist[j].proto->inspecting ) return false;
if ( clist[j].waitForExchange ) return false;
- switch( (int)DBGetContactSettingWord(hContact,clist[j].proto->name,"ApparentMode",0) ) {
+ switch( (int)DBGetContactSettingWord(hContact,clist[j].proto->name,"ApparentMode",0)) {
case 0:
return (CallProtoService(clist[j].proto->name,PS_GETSTATUS,0,0)==ID_STATUS_INVISIBLE);
case ID_STATUS_ONLINE:
@@ -238,7 +238,7 @@ BOOL isSecureIM(pUinKey ptr, BOOL emptyMirverAsSecureIM) { if ( !ptr->proto->inspecting ) return false;
BOOL isSecureIM = false;
- if ( bNOL && DBGetContactSettingByte(ptr->hContact,"CList","NotOnList",0) ) {
+ if ( bNOL && DBGetContactSettingByte(ptr->hContact,"CList","NotOnList",0)) {
return false;
}
LPSTR mirver = myDBGetString(ptr->hContact,ptr->proto->name,"MirVer");
diff --git a/plugins/SecureIM/crypt_icons.cpp b/plugins/SecureIM/crypt_icons.cpp index 5c3d21023d..6c5984c345 100644 --- a/plugins/SecureIM/crypt_icons.cpp +++ b/plugins/SecureIM/crypt_icons.cpp @@ -19,7 +19,7 @@ HICON mode2icon(int mode,int type) { if ( icons_cache ) {
for(i=0;i<icons_cache;i++) {
- if ( ICONS_CACHE[i].mode == ((type<<8) | mode) ) {
+ if ( ICONS_CACHE[i].mode == ((type<<8) | mode)) {
return ICONS_CACHE[i].icon;
}
}
@@ -59,7 +59,7 @@ IconExtraColumn mode2iec(int mode) { int m=mode&0x0f,s=(mode&SECURED)>>4; // ðàçîáðàëè íà ÷àñòè - ðåæèì è ñîñòîÿíèå
- if ( mode==-1 || (!s && !bASI && m!=MODE_PGP && m!=MODE_GPG) ) {
+ if ( mode==-1 || (!s && !bASI && m!=MODE_PGP && m!=MODE_GPG)) {
return g_IEC[0]; // âåðíåì ïóñòîå ìåñòî
}
@@ -93,7 +93,7 @@ void ShowStatusIcon(HANDLE hContact,int mode) { }
}
}
- if ( ServiceExists(MS_MSG_MODIFYICON) ) { // îáíîâèòü èêîíêè â srmm
+ if ( ServiceExists(MS_MSG_MODIFYICON)) { // îáíîâèòü èêîíêè â srmm
StatusIconData sid;
memset(&sid,0,sizeof(sid));
sid.cbSize = sizeof(sid);
@@ -101,7 +101,7 @@ void ShowStatusIcon(HANDLE hContact,int mode) { for(int i=MODE_NATIVE; i<MODE_CNT;i++) {
sid.dwId = i;
sid.flags = (mode&SECURED)?0:MBF_DISABLED;
- if ( mode==-1 || (mode&0x0f)!=i || isChatRoom(hContact) )
+ if ( mode==-1 || (mode&0x0f)!=i || isChatRoom(hContact))
sid.flags |= MBF_HIDDEN; // îòêëþ÷àåì âñå íåíóæíûå èêîíêè
CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)&sid);
if ( hMC )
@@ -140,7 +140,7 @@ void RefreshContactListIcons(void) { }
hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
while (hContact) { // è ñíîâà çàæèãàåì èêîíêó
- if ( isSecureProtocol(hContact) )
+ if ( isSecureProtocol(hContact))
ShowStatusIcon(hContact);
hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
}
diff --git a/plugins/SecureIM/crypt_lists.cpp b/plugins/SecureIM/crypt_lists.cpp index f71398e4b4..7b68fbd250 100644 --- a/plugins/SecureIM/crypt_lists.cpp +++ b/plugins/SecureIM/crypt_lists.cpp @@ -86,8 +86,8 @@ void MoveToFirstInFilterList(HANDLE hContact) { for(i=0;;i++) {
mir_itoa(i,str,10);
- if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv) ) break;
- if ( !strcmp(szModuleName,dbv.pszVal) ) { // íàøëè ìîé ìîäóëü
+ if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv)) break;
+ if ( !strcmp(szModuleName,dbv.pszVal)) { // íàøëè ìîé ìîäóëü
if ( i==0 ) return;
DBGetContactSettingString(hContact,"_Filter","0",&dbv);
DBWriteContactSettingString(hContact,"_Filter","0",szModuleName);
@@ -108,8 +108,8 @@ void MoveToLastInFilterList(HANDLE hContact) { for(i=0;;i++) {
mir_itoa(i,str,10);
- if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv) ) break;
- if ( !strcmp(szModuleName,dbv.pszVal) ) { // íàøëè ìîé ìîäóëü
+ if ( DBGetContactSettingString(hContact,"_Filter",str,&dbv)) break;
+ if ( !strcmp(szModuleName,dbv.pszVal)) { // íàøëè ìîé ìîäóëü
j=i;
}
mir_free(dbv.pszVal);
@@ -133,7 +133,7 @@ pUinKey addContact(HANDLE hContact) { // LPSTR szProto = (LPSTR) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
pSupPro proto = getSupPro(hContact);
if ( proto ) {
- if ( !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)szModuleName) )
+ if ( !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)szModuleName))
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)szModuleName);
MoveToLastInFilterList(hContact);
for(j=0;j<clist_cnt;j++) {
@@ -152,9 +152,9 @@ pUinKey addContact(HANDLE hContact) { clist[j].proto = proto;
clist[j].mode = DBGetContactSettingByte(hContact, szModuleName, "mode", 99);
if ( clist[j].mode == 99 ) {
- if ( isContactPGP(hContact) ) clist[j].mode = MODE_PGP;
+ if ( isContactPGP(hContact)) clist[j].mode = MODE_PGP;
else
- if ( isContactGPG(hContact) ) clist[j].mode = MODE_GPG;
+ if ( isContactGPG(hContact)) clist[j].mode = MODE_GPG;
else
clist[j].mode = MODE_RSAAES;
DBWriteContactSettingByte(hContact, szModuleName, "mode", clist[j].mode);
diff --git a/plugins/SecureIM/crypt_misc.cpp b/plugins/SecureIM/crypt_misc.cpp index ee6d3a5910..7e0055913d 100644 --- a/plugins/SecureIM/crypt_misc.cpp +++ b/plugins/SecureIM/crypt_misc.cpp @@ -129,7 +129,7 @@ void waitForExchange(pUinKey ptr, int flag) { // § ¯ã᪠¥¬ âàí¤
HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
unsigned int tID;
- CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttWaitForExchange, new TWaitForExchange(hEvent,ptr->hContact), 0, &tID) );
+ CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttWaitForExchange, new TWaitForExchange(hEvent,ptr->hContact), 0, &tID));
SetEvent( hEvent );
break;
}
diff --git a/plugins/SecureIM/images.cpp b/plugins/SecureIM/images.cpp index 7006d4dfa0..eb4c87dea1 100644 --- a/plugins/SecureIM/images.cpp +++ b/plugins/SecureIM/images.cpp @@ -214,7 +214,7 @@ BOOL MakeBitmap32(HBITMAP *hBitmap) }
-#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__) )
+#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
BOOL MakeGrayscale(HBITMAP *hBitmap)
{
diff --git a/plugins/SecureIM/main.cpp b/plugins/SecureIM/main.cpp index 24950bbacf..de80e12cf0 100644 --- a/plugins/SecureIM/main.cpp +++ b/plugins/SecureIM/main.cpp @@ -130,7 +130,7 @@ int __cdecl Load(PLUGINLINK *link) { iCoreVersion = CallService(MS_SYSTEM_GETVERSION,0,0);
// load crypo++ dll
- if ( !loadlib() ) {
+ if ( !loadlib()) {
msgbox1(0,sim107,szModuleName,MB_OK|MB_ICONSTOP);
return 1;
}
@@ -242,10 +242,10 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) { if ( !rsa_4096 ) {
unsigned int tID;
- CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttGenerateRSA, NULL, 0, &tID) );
+ CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttGenerateRSA, NULL, 0, &tID));
}
- exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10) );
+ exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10));
}
#if defined(_DEBUG) || defined(NETLIB_LOG)
@@ -361,8 +361,8 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) { loadContactList();
// add new skin sound
- SkinAddNewSound("IncomingSecureMessage","Incoming Secure Message","Sounds\\iSecureMessage.wav");
- SkinAddNewSound("OutgoingSecureMessage","Outgoing Secure Message","Sounds\\oSecureMessage.wav");
+ SkinAddNewSound("IncomingSecureMessage",LPGEN("Incoming Secure Message"),"Sounds\\iSecureMessage.wav");
+ SkinAddNewSound("OutgoingSecureMessage",LPGEN("Outgoing Secure Message"),"Sounds\\oSecureMessage.wav");
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("init extra icons");
@@ -383,7 +383,7 @@ int __cdecl onModulesLoaded(WPARAM wParam,LPARAM lParam) { AddHookFunction(ME_CLIST_PREBUILDCONTACTMENU, onRebuildContactMenu);
// g_hMC = HookEvent(ME_MC_SUBCONTACTSCHANGED, onMC);
- if ( ServiceExists(MS_EXTRAICON_REGISTER) ) {
+ if ( ServiceExists(MS_EXTRAICON_REGISTER)) {
g_hCLIcon = ExtraIcon_Register(szModuleName, Translate("SecureIM status"), "sim_cm_est",
onExtraImageListRebuilding,
onExtraImageApplying);
diff --git a/plugins/SecureIM/options.cpp b/plugins/SecureIM/options.cpp index a3513522e7..1925f19c09 100644 --- a/plugins/SecureIM/options.cpp +++ b/plugins/SecureIM/options.cpp @@ -368,7 +368,7 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR if ( ptr->keyLoaded ) {
LPSTR buffer = (LPSTR) alloca(RSASIZE);
exp->rsa_export_pubkey(ptr->cntx,buffer);
- if ( !SaveExportRSAKeyDlg(hDlg,buffer,0) )
+ if ( !SaveExportRSAKeyDlg(hDlg,buffer,0))
msgbox(hDlg,sim114,szModuleName,MB_OK|MB_ICONEXCLAMATION);
}
}
@@ -382,8 +382,8 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR if(ptr) {
createRSAcntx(ptr);
LPSTR pub = (LPSTR) alloca(RSASIZE);
- if ( !LoadImportRSAKeyDlg(hDlg,pub,0) ) return TRUE;
- if ( exp->rsa_import_pubkey(ptr->cntx,pub) ) {
+ if ( !LoadImportRSAKeyDlg(hDlg,pub,0)) return TRUE;
+ if ( exp->rsa_import_pubkey(ptr->cntx,pub)) {
int len;
exp->rsa_get_pubkey(ptr->cntx,(PBYTE)pub,&len);
@@ -519,11 +519,11 @@ INT_PTR CALLBACK DlgProcOptionsGeneral(HWND hDlg, UINT wMsg, WPARAM wParam, LPAR }
CheckMenuItem(hMenu, ID_DISABLED+ptr->tstatus, MF_CHECKED );
if ( ptr->tmode==MODE_NATIVE ) {
- if ( !hasKey(ptr) ) EnableMenuItem(hMenu, ID_DELPSK, MF_GRAYED );
+ if ( !hasKey(ptr)) EnableMenuItem(hMenu, ID_DELPSK, MF_GRAYED );
}
else
if ( ptr->tmode==MODE_RSAAES ) {
- if ( !hasKey(ptr) ) {
+ if ( !hasKey(ptr)) {
EnableMenuItem(hMenu, ID_EXPPUBL, MF_GRAYED );
EnableMenuItem(hMenu, ID_DELPUBL, MF_GRAYED );
}
@@ -607,7 +607,7 @@ INT_PTR CALLBACK DlgProcOptionsProto(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM case IDC_RSA_EXP: {
LPSTR pub = (LPSTR) alloca(RSASIZE);
exp->rsa_export_keypair(CPP_MODE_RSA,NULL,pub,NULL);
- if ( !SaveExportRSAKeyDlg(hDlg,pub,0) )
+ if ( !SaveExportRSAKeyDlg(hDlg,pub,0))
msgbox(hDlg,sim114,szModuleName,MB_OK|MB_ICONEXCLAMATION);
return TRUE;
} break;
@@ -617,19 +617,19 @@ INT_PTR CALLBACK DlgProcOptionsProto(HWND hDlg, UINT wMsg, WPARAM wParam, LPARAM if ( res==IDOK ) {
LPSTR priv = (LPSTR) alloca(RSASIZE);
exp->rsa_export_keypair(CPP_MODE_RSA,priv,NULL,passphrase);
- if ( !SaveExportRSAKeyDlg(hDlg,priv,1) )
+ if ( !SaveExportRSAKeyDlg(hDlg,priv,1))
msgbox(hDlg,sim112,szModuleName,MB_OK|MB_ICONEXCLAMATION);
}
return TRUE;
} break;
case IDC_RSA_IMPPRIV: {
LPSTR priv = (LPSTR) alloca(RSASIZE);
- if ( !LoadImportRSAKeyDlg(hDlg,priv,1) ) return TRUE;
+ if ( !LoadImportRSAKeyDlg(hDlg,priv,1)) return TRUE;
//
LPSTR passphrase = (LPSTR) alloca(RSASIZE);
int res = DialogBoxParam(g_hInst,MAKEINTRESOURCE(IDD_PASSPHRASE),NULL,(DLGPROC)DlgProcSetPassphrase,(LPARAM)passphrase);
if ( res==IDOK ) {
- if ( !exp->rsa_import_keypair(CPP_MODE_RSA,priv,passphrase) ) {
+ if ( !exp->rsa_import_keypair(CPP_MODE_RSA,priv,passphrase)) {
msgbox(hDlg,sim113,szModuleName,MB_OK|MB_ICONEXCLAMATION);
}
else {
@@ -1440,7 +1440,7 @@ void ApplyGeneralSettings(HWND hDlg) { GetDlgItemText(hDlg,IDC_KET,timeout,5);
tmp = atoi(timeout); if(tmp > 65535) tmp = 65535;
DBWriteContactSettingWord(0,szModuleName,"ket",tmp);
- exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10) );
+ exp->rsa_set_timeout( DBGetContactSettingWord(0,szModuleName,"ket",10));
mir_itoa(tmp,timeout,10);
SetDlgItemText(hDlg,IDC_KET,timeout);
@@ -1496,7 +1496,7 @@ void ApplyGeneralSettings(HWND hDlg) { else DBWriteContactSettingByte(ptr->hContact, szModuleName, "StatusID", ptr->status);
}
if ( ptr->mode==MODE_NATIVE ) {
- if ( getListViewPSK(hLV,i) ) {
+ if ( getListViewPSK(hLV,i)) {
LPSTR tmp = myDBGetString(ptr->hContact,szModuleName,"tPSK");
DBWriteContactSettingString(ptr->hContact, szModuleName, "PSK", tmp);
mir_free(tmp);
@@ -1508,7 +1508,7 @@ void ApplyGeneralSettings(HWND hDlg) { }
else
if ( ptr->mode==MODE_RSAAES ) {
- if ( !getListViewPUB(hLV,i) ) {
+ if ( !getListViewPUB(hLV,i)) {
DBDeleteContactSetting(ptr->hContact, szModuleName, "rsa_pub");
}
}
diff --git a/plugins/SecureIM/rtfconv.cpp b/plugins/SecureIM/rtfconv.cpp index 271e62aa5b..994f541373 100644 --- a/plugins/SecureIM/rtfconv.cpp +++ b/plugins/SecureIM/rtfconv.cpp @@ -34,13 +34,13 @@ void free_rtfconv () { void rtfconvA(LPCSTR rtf, LPWSTR plain) {
- pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (strlen(rtf)+1)*sizeof(WCHAR) );
+ pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (strlen(rtf)+1)*sizeof(WCHAR));
}
void rtfconvW(LPCWSTR rtf, LPWSTR plain) {
- pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (wcslen(rtf)+1)*sizeof(WCHAR) );
+ pRtfconvString( rtf, plain, 0, 1200, CONVMODE_USE_SYSTEM_TABLE, (wcslen(rtf)+1)*sizeof(WCHAR));
}
// EOF
diff --git a/plugins/SecureIM/svcs_clist.cpp b/plugins/SecureIM/svcs_clist.cpp index 359e273562..12402a58be 100644 --- a/plugins/SecureIM/svcs_clist.cpp +++ b/plugins/SecureIM/svcs_clist.cpp @@ -82,7 +82,7 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) { #if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onExtraImageListRebuilding");
#endif
- if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_ADD_ICON) ) {
+ if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_ADD_ICON)) {
RefreshContactListIcons();
}
return 0;
@@ -91,7 +91,7 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) { int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM) {
- if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_SET_ICON) && isSecureProtocol((HANDLE)wParam) ) {
+ if ( (bADV || g_hCLIcon) && ServiceExists(MS_CLIST_EXTRA_SET_ICON) && isSecureProtocol((HANDLE)wParam)) {
IconExtraColumn iec = mode2iec(isContactSecured((HANDLE)wParam));
if ( g_hCLIcon ) {
ExtraIcon_SetIcon(g_hCLIcon, (HANDLE)wParam, iec.hImage);
@@ -152,7 +152,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { }
if ( isSecureProto && !isChat && isMiranda &&
- (ptr->mode==MODE_NATIVE || ptr->mode==MODE_RSAAES) ) {
+ (ptr->mode==MODE_NATIVE || ptr->mode==MODE_RSAAES)) {
// Native/RSAAES
mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIM_ICON;
if ( !isSecured ) {
@@ -167,7 +167,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { }
// set status menu
if ( bSCM && !bMC &&
- ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG ) ) {
+ ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG )) {
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON;
mi.hIcon = g_hICO[ICO_ST_DIS+ptr->status];
@@ -182,7 +182,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { }
}
else
- if ( isSecureProto && !isChat && (ptr->mode==MODE_PGP || ptr->mode==MODE_GPG) ) {
+ if ( isSecureProto && !isChat && (ptr->mode==MODE_PGP || ptr->mode==MODE_GPG)) {
// PGP, GPG
if ( ptr->mode==MODE_PGP && bPGPloaded ) {
if ((bPGPkeyrings || bPGPprivkey) && !isGPG) {
@@ -200,7 +200,7 @@ int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam) { if ( isSecureProto && !isChat && isMiranda ) {
// set mode menu
if ( bMCM && !bMC &&
- ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG ) ) {
+ ( !isSecured || ptr->mode==MODE_PGP || ptr->mode==MODE_GPG )) {
mi.flags = CMIM_FLAGS | CMIM_NAME | CMIM_ICON;
mi.hIcon = g_hICO[ICO_OV_NAT+ptr->mode];
diff --git a/plugins/SecureIM/svcs_proto.cpp b/plugins/SecureIM/svcs_proto.cpp index a69d7d720d..ef8d6c850c 100644 --- a/plugins/SecureIM/svcs_proto.cpp +++ b/plugins/SecureIM/svcs_proto.cpp @@ -25,7 +25,7 @@ int getSecureSig(LPCSTR szMsg, LPSTR *szPlainMsg=NULL) { int returnNoError(HANDLE hContact) {
HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
unsigned int tID;
- CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,777,0), 0, &tID) );
+ CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,777,0), 0, &tID));
SetEvent( hEvent );
return 777;
}
@@ -34,7 +34,7 @@ int returnNoError(HANDLE hContact) { int returnError(HANDLE hContact, LPCSTR err) {
HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL );
unsigned int tID;
- CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,666,err), 0, &tID) );
+ CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,666,err), 0, &tID));
SetEvent( hEvent );
return 666;
}
@@ -271,7 +271,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { #if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onRecvMsg: Native SiG_ENON message");
#endif
- if ( cpp_keyx(ptr->cntx) ) {
+ if ( cpp_keyx(ptr->cntx)) {
// decrypting message
szPlainMsg = decodeMsg(ptr,lParam,szEncMsg);
if (!ptr->decoded) {
@@ -392,7 +392,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { // receive KeyB from user;
showPopUpKR(ptr->hContact);
- if ( ptr->cntx && cpp_keyb(ptr->cntx) ) {
+ if ( ptr->cntx && cpp_keyb(ptr->cntx)) {
// reinit key exchange if an old key from user is found
cpp_reset_context(ptr->cntx);
}
@@ -450,7 +450,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { }
// auto send my public key to keyB user if not done before
- if ( !cpp_keya(ptr->cntx) ) {
+ if ( !cpp_keya(ptr->cntx)) {
LPSTR keyToSend = InitKeyA(ptr,0); // calculate public and private key
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onRecvMsg: Sending KEYA %s", keyToSend);
@@ -534,7 +534,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { /* common part (CalcKeyX & SendQueue) */
// calculate KeyX
- if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx) )
+ if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx))
CalculateKeyX(ptr,ptr->hContact);
ShowStatusIconNotify(ptr->hContact);
@@ -550,7 +550,7 @@ INT_PTR __cdecl onRecvMsg(WPARAM wParam, LPARAM lParam) { } //switch
// receive message
- if ( cpp_keyx(ptr->cntx) && (ssig==SiG_ENON||ssig==SiG_ENOF) ) {
+ if ( cpp_keyx(ptr->cntx) && (ssig==SiG_ENON||ssig==SiG_ENOF)) {
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onRecvMsg: message received");
#endif
@@ -571,7 +571,7 @@ INT_PTR __cdecl onSendMsgW(WPARAM wParam, LPARAM lParam) { if (!lParam) return 0;
CCSDATA *ccs = (CCSDATA *) lParam;
- if ( !(ccs->wParam & PREF_UTF) )
+ if ( !(ccs->wParam & PREF_UTF))
ccs->wParam |= PREF_UNICODE;
return onSendMsg(wParam, lParam);
@@ -616,7 +616,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { Sent_NetLog("onSendMsg: PGP|GPG mode");
#endif
// åñëè ìîæíî çàøèôðîâàòü - øèôðóåì
- if ( isContactPGP(ptr->hContact) || isContactGPG(ptr->hContact) ) {
+ if ( isContactPGP(ptr->hContact) || isContactGPG(ptr->hContact)) {
/*
if(stat==ID_STATUS_OFFLINE) {
if (msgbox1(0,sim110,szModuleName,MB_YESNO|MB_ICONQUESTION)==IDNO) {
@@ -681,7 +681,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { else {
createRSAcntx(ptr);
}
- if ( !bSOM || (!isClientMiranda(ptr,1) && !isSecureIM(ptr,1)) || !loadRSAkey(ptr) ) {
+ if ( !bSOM || (!isClientMiranda(ptr,1) && !isSecureIM(ptr,1)) || !loadRSAkey(ptr)) {
if ( ssig==SiG_NONE ) {
// ïðîñòî øëåì íåçàøèôðîâàííîå â îôôëàéí
return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
@@ -729,7 +729,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { return returnNoError(pccsd->hContact);
}
// ïðîñòî ñîîáùåíèå (áåç òýãîâ, íåò êîíòåêñòà è ðàáîòàþò AIP & NOL)
- if ( ssig==SiG_NONE && isSecureIM(ptr->hContact) ) {
+ if ( ssig==SiG_NONE && isSecureIM(ptr->hContact)) {
// äîáàâèì åãî â î÷åðåäü
addMsg2Queue(ptr, pccsd->wParam, (LPSTR)pccsd->lParam);
// çàïóñêàåì ïðîöåññ óñòàíîâêè ñîåäèíåíèÿ
@@ -789,7 +789,7 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { #if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onSendMsg: message for offline");
#endif
- if ( ssig==SiG_INIT && cpp_keyx(ptr->cntx) ) {
+ if ( ssig==SiG_INIT && cpp_keyx(ptr->cntx)) {
// reinit key exchange
cpp_reset_context(ptr->cntx);
}
@@ -875,13 +875,13 @@ INT_PTR __cdecl onSendMsg(WPARAM wParam, LPARAM lParam) { return returnNoError(pccsd->hContact);
}
- if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx) )
+ if ( cpp_keya(ptr->cntx) && cpp_keyb(ptr->cntx) && !cpp_keyx(ptr->cntx))
CalculateKeyX(ptr,ptr->hContact);
ShowStatusIconNotify(pccsd->hContact);
// if cryptokey exist
- if ( cpp_keyx(ptr->cntx) ) {
+ if ( cpp_keyx(ptr->cntx)) {
#if defined(_DEBUG) || defined(NETLIB_LOG)
Sent_NetLog("onSendMsg: cryptokey exist");
#endif
@@ -1070,7 +1070,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) { if ( ptr->fileSend ) {
char **file=ptr->fileSend;
for(int j=0;file[j];j++) {
- if ( strstr(file[j],".AESHELL") ) mir_unlink(file[j]);
+ if ( strstr(file[j],".AESHELL")) mir_unlink(file[j]);
mir_free(file[j]);
}
SAFE_FREE(ptr->fileSend);
@@ -1080,13 +1080,13 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) { case ACKRESULT_NEXTFILE:
case ACKRESULT_SUCCESS: {
if ( ptr->finFileRecv && ptr->lastFileRecv ) {
- if ( strstr(ptr->lastFileRecv,".AESHELL") ) {
+ if ( strstr(ptr->lastFileRecv,".AESHELL")) {
char buf[MAX_PATH];
LPSTR file_out=mir_strdup(ptr->lastFileRecv);
LPSTR pos=strrchr(file_out,'.'); //find last .
if (pos) *pos='\0'; //remove AESHELL from name
- if ( isFileExist(file_out) ) {
+ if ( isFileExist(file_out)) {
buf[0]='\0';
LPSTR p=strrchr(file_out,'.');
LPSTR x=strrchr(file_out,'\\');
@@ -1096,7 +1096,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) { }
for(int i=1;i<10000;i++) {
sprintf(pos," (%d)%s",i,buf);
- if ( !isFileExist(file_out) ) break;
+ if ( !isFileExist(file_out)) break;
}
}
@@ -1116,7 +1116,7 @@ int __cdecl onProtoAck(WPARAM wParam,LPARAM lParam) { ptr->finFileRecv = false;
}
if ( ptr->finFileSend && ptr->lastFileSend ) {
- if ( strstr(ptr->lastFileSend,".AESHELL") ) mir_unlink(ptr->lastFileSend);
+ if ( strstr(ptr->lastFileSend,".AESHELL")) mir_unlink(ptr->lastFileSend);
SAFE_FREE(ptr->lastFileSend);
ptr->finFileSend = false;
}
diff --git a/plugins/SecureIM/svcs_srmm.cpp b/plugins/SecureIM/svcs_srmm.cpp index ea7b8be780..688246847e 100644 --- a/plugins/SecureIM/svcs_srmm.cpp +++ b/plugins/SecureIM/svcs_srmm.cpp @@ -13,12 +13,12 @@ int __cdecl onWindowEvent(WPARAM wParam, LPARAM lParam) { int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) {
HANDLE hContact = (HANDLE)wParam;
- if ( isProtoMetaContacts(hContact) )
+ if ( isProtoMetaContacts(hContact))
hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if ( strcmp(sicd->szModule, szModuleName) != 0 ||
- !isSecureProtocol(hContact) ) return 0; // not our event
+ !isSecureProtocol(hContact)) return 0; // not our event
BOOL isPGP = isContactPGP(hContact);
BOOL isGPG = isContactGPG(hContact);
diff --git a/plugins/SeenPlugin/main.c b/plugins/SeenPlugin/main.c index 8dd6f643e3..dd9a91b840 100644 --- a/plugins/SeenPlugin/main.c +++ b/plugins/SeenPlugin/main.c @@ -91,26 +91,24 @@ int MainInit(WPARAM wparam,LPARAM lparam) if(DBGetContactSettingByte(NULL,S_MOD,"MissedOnes",0))
ehmissed_proto=HookEvent(ME_PROTO_ACK,ModeChange_mo);
-// SetOffline();
+ ehdb = HookEvent(ME_DB_CONTACT_SETTINGCHANGED,UpdateValues);
+ ehproto = HookEvent(ME_PROTO_ACK,ModeChange);
- ehdb=HookEvent(ME_DB_CONTACT_SETTINGCHANGED,UpdateValues);
- ehproto=HookEvent(ME_PROTO_ACK,ModeChange);
-
- SkinAddNewSoundEx("LastSeenTrackedStatusChange",Translate("LastSeen"),Translate("User status change"));
- SkinAddNewSoundEx("LastSeenTrackedStatusOnline",Translate("LastSeen"),Translate("Changed to Online"));
- SkinAddNewSoundEx("LastSeenTrackedStatusOffline",Translate("LastSeen"),Translate("User Logged Off"));
- SkinAddNewSoundEx("LastSeenTrackedStatusFromOffline",Translate("LastSeen"),Translate("User Logged In"));
+ SkinAddNewSoundEx("LastSeenTrackedStatusChange", LPGEN("LastSeen"), LPGEN("User status change"));
+ SkinAddNewSoundEx("LastSeenTrackedStatusOnline", LPGEN("LastSeen"), LPGEN("Changed to Online"));
+ SkinAddNewSoundEx("LastSeenTrackedStatusOffline", LPGEN("LastSeen"), LPGEN("User Logged Off"));
+ SkinAddNewSoundEx("LastSeenTrackedStatusFromOffline", LPGEN("LastSeen"), LPGEN("User Logged In"));
+
// known modules list
if (ServiceExists("DBEditorpp/RegisterSingleModule"))
CallService("DBEditorpp/RegisterSingleModule", (WPARAM)S_MOD, 0);
DBWriteContactSettingString(NULL,"Uninstall",Translate("Last seen"),S_MOD);
- if (ServiceExists(MS_TIPPER_ADDTRANSLATION)) {
- int i=0;
- for (i=0;i<TRANSNUMBER;i++) {
- CallService(MS_TIPPER_ADDTRANSLATION,0,(LPARAM)&idleTr[i]);
- }
+ if ( ServiceExists(MS_TIPPER_ADDTRANSLATION)) {
+ int i;
+ for (i=0; i < TRANSNUMBER; i++)
+ CallService(MS_TIPPER_ADDTRANSLATION, 0, (LPARAM)&idleTr[i]);
}
return 0;
diff --git a/plugins/SimpleStatusMsg/options.cpp b/plugins/SimpleStatusMsg/options.cpp index 9ae8bae627..cc450c12e4 100644 --- a/plugins/SimpleStatusMsg/options.cpp +++ b/plugins/SimpleStatusMsg/options.cpp @@ -285,8 +285,8 @@ static INT_PTR CALLBACK DlgOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L case WM_COMMAND:
if ( ( (HIWORD(wParam) == BN_CLICKED) || /*(HIWORD(wParam) == EN_KILLFOCUS) ||*/ (HIWORD(wParam) == EN_CHANGE)
- || ( (HIWORD(wParam) == CBN_SELCHANGE) && (LOWORD(wParam) != IDC_CBOPTPROTO) && (LOWORD(wParam) != IDC_CBOPTSTATUS) )
- ) && (HWND)lParam == GetFocus() )
+ || ( (HIWORD(wParam) == CBN_SELCHANGE) && (LOWORD(wParam) != IDC_CBOPTPROTO) && (LOWORD(wParam) != IDC_CBOPTSTATUS))
+ ) && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch (LOWORD(wParam))
{
@@ -1552,8 +1552,8 @@ static INT_PTR CALLBACK DlgStatusOptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wPa case WM_COMMAND:
if ( ( (HIWORD(wParam) == BN_CLICKED) || /*(HIWORD(wParam) == EN_KILLFOCUS) ||*/ (HIWORD(wParam) == EN_CHANGE)
- || ( (HIWORD(wParam) == LBN_SELCHANGE) && (LOWORD(wParam) != IDC_LISTPROTO) )
- ) && (HWND)lParam == GetFocus() )
+ || ( (HIWORD(wParam) == LBN_SELCHANGE) && (LOWORD(wParam) != IDC_LISTPROTO))
+ ) && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch (LOWORD(wParam))
{
diff --git a/plugins/SmileyAdd/smileys.cpp b/plugins/SmileyAdd/smileys.cpp index 84dc16b6a9..f94eb70580 100644 --- a/plugins/SmileyAdd/smileys.cpp +++ b/plugins/SmileyAdd/smileys.cpp @@ -1125,7 +1125,7 @@ void SmileyLookup::find(const bkstring& str, SmileyLocVecType& smlcur, bool firs if (m_text.empty())
{
_TMatcher* matcher = m_pattern->createTMatcher(str);
- while( matcher->findNextMatch() )
+ while( matcher->findNextMatch())
{
bkstring::size_type st = matcher->getStartingIndex();
bkstring::size_type sz = matcher->getEndingIndex() - st;
diff --git a/plugins/SpellChecker/commons.h b/plugins/SpellChecker/commons.h index f40628c0cb..7243704560 100644 --- a/plugins/SpellChecker/commons.h +++ b/plugins/SpellChecker/commons.h @@ -97,7 +97,7 @@ extern BOOL uinfoex_enabled; extern BOOL variables_enabled;
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
#define FREE(_m_) if (_m_ != NULL) { free(_m_); _m_ = NULL; }
diff --git a/plugins/SpellChecker/hunspell/affixmgr.cxx b/plugins/SpellChecker/hunspell/affixmgr.cxx index b9108d45e3..ae72f70270 100644 --- a/plugins/SpellChecker/hunspell/affixmgr.cxx +++ b/plugins/SpellChecker/hunspell/affixmgr.cxx @@ -821,7 +821,7 @@ int AffixMgr::build_pfxtree(PfxEntry* pfxptr) pptr = NULL; for (;;) { pptr = ptr; - if (strcmp(ep->getKey(), ptr->getKey() ) <= 0) { + if (strcmp(ep->getKey(), ptr->getKey()) <= 0) { ptr = ptr->getNextEQ(); if (!ptr) { pptr->setNextEQ(ep); @@ -885,7 +885,7 @@ int AffixMgr::build_sfxtree(SfxEntry* sfxptr) pptr = NULL; for (;;) { pptr = ptr; - if (strcmp(ep->getKey(), ptr->getKey() ) <= 0) { + if (strcmp(ep->getKey(), ptr->getKey()) <= 0) { ptr = ptr->getNextEQ(); if (!ptr) { pptr->setNextEQ(ep); @@ -965,7 +965,7 @@ int AffixMgr::process_pfx_order() PfxEntry * nptr = ptr->getNext(); for (; nptr != NULL; nptr = nptr->getNext()) { - if (! isSubset( ptr->getKey() , nptr->getKey() )) break; + if (! isSubset( ptr->getKey() , nptr->getKey())) break; } ptr->setNextNE(nptr); ptr->setNextEQ(NULL); diff --git a/plugins/SpellChecker/hunspell/csutil.cxx b/plugins/SpellChecker/hunspell/csutil.cxx index dd89c19090..35154a73ed 100644 --- a/plugins/SpellChecker/hunspell/csutil.cxx +++ b/plugins/SpellChecker/hunspell/csutil.cxx @@ -5422,14 +5422,14 @@ static void toAsciiLowerAndRemoveNonAlphanumeric( const char* pName, char* pBuf while ( *pName ) { /* A-Z */ - if ( (*pName >= 0x41) && (*pName <= 0x5A) ) + if ( (*pName >= 0x41) && (*pName <= 0x5A)) { *pBuf = (*pName)+0x20; /* toAsciiLower */ pBuf++; } /* a-z, 0-9 */ else if ( ((*pName >= 0x61) && (*pName <= 0x7A)) || - ((*pName >= 0x30) && (*pName <= 0x39)) ) + ((*pName >= 0x30) && (*pName <= 0x39))) { *pBuf = *pName; pBuf++; diff --git a/plugins/SpellChecker/hunspell/phonet.cxx b/plugins/SpellChecker/hunspell/phonet.cxx index 144bd40d08..3a849b4444 100644 --- a/plugins/SpellChecker/hunspell/phonet.cxx +++ b/plugins/SpellChecker/hunspell/phonet.cxx @@ -140,10 +140,10 @@ int phonet (const char * inword, char * target, || (*s == '^' && (i == 0 || ! myisalpha(word[i-1])) && (*(s+1) != '$' - || (! myisalpha(word[i+k0]) ))) + || (! myisalpha(word[i+k0])))) || (*s == '$' && i > 0 && myisalpha(word[i-1]) - && (! myisalpha(word[i+k0]) ))) + && (! myisalpha(word[i+k0])))) { /** search for followup rules, if: **/ /** parms.followup and k > 1 and NO '-' in searchstring **/ diff --git a/plugins/SpellChecker/spellchecker.cpp b/plugins/SpellChecker/spellchecker.cpp index 348e15a51c..09802db20e 100644 --- a/plugins/SpellChecker/spellchecker.cpp +++ b/plugins/SpellChecker/spellchecker.cpp @@ -1607,7 +1607,7 @@ BOOL GetWordCharRange(Dialog *dlg, CHARRANGE &sel, TCHAR *text, size_t text_len, // See if it has only '-'s BOOL has_valid_char = FALSE; for (int i = sel.cpMin; i < sel.cpMax && !has_valid_char; i++) - has_valid_char = ( text[i - first_char] != _T('-') ); + has_valid_char = ( text[i - first_char] != _T('-')); return has_valid_char; } diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp index 09ded3aeb2..3f69e77ca5 100644 --- a/plugins/SplashScreen/src/bitmap_funcs.cpp +++ b/plugins/SplashScreen/src/bitmap_funcs.cpp @@ -304,7 +304,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha) MyBitmap alpha;
if (fnAlpha && alpha.loadFromFile(fnAlpha) &&
(alpha.getWidth() == width) &&
- (alpha.getHeight() == height) )
+ (alpha.getHeight() == height))
{
for (int i = 0; i < width*height; i++)
bits[i] = (bits[i] & 0x00ffffff) | ( (alpha.bits[i] & 0x000000ff) << 24 );
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp index 9213b915bb..c969b5c98a 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp @@ -146,7 +146,7 @@ void LoadOptions( OBJLIST<TAAAProtoSetting>& loadSettings, BOOL override) if (!override) {
if (loadSettings[i].optionFlags & FLAG_MONITORMIRANDA)
monitorMiranda = TRUE;
- else if ( (MyGetLastInputInfo==NULL) || ignoreLockKeys || ignoreSysKeys || ignoreAltCombo || (monitorMouse != monitorKeyboard) )
+ else if ( (MyGetLastInputInfo==NULL) || ignoreLockKeys || ignoreSysKeys || ignoreAltCombo || (monitorMouse != monitorKeyboard))
monitorAll = TRUE;
} }
@@ -348,7 +348,7 @@ static VOID CALLBACK AutoAwayTimer(HWND hwnd,UINT message,UINT_PTR idEvent,DWORD }
else if ( ((mouseStationaryTimer < sts1Time) && (!screenSaver) && (!locked)) &&
((aas.optionFlags&FLAG_LV2ONINACTIVE) || (!(aas.optionFlags&FLAG_SETNA))) &&
- (aas.optionFlags&FLAG_RESET) ) {
+ (aas.optionFlags&FLAG_RESET)) {
/* from STATUS1_SET to SET_ORGSTATUS */
changeState(aas, SET_ORGSTATUS);
}
@@ -478,14 +478,14 @@ static LRESULT CALLBACK MirandaMouseHookFunction(int code, WPARAM wParam, LPARAM static LRESULT CALLBACK MirandaKeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam)
{
if (code >= 0) {
- if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU)) ) {
+ if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU))) {
if ( ((GetKeyState(VK_MENU) < 0) || (wParam == VK_MENU)) ||
((GetKeyState(VK_TAB) < 0) || (wParam == VK_TAB)) ||
((GetKeyState(VK_SHIFT) < 0) || (wParam == VK_SHIFT)) ||
((GetKeyState(VK_CONTROL) < 0) || (wParam == VK_CONTROL)) ||
((GetKeyState(VK_ESCAPE) < 0) || (wParam == VK_ESCAPE)) ||
((GetKeyState(VK_LWIN) < 0) || (wParam == VK_LWIN)) ||
- ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN)) ) {
+ ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN))) {
return CallNextHookEx(hMirandaKeyBoardHook, code, wParam, lParam);
}
}
@@ -537,14 +537,14 @@ static LRESULT CALLBACK MouseHookFunction(int code, WPARAM wParam, LPARAM lParam static LRESULT CALLBACK KeyBoardHookFunction(int code, WPARAM wParam, LPARAM lParam)
{
if (code >= 0) {
- if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU)) ) {
+ if (ignoreAltCombo) {//&& ((HIWORD(lParam)&KF_ALTDOWN) || (wParam == VK_MENU))) {
if ( ((GetKeyState(VK_MENU) < 0) || (wParam == VK_MENU)) ||
((GetKeyState(VK_TAB) < 0) || (wParam == VK_TAB)) ||
((GetKeyState(VK_SHIFT) < 0) || (wParam == VK_SHIFT)) ||
((GetKeyState(VK_CONTROL) < 0) || (wParam == VK_CONTROL)) ||
((GetKeyState(VK_ESCAPE) < 0) || (wParam == VK_ESCAPE)) ||
((GetKeyState(VK_LWIN) < 0) || (wParam == VK_LWIN)) ||
- ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN)) ) {
+ ((GetKeyState(VK_RWIN) < 0) || (wParam == VK_RWIN))) {
return CallNextHookEx(hKeyBoardHook, code, wParam, lParam);
}
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp index 3fd52ffec1..5e85f2d841 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/msgoptions.cpp @@ -43,7 +43,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L DWORD protoModeMsgFlags = 0;
for ( i=0; i < protoCount; i++ ) {
- if ( (!(CallProtoService(proto[i]->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG)) )
+ if ( (!(CallProtoService(proto[i]->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0) & PF1_MODEMSGSEND & ~PF1_INDIVMODEMSG)))
continue;
protoModeMsgFlags |= CallProtoService( proto[i]->szModuleName, PS_GETCAPS, PFLAGNUM_3, 0 );
@@ -77,7 +77,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L break;
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch(LOWORD(wParam)) {
@@ -144,7 +144,7 @@ INT_PTR CALLBACK DlgProcAutoAwayMsgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L SendMessage(hwndDlg,WM_COMMAND,MAKEWPARAM(IDC_STATUS,CBN_SELCHANGE),0);
for ( i=0; i < count; i++ ) {
DBWriteContactSettingByte(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_MSGCUSTOM), (BYTE)settings[i]->useCustom);
- if ( (settings[i]->useCustom) && (settings[i]->msg != NULL) && (strlen(settings[i]->msg) > 0) )
+ if ( (settings[i]->useCustom) && (settings[i]->msg != NULL) && (strlen(settings[i]->msg) > 0))
DBWriteContactSettingString(NULL, MODULENAME, StatusModeToDbSetting(settings[i]->status,SETTING_STATUSMSG), settings[i]->msg);
}
break;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp index 29b17ac44c..a4101b1b88 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/options.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/options.cpp @@ -187,7 +187,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayRulesOpts(HWND hwndDlg, UINT msg, WPARAM else
flags = 0;
for(i=0;i<sizeof(statusModeList)/sizeof(statusModeList[0]);i++) {
- if ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame) ) {
+ if ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE) || (bSettingSame)) {
lvItem.pszText = ( TCHAR* )CallService( MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR );
lvItem.lParam = ( LPARAM )statusModePf2List[i];
ListView_InsertItem(hList,&lvItem);
@@ -390,7 +390,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayGeneralOpts(HWND hwndDlg, UINT msg, WPARA break;
case WM_COMMAND:
- if (( HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == BN_CLICKED ) && (HWND)lParam == GetFocus() )
+ if (( HIWORD(wParam) == EN_CHANGE || HIWORD(wParam) == BN_CLICKED ) && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
switch(LOWORD(wParam)) {
@@ -494,7 +494,7 @@ static INT_PTR CALLBACK DlgProcAutoAwayTabs(HWND hwndDlg, UINT msg, WPARAM wPara break;
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TABS) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TABS)) {
if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
TCITEM tci;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp index e803c2dab4..edecc8f947 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/trigger_aaa.cpp @@ -35,10 +35,10 @@ static int AAAStateChanged(WPARAM wParam, LPARAM lParam) { }
break;
case SET_ORGSTATUS:
- if ( (aas->oldState == STATUS1_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) ) {
+ if ( (aas->oldState == STATUS1_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0))) {
bReport = TRUE;;
}
- if ( (aas->oldState == STATUS2_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) ) {
+ if ( (aas->oldState == STATUS2_SET) && (DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0))) {
bReport = TRUE;;
}
break;
@@ -54,12 +54,12 @@ static int AAAStateChanged(WPARAM wParam, LPARAM lParam) { szProto = DBGetContactSettingByte(NULL, MODULENAME, SETTING_SAMESETTINGS, 0)?SETTING_ALL:aas->protocolSetting->szName;
_snprintf(setting, sizeof(setting), "%s_Lv1Status", szProto);
- if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0) ) {
+ if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_AWAY)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVEFIRST, 0)) {
bReport = TRUE;
}
_snprintf(setting, sizeof(setting), "%s_Lv2Status", szProto);
- if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0) ) {
+ if ( (aas->protocolSetting->lastStatus == DBGetContactSettingWord(NULL, MODULENAME, setting, ID_STATUS_NA)) && DBGetTriggerSettingByte(triggerID, NULL, MODULENAME, SETTING_LEAVESECOND, 0)) {
bReport = TRUE;
}
}
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 5ef0b59b09..ba69168422 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -215,7 +215,7 @@ static PROTOCOLSETTINGEX** GetCurrentProtoSettingsCopy() ps[i]->szMsg = NULL;
ps[i]->szName = cs.szName;
ps[i]->tszAccName = cs.tszAccName;
- if ( (ServiceExists(MS_NAS_GETSTATE)) && (CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0) == ID_STATUS_OFFLINE) && (ps[i]->status != ID_STATUS_OFFLINE) ) {
+ if ( (ServiceExists(MS_NAS_GETSTATE)) && (CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0) == ID_STATUS_OFFLINE) && (ps[i]->status != ID_STATUS_OFFLINE)) {
NAS_PROTOINFO npi;
ZeroMemory(&npi, sizeof(NAS_PROTOINFO));
@@ -306,10 +306,10 @@ static int SetCurrentStatus() ps = GetCurrentProtoSettingsCopy();
for (i=0;i<connectionSettings.getCount();i++) {
realStatus = CallProtoService(ps[i]->szName, PS_GETSTATUS, 0, 0);
- if ( (ps[i]->status == ID_STATUS_DISABLED) || (ps[i]->status == realStatus) || (DBGetContactSettingByte(NULL, ps[i]->szName, SETTING_PROTORETRY, 0)) ) { // ignore this proto by removing it's name (not so nice)
+ if ( (ps[i]->status == ID_STATUS_DISABLED) || (ps[i]->status == realStatus) || (DBGetContactSettingByte(NULL, ps[i]->szName, SETTING_PROTORETRY, 0))) { // ignore this proto by removing it's name (not so nice)
ps[i]->szName = "";
}
- else if ( (ps[i]->status != ID_STATUS_DISABLED) && (ps[i]->status != realStatus) && (realStatus != ID_STATUS_OFFLINE) && (DBGetContactSettingByte(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE)) ) {
+ else if ( (ps[i]->status != ID_STATUS_DISABLED) && (ps[i]->status != realStatus) && (realStatus != ID_STATUS_OFFLINE) && (DBGetContactSettingByte(NULL, MODULENAME, SETTING_FIRSTOFFLINE, FALSE))) {
// force offline before reconnecting
log_infoA("KeepStatus: Setting %s offline before making a new connection attempt", ps[i]->szName);
CallProtoService(ps[i]->szName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0);
@@ -356,7 +356,7 @@ static int CSStatusChange(WPARAM wParam, LPARAM lParam) for (i=0;i<connectionSettings.getCount();i++) {
for (j=0;j<connectionSettings.getCount();j++) {
- if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL) )
+ if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL))
continue;
if (!strcmp(protoSettings[i]->szName, connectionSettings[j].szName))
@@ -379,7 +379,7 @@ static int CSStatusChangeEx(WPARAM wParam, LPARAM lParam) for (i=0;i<connectionSettings.getCount();i++) {
for (j=0;j<connectionSettings.getCount();j++) {
- if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL) )
+ if ( (protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL))
continue;
if (!strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) {
if (GetStatus(connectionSettings[j]) != ID_STATUS_DISABLED)
@@ -401,7 +401,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart) log_debugA("ack: %u, chk: %u, aft: %u, cnt: %u, con: %u", processAckTimerId, checkConnectionTimerId, afterCheckTimerId, checkContinTimerId, checkConnectingTimerId);
if ( timer & IDT_PROCESSACK ) {
res = (processAckTimerId == 0)?0:1;
- if ( ((processAckTimerId == 0) && (checkConnectionTimerId == 0)) || (restart) ) {
+ if ( ((processAckTimerId == 0) && (checkConnectionTimerId == 0)) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, processAckTimerId);
@@ -413,7 +413,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart) if ( timer & IDT_CHECKCONN ) {
res = (checkConnectionTimerId == 0?0:1)||res;
- if ( (checkConnectionTimerId == 0) || (restart) ) {
+ if ( (checkConnectionTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkConnectionTimerId);
@@ -425,7 +425,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart) if ( timer & IDT_AFTERCHECK ) {
res = (afterCheckTimerId==0?0:1)||res;
- if ( (afterCheckTimerId == 0) || (restart) ) {
+ if ( (afterCheckTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, afterCheckTimerId);
@@ -437,7 +437,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart) if ( timer & IDT_CHECKCONTIN ) {
res = (checkContinTimerId==0?0:1)||res;
- if ( (checkContinTimerId == 0) || (restart) ) {
+ if ( (checkContinTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkContinTimerId);
@@ -450,7 +450,7 @@ static int StartTimerFunction(int timer, int timeout, BOOL restart) if ( timer & IDT_CHECKCONNECTING ) {
res = (checkConnectingTimerId==0?0:1)||res;
- if ( (checkConnectingTimerId == 0) || (restart) ) {
+ if ( (checkConnectingTimerId == 0) || (restart)) {
if (timeout != -1) {
if (restart)
KillTimer(NULL, checkConnectingTimerId);
@@ -559,7 +559,7 @@ static int ProcessProtoAck(WPARAM wParam,LPARAM lParam) char dbSetting[128];
int i;
- if ( (ack->type != ACKTYPE_STATUS) && (ack->type != ACKTYPE_LOGIN) )
+ if ( (ack->type != ACKTYPE_STATUS) && (ack->type != ACKTYPE_LOGIN))
return 0;
mir_snprintf(dbSetting, sizeof(dbSetting), "%s_enabled", ack->szModule);
@@ -648,7 +648,7 @@ static VOID CALLBACK CheckConnectingTimer(HWND hwnd,UINT message,UINT_PTR idEven if (curStatus < MAX_CONNECT_RETRIES) { // connecting
maxConnectingTime = DBGetContactSettingDword(NULL, MODULENAME, SETTING_MAXCONNECTINGTIME, 0);
if (maxConnectingTime > 0) {
- if ( (unsigned int)maxConnectingTime <= ((GetTickCount() - cs.lastStatusAckTime)/1000) ) {
+ if ( (unsigned int)maxConnectingTime <= ((GetTickCount() - cs.lastStatusAckTime)/1000)) {
// set offline
log_infoA("KeepStatus: %s is too long connecting; setting offline", cs.szName);
CallProtoService(cs.szName, PS_SETSTATUS, (WPARAM)ID_STATUS_OFFLINE, 0);
@@ -710,7 +710,7 @@ static VOID CALLBACK CheckConnectionTimer(HWND hwnd,UINT message,UINT_PTR idEven shouldBeStatus = cs.lastStatus;
if (shouldBeStatus == ID_STATUS_DISABLED)
continue;
- if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS) ) {
+ if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS)) {
setStatus = TRUE;
if (showConnectionPopups)
hIcon = (HICON)CallService(MS_SKIN_LOADPROTOICON, (WPARAM)cs.szName, (LPARAM)SKINICON_STATUS_OFFLINE);
@@ -721,7 +721,7 @@ static VOID CALLBACK CheckConnectionTimer(HWND hwnd,UINT message,UINT_PTR idEven if (increaseExponential)
currentDelay = min(2*currentDelay,maxDelay);
- if ( ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_CHKINET, 0)) && (!InternetGetConnectedState(NULL, 0))) || ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_BYPING, FALSE)) && (!bLastPingResult)) ) {
+ if ( ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_CHKINET, 0)) && (!InternetGetConnectedState(NULL, 0))) || ((DBGetContactSettingByte(NULL, MODULENAME, SETTING_BYPING, FALSE)) && (!bLastPingResult))) {
// no network
NotifyEventHooks(hConnectionEvent, (WPARAM)KS_CONN_STATE_RETRYNOCONN, (LPARAM)retryCount+1);
ProcessPopup(KS_CONN_STATE_RETRYNOCONN, 0);
@@ -779,7 +779,7 @@ static VOID CALLBACK AfterCheckTimer(HWND hwnd,UINT message,UINT_PTR idEvent,DWO shouldBeStatus = cs.lastStatus;
if (shouldBeStatus == ID_STATUS_DISABLED) // (on ignoring proto)
continue;
- if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS) )
+ if ( (shouldBeStatus != realStatus) && (realStatus == ID_STATUS_OFFLINE) || (realStatus < MIN_STATUS))
setStatus = TRUE;
}
@@ -853,9 +853,9 @@ static void CheckContinueslyFunction(void *arg) }
if (bLastPingResult == FALSE) {
start = dbv.pszVal;
- while ( (*start != '\0') && (!bLastPingResult) ) {
+ while ( (*start != '\0') && (!bLastPingResult)) {
end = start;
- while ( (*end != ' ') && (*end != '\0') )
+ while ( (*end != ' ') && (*end != '\0'))
end++;
memset(host, '\0', sizeof(host));
strncpy(host, start, end-start);
@@ -888,7 +888,7 @@ static void CheckContinueslyFunction(void *arg) return; // already connecting, leave
}
- if ( ((!ping) && (!InternetGetConnectedState(NULL, 0))) || ( (ping) && (!bLastPingResult) && (pingFailures >= DBGetContactSettingWord(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT))) ) {
+ if ( ((!ping) && (!InternetGetConnectedState(NULL, 0))) || ( (ping) && (!bLastPingResult) && (pingFailures >= DBGetContactSettingWord(NULL, MODULENAME, SETTING_PINGCOUNT, DEFAULT_PINGCOUNT)))) {
pingFailures = 0;
int count;
@@ -1022,7 +1022,7 @@ static int ProcessPopup(int reason, LPARAM lParam) }
}
if (strlen(protoInfo) > 0) {
- // cut the last end of line (this may also be the first one ;) )
+ // cut the last end of line (this may also be the first one ;))
*(protoInfo + strlen(protoInfo) - 2) = '\0';
}
if (szProto != NULL)
diff --git a/plugins/StatusPlugins/KeepStatus/options.cpp b/plugins/StatusPlugins/KeepStatus/options.cpp index 06ae43e3df..4615d78895 100644 --- a/plugins/StatusPlugins/KeepStatus/options.cpp +++ b/plugins/StatusPlugins/KeepStatus/options.cpp @@ -98,7 +98,7 @@ static INT_PTR CALLBACK DlgProcKSBasicOpts(HWND hwndDlg,UINT msg,WPARAM wParam,L break;
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
// something changed
switch (LOWORD(wParam)) {
@@ -203,7 +203,7 @@ static INT_PTR CALLBACK DlgProcKSAdvOpts(HWND hwndDlg,UINT msg,WPARAM wParam,LPA break;
}
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) && ((HWND)lParam == GetFocus()))
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
// something changed
switch (LOWORD(wParam)) {
@@ -329,7 +329,7 @@ static INT_PTR CALLBACK DlgProcKsTabs(HWND hwndDlg, UINT msg, WPARAM wParam, LPA break;
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TABS) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TABS)) {
if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
TCITEM tci;
@@ -435,7 +435,7 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar // wincolors
CheckDlgButton(hwndDlg, IDC_WINCOLORS, DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEWINCOLORS, 0));
// defaultcolors
- CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) ));
+ CheckDlgButton(hwndDlg, IDC_DEFAULTCOLORS, ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_POPUP_USEDEFCOLORS, 0)) && (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_BGCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_TEXTCOLOR), ((!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)) && (!IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))));
EnableWindow(GetDlgItem(hwndDlg, IDC_DEFAULTCOLORS), (!IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS)));
@@ -495,8 +495,8 @@ INT_PTR CALLBACK PopupOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar ppd.lchContact = NULL;
ppd.lchIcon = (HICON)CallService(MS_SKIN_LOADICON, (WPARAM)SKINICON_STATUS_OFFLINE, 0);
- strcpy( ppd.lpzContactName, Translate("KeepStatus") );
- strcpy( ppd.lpzText, Translate("You broke the Internet!") );
+ strcpy( ppd.lpzContactName, Translate("KeepStatus"));
+ strcpy( ppd.lpzText, Translate("You broke the Internet!"));
if (IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS))
ppd.colorBack = GetSysColor(COLOR_BTNFACE);
else if (IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS))
diff --git a/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp index adbc8716c8..8421460d2f 100644 --- a/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/trigger_keepstatus.cpp @@ -130,10 +130,10 @@ static int KeepStatusEvent(WPARAM wParam, LPARAM lParam) { break;
case KS_CONN_STATE_STOPPEDCHECKING:
- if ( (lParam) && (!(flags&TRIGGER_CONNSUCCESS)) )
+ if ( (lParam) && (!(flags&TRIGGER_CONNSUCCESS)))
continue;
- if ( (!lParam) && (!(flags&TRIGGER_CONNGIVEUP)) )
+ if ( (!lParam) && (!(flags&TRIGGER_CONNGIVEUP)))
continue;
break;
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp index 9227ae7f62..a790561310 100644 --- a/plugins/StatusPlugins/StartupStatus/options.cpp +++ b/plugins/StatusPlugins/StartupStatus/options.cpp @@ -664,7 +664,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP SetDlgItemTextA(hwndDlg, IDC_STATUSMSG, ps->szMsg);
bStatusMsg = ( (((CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND&~PF1_INDIVMODEMSG)) &&
- (CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(ps->status))) || (ps->status == ID_STATUS_CURRENT) || (ps->status == ID_STATUS_LAST) );
+ (CallProtoService(ps->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(ps->status))) || (ps->status == ID_STATUS_CURRENT) || (ps->status == ID_STATUS_LAST));
}
EnableWindow(GetDlgItem(hwndDlg, IDC_MIRANDAMSG), bStatusMsg);
EnableWindow(GetDlgItem(hwndDlg, IDC_CUSTOMMSG), bStatusMsg);
@@ -720,7 +720,7 @@ static INT_PTR CALLBACK StatusProfilesOptDlgProc(HWND hwndDlg,UINT msg,WPARAM wP }
case WM_COMMAND:
- if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == LBN_SELCHANGE)) && ((HWND)lParam == GetFocus()) )
+ if ( ((HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == LBN_SELCHANGE)) && ((HWND)lParam == GetFocus()))
if ( bInitDone )
SendMessage(GetParent(hwndDlg),PSM_CHANGED,0,0);
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index cc98753df6..309c249a6a 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -189,7 +189,7 @@ char *GetStatusMessage(int profile, char *szProto) DBVARIANT dbv;
for ( int i=0; i < pceCount; i++ ) {
- if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto)) ) {
+ if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto))) {
_snprintf(dbSetting, sizeof(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG);
if (!DBGetContactSetting(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db
pce[i].msg = ( char* )realloc(pce[i].msg, strlen(dbv.pszVal)+1);
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index c9ad54ebb7..7028868272 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -334,7 +334,7 @@ static int Exit(WPARAM wParam, LPARAM lParam) mir_free(npi.szMsg);
} } } }
- if ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_SETPROFILE, 1)) || (DBGetContactSettingByte(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0)) ) {
+ if ( (DBGetContactSettingByte(NULL, MODULENAME, SETTING_SETPROFILE, 1)) || (DBGetContactSettingByte(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0))) {
if (ServiceExists(MS_CLIST_SETSTATUSMODE))
CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)ID_STATUS_OFFLINE, 0);
else
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp index f0e4a824eb..fb9bac079e 100644 --- a/plugins/StatusPlugins/commonstatus.cpp +++ b/plugins/StatusPlugins/commonstatus.cpp @@ -85,14 +85,14 @@ DWORD StatusModeToProtoFlag(int status) int GetActualStatus(PROTOCOLSETTINGEX *protoSetting)
{
if (protoSetting->status == ID_STATUS_LAST) {
- if ( (protoSetting->lastStatus < MIN_STATUS) || (protoSetting->lastStatus > MAX_STATUS) )
+ if ( (protoSetting->lastStatus < MIN_STATUS) || (protoSetting->lastStatus > MAX_STATUS))
return CallProtoService(protoSetting->szName, PS_GETSTATUS, 0, 0);
return protoSetting->lastStatus;
}
if (protoSetting->status == ID_STATUS_CURRENT)
return CallProtoService(protoSetting->szName, PS_GETSTATUS, 0, 0);
- if ( (protoSetting->status < ID_STATUS_OFFLINE) || (protoSetting->status > ID_STATUS_OUTTOLUNCH) ) {
+ if ( (protoSetting->status < ID_STATUS_OFFLINE) || (protoSetting->status > ID_STATUS_OUTTOLUNCH)) {
log_debugA("invalid status detected: %d", protoSetting->status);
return 0;
}
@@ -227,7 +227,7 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus) }
// fill the array of proto message for NAS, this will be used anyway
for (i=0;i<protoList->getCount();i++) {
- if ( (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)protoSettings[i]->szName)) || (protoSettings[i]->szMsg != NULL) ) {
+ if ( (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)protoSettings[i]->szName)) || (protoSettings[i]->szMsg != NULL)) {
continue;
}
ZeroMemory(&npi, sizeof(NAS_PROTOINFO));
@@ -248,12 +248,12 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus) for (i=0;i<protoList->getCount();i++) {
msgCount = 0;
for (j=i;j<protoList->getCount();j++) {
- if ( (nasProtoMessages[i] != NULL) && (nasProtoMessages[j] != NULL) && (!strcmp(nasProtoMessages[i], nasProtoMessages[j])) ) {
+ if ( (nasProtoMessages[i] != NULL) && (nasProtoMessages[j] != NULL) && (!strcmp(nasProtoMessages[i], nasProtoMessages[j]))) {
msgCount += 1;
//log_infoA("Adding %s (%u) to %s (%u)", protoSettings[j]->szName, protoSettings[j]->status, protoSettings[i]->szName, protoSettings[i]->status);
}
}
- if ( (msgCount > maxMsgCount) && ((protoList->getCount() == 1) || (msgCount > 1)) ) {
+ if ( (msgCount > maxMsgCount) && ((protoList->getCount() == 1) || (msgCount > 1))) {
maxMsgCount = msgCount;
nasGlobalMsg = _strdup(nasProtoMessages[i]);
}
@@ -281,7 +281,7 @@ static int nasSetStatus(PROTOCOLSETTINGEX **protoSettings, int newstatus) npi.szMsg = mir_strdup(protoSettings[i]->szMsg);
log_infoA("CommonStatus will set status %u for %s and message specified by plugin using NAS (%x)", npi.status, npi.szProto, npi.szMsg);
}
- else if ( (nasProtoMessages[i] != NULL) && (nasGlobalMsg != NULL) && (!strcmp(nasProtoMessages[i], nasGlobalMsg)) ) {
+ else if ( (nasProtoMessages[i] != NULL) && (nasGlobalMsg != NULL) && (!strcmp(nasProtoMessages[i], nasGlobalMsg))) {
npi.szMsg = NULL;
log_infoA("CommonStatus will set status %u for %s and global message using NAS", npi.status, npi.szProto);
}
diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp index a6073d2373..f1a2dbf94b 100644 --- a/plugins/StatusPlugins/confirmdialog.cpp +++ b/plugins/StatusPlugins/confirmdialog.cpp @@ -141,7 +141,7 @@ static int SetStatusList(HWND hwndDlg) }
// status message
- if ( !((!((CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus)))) ) {
+ if ( !((!((CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(confirmSettings[i].szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))) {
TCHAR *msg = GetDefaultStatusMessage( &confirmSettings[i], actualStatus );
if ( msg != NULL ) {
TCHAR* fMsg = variables_parsedup( msg, confirmSettings[i].tszAccName, NULL );
@@ -233,7 +233,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l // stop timer
KillTimer(hwndDlg, TIMER_ID);
SetDlgItemText(hwndDlg, IDC_CLOSE, TranslateT("Close"));
- if ( (HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == NM_CLICK) ) { // something clicked
+ if ( (HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == BN_CLICKED) || (HIWORD(wParam) == NM_CLICK)) { // something clicked
switch (LOWORD(wParam)) {
case IDC_PROFILE:
{
@@ -288,9 +288,9 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l else ListView_SetItemText(GetDlgItem(hwndDlg,IDC_STARTUPLIST), lvItem.iItem, 1,
( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, proto->status, GSMDF_TCHAR ));
- if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))) )
+ if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
- else if ( (proto->status == ID_STATUS_LAST) || (proto->status == ID_STATUS_CURRENT) )
+ else if ( (proto->status == ID_STATUS_LAST) || (proto->status == ID_STATUS_CURRENT))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), TRUE);
else
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), (CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))?TRUE:FALSE);
@@ -378,7 +378,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l }
for ( i = 0; i < SIZEOF(statusModeList); i++ ) {
- if ( ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE)) && (!((!(flags)&Proto_Status2Flag(statusModePf2List[i]))) || ((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0)&Proto_Status2Flag(statusModePf2List[i])))) ) {
+ if ( ((flags&statusModePf2List[i]) || (statusModePf2List[i] == PF2_OFFLINE)) && (!((!(flags)&Proto_Status2Flag(statusModePf2List[i]))) || ((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_5, 0)&Proto_Status2Flag(statusModePf2List[i]))))) {
TCHAR* statusMode = ( TCHAR* )CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, statusModeList[i], GSMDF_TCHAR);
item = SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_ADDSTRING,0,(LPARAM)statusMode);
SendDlgItemMessage(hwndDlg,IDC_STATUS,CB_SETITEMDATA,item,(LPARAM)statusModeList[i]);
@@ -388,7 +388,7 @@ static BOOL CALLBACK ConfirmDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l // enable status box
EnableWindow(GetDlgItem(hwndDlg,IDC_STATUS), (ListView_GetNextItem(GetDlgItem(hwndDlg,IDC_STARTUPLIST),-1,LVNI_SELECTED)>=0));
- if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))) )
+ if ( (!((CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_1, 0)&PF1_MODEMSGSEND)&~PF1_INDIVMODEMSG)) || (!(CallProtoService(proto->szName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(actualStatus))))
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), FALSE);
else if ( proto->status == ID_STATUS_LAST || proto->status == ID_STATUS_CURRENT )
EnableWindow(GetDlgItem(hwndDlg, IDC_SETSTSMSG), TRUE);
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index ab8c34d450..c4943f8e0f 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -161,7 +161,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) // if message message does not contain infintite talk protection prefix
// and question count for this contact is less then maximum
if ( (!plSets->InfTalkProtection.Get() || tstring::npos==message.find(infTalkProtPrefix))
- && (!plSets->MaxQuestCount.Get() || DBGetContactSettingDword(hContact, pluginName, questCountSetting, 0) < plSets->MaxQuestCount.Get()) )
+ && (!plSets->MaxQuestCount.Get() || DBGetContactSettingDword(hContact, pluginName, questCountSetting, 0) < plSets->MaxQuestCount.Get()))
{
// send question
tstring q = infTalkProtPrefix + variables_parse((tstring)(plSets->Question), hContact);
diff --git a/plugins/Svc_dbepp/exportimport.cpp b/plugins/Svc_dbepp/exportimport.cpp index 2ac8d04e6e..14faf47198 100644 --- a/plugins/Svc_dbepp/exportimport.cpp +++ b/plugins/Svc_dbepp/exportimport.cpp @@ -131,7 +131,7 @@ void exportModule(HANDLE hContact, char* module, FILE* file) {
int j;
char *data = NULL;
- if (!(data = (char*)mir_alloc( 3*(dbv.cpbVal+1)*sizeof(char)) ))
+ if (!(data = (char*)mir_alloc( 3*(dbv.cpbVal+1)*sizeof(char))))
break;
data[0] = '\0';
for (j=0; j<dbv.cpbVal; j++)
@@ -479,7 +479,7 @@ void importSettings(HANDLE hContact, char *importstring ) hContact = temp;
}
}
- else if (importstring[i] == '[' && !strchr(&importstring[i+1],'=') )// get the module
+ else if (importstring[i] == '[' && !strchr(&importstring[i+1],'='))// get the module
{
if (end = strpbrk(&importstring[i+1], "]")) {
if ((end+1) != '\0') *end = '\0';
diff --git a/plugins/Svc_dbepp/main.cpp b/plugins/Svc_dbepp/main.cpp index 7ec81267a3..0c7eec1a0f 100644 --- a/plugins/Svc_dbepp/main.cpp +++ b/plugins/Svc_dbepp/main.cpp @@ -101,7 +101,7 @@ int DBSettingChanged(WPARAM wParam,LPARAM lParam) for (i=0; i<WatchListArray.count; i++)
{
- if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact) )
+ if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact))
{
if (!mir_strcmp(cws->szModule, WatchListArray.item[i].module))
{
diff --git a/plugins/Svc_dbepp/moduletree.cpp b/plugins/Svc_dbepp/moduletree.cpp index 231275c5c0..c927851ecc 100644 --- a/plugins/Svc_dbepp/moduletree.cpp +++ b/plugins/Svc_dbepp/moduletree.cpp @@ -315,8 +315,8 @@ http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?t }
/* back to coduguru's code*/
}
- } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )) );
- while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem )) ) {}
+ } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )));
+ while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem ))) {}
} while ( item.hItem );
/*****************************************************************************/
@@ -358,8 +358,8 @@ http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?t }
/* back to coduguru's code*/
}
- } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )) );
- while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem )) ) {}
+ } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )));
+ while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem ))) {}
} while ( item.hItem );
/*****************************************************************************/
@@ -405,8 +405,8 @@ http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?t }
/* back to coduguru's code*/
}
- } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )) );
- while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem )) ) {}
+ } while ( (item.hItem = TreeView_GetChild( hwnd2Tree, lastItem )));
+ while ( (! (item.hItem = TreeView_GetNextSibling( hwnd2Tree, lastItem ))) && (lastItem = item.hItem = TreeView_GetParent( hwnd2Tree, lastItem ))) {}
} while ( item.hItem );
/*****************************************************************************/
@@ -975,7 +975,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i if (WatchListArray.item)
for (i=0; i<WatchListArray.count; i++)
{
- if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact) )
+ if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact))
{
if (!mir_strcmp(module, WatchListArray.item[i].module) && !WatchListArray.item[i].setting)
{
diff --git a/plugins/Svc_dbepp/settinglist.cpp b/plugins/Svc_dbepp/settinglist.cpp index ab2f5652e0..5fff4fed21 100644 --- a/plugins/Svc_dbepp/settinglist.cpp +++ b/plugins/Svc_dbepp/settinglist.cpp @@ -126,7 +126,7 @@ void additem(HWND hwnd2Settings,HANDLE hContact, char* module, char* setting, in case DBVT_BLOB:
{
int j;
- if (!(data = (char*)mir_realloc(data, 3*(dbv.cpbVal+1)+10) ))
+ if (!(data = (char*)mir_realloc(data, 3*(dbv.cpbVal+1)+10)))
{msg(Translate("Couldnt allocate enough memory!"), modFullname); return;}
data[0] = '\0';
for (j=0; j<dbv.cpbVal; j++)
@@ -1026,7 +1026,7 @@ void SettingsListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here // check if the setting is being watched and if it is then check the menu item
for (i=0; i<WatchListArray.count; i++)
{
- if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact) )
+ if (WatchListArray.item[i].module && (hContact == WatchListArray.item[i].hContact))
{
if (WatchListArray.item[i].WatchModule == WATCH_MODULE) continue;
diff --git a/plugins/TabSRMM/chat/options.cpp b/plugins/TabSRMM/chat/options.cpp index a00a87161b..28f0362869 100644 --- a/plugins/TabSRMM/chat/options.cpp +++ b/plugins/TabSRMM/chat/options.cpp @@ -1463,18 +1463,19 @@ int OptionsInit(void) g_Settings.hGroup = 0;
LoadGlobalSettings();
g_Settings.Highlight = new CMUCHighlight();
- SkinAddNewSoundEx("ChatMessage", "Group chats", "Incoming message");
- SkinAddNewSoundEx("ChatSent", "Group chats", "Outgoing message");
- SkinAddNewSoundEx("ChatHighlight", "Group chats", "Message is highlighted");
- SkinAddNewSoundEx("ChatAction", "Group chats", "User has performed an action");
- SkinAddNewSoundEx("ChatJoin", "Group chats", "User has joined");
- SkinAddNewSoundEx("ChatPart", "Group chats", "User has left");
- SkinAddNewSoundEx("ChatKick", "Group chats", "User has kicked some other user");
- SkinAddNewSoundEx("ChatMode", "Group chats", "User's status was changed");
- SkinAddNewSoundEx("ChatNick", "Group chats", "User has changed name");
- SkinAddNewSoundEx("ChatNotice", "Group chats", "User has sent a notice");
- SkinAddNewSoundEx("ChatQuit", "Group chats", "User has disconnected");
- SkinAddNewSoundEx("ChatTopic", "Group chats", "The topic has been changed");
+
+ SkinAddNewSoundEx("ChatMessage", LPGEN("Group chats"), LPGEN("Incoming message"));
+ SkinAddNewSoundEx("ChatSent", LPGEN("Group chats"), LPGEN("Outgoing message"));
+ SkinAddNewSoundEx("ChatHighlight", LPGEN("Group chats"), LPGEN("Message is highlighted"));
+ SkinAddNewSoundEx("ChatAction", LPGEN("Group chats"), LPGEN("User has performed an action"));
+ SkinAddNewSoundEx("ChatJoin", LPGEN("Group chats"), LPGEN("User has joined"));
+ SkinAddNewSoundEx("ChatPart", LPGEN("Group chats"), LPGEN("User has left"));
+ SkinAddNewSoundEx("ChatKick", LPGEN("Group chats"), LPGEN("User has kicked some other user"));
+ SkinAddNewSoundEx("ChatMode", LPGEN("Group chats"), LPGEN("User's status was changed"));
+ SkinAddNewSoundEx("ChatNick", LPGEN("Group chats"), LPGEN("User has changed name"));
+ SkinAddNewSoundEx("ChatNotice", LPGEN("Group chats"), LPGEN("User has sent a notice"));
+ SkinAddNewSoundEx("ChatQuit", LPGEN("Group chats"), LPGEN("User has disconnected"));
+ SkinAddNewSoundEx("ChatTopic", LPGEN("Group chats"), LPGEN("The topic has been changed"));
LoadMsgDlgFont(FONTSECTION_CHAT, 0, &lf, NULL, CHAT_FONTMODULE);
hFont = CreateFontIndirect(&lf);
diff --git a/plugins/TabSRMM/docs/changelog.txt b/plugins/TabSRMM/docs/changelog.txt index d5d1f52406..0bd0ebd908 100644 --- a/plugins/TabSRMM/docs/changelog.txt +++ b/plugins/TabSRMM/docs/changelog.txt @@ -667,7 +667,7 @@ Version 2.0.0.4 - 2007/12/23 menu bar.
! fixed untranslateable strings in the container options dialog
- disabled skin editor for tabsrmm (still not complete, avoid confusing
- people :) ).
+ people :)).
! fixed minor issue with double icons in status bar (on rare occasions)
! fixed skin drawing on multimonitor systems (patch by Bryan)
diff --git a/plugins/TabSRMM/docs/readme.txt b/plugins/TabSRMM/docs/readme.txt index c1326b6b12..9f39dd28bf 100644 --- a/plugins/TabSRMM/docs/readme.txt +++ b/plugins/TabSRMM/docs/readme.txt @@ -86,7 +86,7 @@ Lots of people provided useful suggestions, feature requests and bug reports dur the development phase. I cannot name you all here, because it's just too many.
* The Miranda-IM development team and all contributors for making the best
- IM client on this planet (and probably in the entire universe :) )
+ IM client on this planet (and probably in the entire universe :))
* sryo (teodalton@yahoo.com) for the minimal icons.
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index d10459da58..5181022eac 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2202,7 +2202,7 @@ buttons_done: * hwnd: handle of a message dialog.
*
* returns the tab index (zero based), -1 if no tab is found (which SHOULD not
- * really happen, but who knows... ;) )
+ * really happen, but who knows... ;))
*/
int TSAPI GetTabIndexFromHWND(HWND hwndTab, HWND hwnd)
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index b08957e938..d889bb2bca 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1320,7 +1320,7 @@ HWND TSAPI DM_CreateClist(TWindowData *dat) HWND hwndClist = CreateWindowExA(0, "CListControl", "", WS_TABSTOP | WS_VISIBLE | WS_CHILD | 0x248,
184, 0, 30, 30, dat->hwnd, (HMENU)IDC_CLIST, g_hInst, NULL);
- //MAD: fix for little bug, when following code didn't work (another hack :) )
+ //MAD: fix for little bug, when following code didn't work (another hack :))
HANDLE hItem;
SendMessage(hwndClist, WM_TIMER, 14, 0);
//
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 07a4462386..a1c7d1033e 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -137,26 +137,26 @@ void CGlobals::reloadSystemStartup() HDC hScrnDC;
DBVARIANT dbv = {0};
- m_WinVerMajor = WinVerMajor();
- m_WinVerMinor = WinVerMinor();
- m_bIsXP = IsWinVerXPPlus();
- m_bIsVista = IsWinVerVistaPlus();
- m_bIsWin7 = IsWinVer7Plus();
+ m_WinVerMajor = WinVerMajor();
+ m_WinVerMinor = WinVerMinor();
+ m_bIsXP = IsWinVerXPPlus();
+ m_bIsVista = IsWinVerVistaPlus();
+ m_bIsWin7 = IsWinVer7Plus();
::LoadTSButtonModule();
::RegisterTabCtrlClass();
CTip::registerClass();
- dwThreadID = GetCurrentThreadId();
+ dwThreadID = GetCurrentThreadId();
- PluginConfig.g_hMenuContext = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_TABCONTEXT));
+ PluginConfig.g_hMenuContext = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_TABCONTEXT));
TranslateMenu(g_hMenuContext);
- SkinAddNewSoundEx("RecvMsgActive", "Instant messages", "Incoming (Focused Window)");
- SkinAddNewSoundEx("RecvMsgInactive", "Instant messages", "Incoming (Unfocused Window)");
- SkinAddNewSoundEx("AlertMsg", "Instant messages", "Incoming (New Session)");
- SkinAddNewSoundEx("SendMsg", "Instant messages", "Outgoing");
- SkinAddNewSoundEx("SendError", "Instant messages", "Message send error");
+ SkinAddNewSoundEx("RecvMsgActive", LPGEN("Instant messages"), LPGEN("Incoming (Focused Window)"));
+ SkinAddNewSoundEx("RecvMsgInactive", LPGEN("Instant messages"), LPGEN("Incoming (Unfocused Window)"));
+ SkinAddNewSoundEx("AlertMsg", LPGEN("Instant messages"), LPGEN("Incoming (New Session)"));
+ SkinAddNewSoundEx("SendMsg", LPGEN("Instant messages"), LPGEN("Outgoing"));
+ SkinAddNewSoundEx("SendError", LPGEN("Instant messages"), LPGEN("Message send error"));
hCurSplitNS = LoadCursor(NULL, IDC_SIZENS);
hCurSplitWE = LoadCursor(NULL, IDC_SIZEWE);
@@ -348,16 +348,16 @@ void CGlobals::reloadSettings(bool fReloadSkins) */
void CGlobals::reloadAdv()
{
- g_bDisableAniAvatars= M->GetByte("adv_DisableAniAvatars", 0);
- g_bSoundOnTyping = M->GetByte("adv_soundontyping", 0);
- m_dontUseDefaultKbd= M->GetByte("adv_leaveKeyboardAlone", 1);
- g_bClientInStatusBar = M->GetByte("adv_ClientIconInStatusBar", 0);
+ g_bDisableAniAvatars = M->GetByte("adv_DisableAniAvatars", 0);
+ g_bSoundOnTyping = M->GetByte("adv_soundontyping", 0);
+ m_dontUseDefaultKbd = M->GetByte("adv_leaveKeyboardAlone", 1);
+ g_bClientInStatusBar = M->GetByte("adv_ClientIconInStatusBar", 0);
if(g_bSoundOnTyping && m_TypingSoundAdded == false) {
- SkinAddNewSoundEx("SoundOnTyping", "Other", "TABSRMM: Typing");
+ SkinAddNewSoundEx("SoundOnTyping", LPGEN("Other"), LPGEN("TABSRMM: Typing"));
m_TypingSoundAdded = true;
}
- m_AllowOfflineMultisend = M->GetByte("AllowOfflineMultisend", 0);
+ m_AllowOfflineMultisend = M->GetByte("AllowOfflineMultisend", 0);
}
const HMENU CGlobals::getMenuBar()
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 770b415110..de5b221208 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -63,7 +63,7 @@ static int g_status_events[] = { };
static int g_status_events_size = 0;
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
BOOL TSAPI IsStatusEvent(int eventType)
{
@@ -412,7 +412,7 @@ int TSAPI MsgWindowMenuHandler(TWindowData *dat, int selection, int menuId) case ID_TABMENU_LEAVECHATROOM: {
if (dat && dat->bType == SESSIONTYPE_CHAT) {
SESSION_INFO *si = (SESSION_INFO *)dat->si;
- if ( (si != NULL) && (dat->hContact != NULL) ) {
+ if ( (si != NULL) && (dat->hContact != NULL)) {
char* szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) dat->hContact, 0);
if ( szProto )
CallProtoService( szProto, PS_LEAVECHAT, (WPARAM)dat->hContact, 0 );
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 71b5138bd6..f57b381e3b 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -558,9 +558,9 @@ int TN_ModuleInit() mi.pszPopupName = LPGEN("PopUps");
hDisableMenu = Menu_AddMainMenuItem(&mi);
}
- SkinAddNewSoundEx("TNStart", "Instant messages", "Contact started typing");
- SkinAddNewSoundEx("TNStop", "Instant messages", "Contact stopped typing");
+ SkinAddNewSoundEx("TNStart", LPGEN("Instant messages"), LPGEN("Contact started typing"));
+ SkinAddNewSoundEx("TNStop", LPGEN("Instant messages"), LPGEN("Contact stopped typing"));
return 0;
}
diff --git a/plugins/TabSRMM/tabmodplus/modplus.cpp b/plugins/TabSRMM/tabmodplus/modplus.cpp index 8ac2e5d698..ce9e863f34 100644 --- a/plugins/TabSRMM/tabmodplus/modplus.cpp +++ b/plugins/TabSRMM/tabmodplus/modplus.cpp @@ -63,7 +63,7 @@ static char* getMirVer(HANDLE hContact) if ( !szProto )
return (NULL);
- if ( !DBGetContactSettingString(hContact, szProto, "MirVer", &dbv) ) {
+ if ( !DBGetContactSettingString(hContact, szProto, "MirVer", &dbv)) {
msg=mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -76,7 +76,7 @@ static TCHAR* getMenuEntry(int i) { DBVARIANT dbv = {0};
mir_snprintf(MEntry, 255, "MenuEntry_%u", i);
- if ( !M->GetTString(NULL, "tabmodplus",MEntry, &dbv) ) {
+ if ( !M->GetTString(NULL, "tabmodplus",MEntry, &dbv)) {
msg = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
}
@@ -121,7 +121,7 @@ int ModPlus_PreShutdown(WPARAM wparam, LPARAM lparam) static int RegisterCustomButton(WPARAM wParam,LPARAM lParam)
{
- if ( ServiceExists(MS_BB_ADDBUTTON) ) {
+ if ( ServiceExists(MS_BB_ADDBUTTON)) {
BBButton bbd = {0};
bbd.cbSize = sizeof(BBButton);
bbd.bbbFlags = BBBF_ISIMBUTTON|BBBF_ISLSIDEBUTTON|BBBF_ISPUSHBUTTON;
@@ -261,7 +261,7 @@ int ModPlus_Init(WPARAM wparam,LPARAM lparam) hEventCBButtonPressed=HookEvent(ME_MSG_BUTTONPRESSED,CustomButtonPressed);
hEventCBInit=HookEvent(ME_MSG_TOOLBARLOADED,RegisterCustomButton);
- if (PluginConfig.g_bClientInStatusBar&&ServiceExists(MS_MSG_ADDICON) ) {
+ if (PluginConfig.g_bClientInStatusBar&&ServiceExists(MS_MSG_ADDICON)) {
StatusIconData sid = {0};
sid.cbSize = sizeof(sid);
sid.szModule = (char *)"tabmodplus";
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 8a1a005144..1bac84a5c6 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -163,10 +163,11 @@ int CTooltipNotify::ModulesLoaded(WPARAM wParam, LPARAM lParam) WriteSettingByte("firstrun", 0);
}
- SkinAddNewSound(SND_ONLINE, "Tooltip Notify: Online", "online.wav");
- SkinAddNewSound(SND_OFFLINE, "Tooltip Notify: Offline", "offline.wav");
- SkinAddNewSound(SND_OTHER, "Tooltip Notify: Other", "other.wav");
- SkinAddNewSound(SND_TYPING, "Tooltip Notify: Typing", "typing.wav");
+ // register fonts
+ SkinAddNewSound(SND_ONLINE, LPGEN("Tooltip Notify: Online"), "online.wav");
+ SkinAddNewSound(SND_OFFLINE, LPGEN("Tooltip Notify: Offline"), "offline.wav");
+ SkinAddNewSound(SND_OTHER, LPGEN("Tooltip Notify: Other"), "other.wav");
+ SkinAddNewSound(SND_TYPING, LPGEN("Tooltip Notify: Typing"), "typing.wav");
RegisterFonts();
diff --git a/plugins/Updater/bzip2-1.0.3/blocksort.c b/plugins/Updater/bzip2-1.0.3/blocksort.c index d0d662cd4e..8b5e49b6ac 100644 --- a/plugins/Updater/bzip2-1.0.3/blocksort.c +++ b/plugins/Updater/bzip2-1.0.3/blocksort.c @@ -513,7 +513,7 @@ void mainSimpleSort ( UInt32* ptr, j = i; while ( mainGtU ( ptr[j-h]+d, v+d, block, quadrant, nblock, budget - ) ) { + )) { ptr[j] = ptr[j-h]; j = j - h; if (j <= (lo + h - 1)) break; @@ -527,7 +527,7 @@ void mainSimpleSort ( UInt32* ptr, j = i; while ( mainGtU ( ptr[j-h]+d, v+d, block, quadrant, nblock, budget - ) ) { + )) { ptr[j] = ptr[j-h]; j = j - h; if (j <= (lo + h - 1)) break; @@ -541,7 +541,7 @@ void mainSimpleSort ( UInt32* ptr, j = i; while ( mainGtU ( ptr[j-h]+d, v+d, block, quadrant, nblock, budget - ) ) { + )) { ptr[j] = ptr[j-h]; j = j - h; if (j <= (lo + h - 1)) break; @@ -848,7 +848,7 @@ void mainSort ( UInt32* ptr, for (i = h; i <= 255; i++) { vv = runningOrder[i]; j = i; - while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv) ) { + while ( BIGFREQ(runningOrder[j-h]) > BIGFREQ(vv)) { runningOrder[j] = runningOrder[j-h]; j = j - h; if (j <= (h - 1)) goto zero; @@ -886,7 +886,7 @@ void mainSort ( UInt32* ptr, for (j = 0; j <= 255; j++) { if (j != ss) { sb = (ss << 8) + j; - if ( ! (ftab[sb] & SETMASK) ) { + if ( ! (ftab[sb] & SETMASK)) { Int32 lo = ftab[sb] & CLEARMASK; Int32 hi = (ftab[sb+1] & CLEARMASK) - 1; if (hi > lo) { @@ -1071,7 +1071,7 @@ void BZ2_blockSort ( EState* s ) budgetInit - budget, nblock, (float)(budgetInit - budget) / - (float)(nblock==0 ? 1 : nblock) ); + (float)(nblock==0 ? 1 : nblock)); if (budget < 0) { if (verb >= 2) VPrintf0 ( " too repetitive; using fallback" diff --git a/plugins/Updater/bzip2-1.0.3/bzlib.c b/plugins/Updater/bzip2-1.0.3/bzlib.c index a3015c2533..028ac19d5a 100644 --- a/plugins/Updater/bzip2-1.0.3/bzlib.c +++ b/plugins/Updater/bzip2-1.0.3/bzlib.c @@ -165,7 +165,7 @@ int BZ_API(BZ2_bzCompressInit) if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; if (strm->bzfree == NULL) strm->bzfree = default_bzfree; - s = BZALLOC( sizeof(EState) ); + s = BZALLOC( sizeof(EState)); if (s == NULL) return BZ_MEM_ERROR; s->strm = strm; @@ -174,9 +174,9 @@ int BZ_API(BZ2_bzCompressInit) s->ftab = NULL; n = 100000 * blockSize100k; - s->arr1 = BZALLOC( n * sizeof(UInt32) ); - s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32) ); - s->ftab = BZALLOC( 65537 * sizeof(UInt32) ); + s->arr1 = BZALLOC( n * sizeof(UInt32)); + s->arr2 = BZALLOC( (n+BZ_N_OVERSHOOT) * sizeof(UInt32)); + s->ftab = BZALLOC( 65537 * sizeof(UInt32)); if (s->arr1 == NULL || s->arr2 == NULL || s->ftab == NULL) { if (s->arr1 != NULL) BZFREE(s->arr1); @@ -299,7 +299,7 @@ Bool copy_input_until_stop ( EState* s ) /*-- no input? --*/ if (s->strm->avail_in == 0) break; progress_in = True; - ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); + ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in)))); s->strm->next_in++; s->strm->avail_in--; s->strm->total_in_lo32++; @@ -317,7 +317,7 @@ Bool copy_input_until_stop ( EState* s ) /*-- flush/finish end? --*/ if (s->avail_in_expect == 0) break; progress_in = True; - ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in))) ); + ADD_CHAR_TO_BLOCK ( s, (UInt32)(*((UChar*)(s->strm->next_in)))); s->strm->next_in++; s->strm->avail_in--; s->strm->total_in_lo32++; @@ -383,7 +383,7 @@ Bool handle_compress ( bz_stream* strm ) progress_in |= copy_input_until_stop ( s ); if (s->mode != BZ_M_RUNNING && s->avail_in_expect == 0) { flush_RL ( s ); - BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING) ); + BZ2_compressBlock ( s, (Bool)(s->mode == BZ_M_FINISHING)); s->state = BZ_S_OUTPUT; } else @@ -505,7 +505,7 @@ int BZ_API(BZ2_bzDecompressInit) if (strm->bzalloc == NULL) strm->bzalloc = default_bzalloc; if (strm->bzfree == NULL) strm->bzfree = default_bzfree; - s = BZALLOC( sizeof(DState) ); + s = BZALLOC( sizeof(DState)); if (s == NULL) return BZ_MEM_ERROR; s->strm = strm; strm->state = s; @@ -544,7 +544,7 @@ Bool unRLE_obuf_to_output_FAST ( DState* s ) while (True) { if (s->strm->avail_out == 0) return False; if (s->state_out_len == 0) break; - *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; + *( (UChar*)(s->strm->next_out)) = s->state_out_ch; BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); s->state_out_len--; s->strm->next_out++; @@ -612,7 +612,7 @@ Bool unRLE_obuf_to_output_FAST ( DState* s ) while (True) { if (cs_avail_out == 0) goto return_notr; if (c_state_out_len == 1) break; - *( (UChar*)(cs_next_out) ) = c_state_out_ch; + *( (UChar*)(cs_next_out)) = c_state_out_ch; BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch ); c_state_out_len--; cs_next_out++; @@ -623,7 +623,7 @@ Bool unRLE_obuf_to_output_FAST ( DState* s ) if (cs_avail_out == 0) { c_state_out_len = 1; goto return_notr; }; - *( (UChar*)(cs_next_out) ) = c_state_out_ch; + *( (UChar*)(cs_next_out)) = c_state_out_ch; BZ_UPDATE_CRC ( c_calculatedBlockCRC, c_state_out_ch ); cs_next_out++; cs_avail_out--; @@ -714,7 +714,7 @@ Bool unRLE_obuf_to_output_SMALL ( DState* s ) while (True) { if (s->strm->avail_out == 0) return False; if (s->state_out_len == 0) break; - *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; + *( (UChar*)(s->strm->next_out)) = s->state_out_ch; BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); s->state_out_len--; s->strm->next_out++; @@ -763,7 +763,7 @@ Bool unRLE_obuf_to_output_SMALL ( DState* s ) while (True) { if (s->strm->avail_out == 0) return False; if (s->state_out_len == 0) break; - *( (UChar*)(s->strm->next_out) ) = s->state_out_ch; + *( (UChar*)(s->strm->next_out)) = s->state_out_ch; BZ_UPDATE_CRC ( s->calculatedBlockCRC, s->state_out_ch ); s->state_out_len--; s->strm->next_out++; @@ -934,7 +934,7 @@ BZFILE* BZ_API(BZ2_bzWriteOpen) if (ferror(f)) { BZ_SETERR(BZ_IO_ERROR); return NULL; }; - bzf = malloc ( sizeof(bzFile) ); + bzf = malloc ( sizeof(bzFile)); if (bzf == NULL) { BZ_SETERR(BZ_MEM_ERROR); return NULL; }; @@ -1062,7 +1062,7 @@ void BZ_API(BZ2_bzWriteClose64) } } - if ( !abandon && !ferror ( bzf->handle ) ) { + if ( !abandon && !ferror ( bzf->handle )) { fflush ( bzf->handle ); if (ferror(bzf->handle)) { BZ_SETERR(BZ_IO_ERROR); return; }; @@ -1078,7 +1078,7 @@ void BZ_API(BZ2_bzWriteClose64) *nbytes_out_hi32 = bzf->strm.total_out_hi32; BZ_SETERR(BZ_OK); - BZ2_bzCompressEnd ( &(bzf->strm) ); + BZ2_bzCompressEnd ( &(bzf->strm)); free ( bzf ); } @@ -1107,7 +1107,7 @@ BZFILE* BZ_API(BZ2_bzReadOpen) if (ferror(f)) { BZ_SETERR(BZ_IO_ERROR); return NULL; }; - bzf = malloc ( sizeof(bzFile) ); + bzf = malloc ( sizeof(bzFile)); if (bzf == NULL) { BZ_SETERR(BZ_MEM_ERROR); return NULL; }; @@ -1152,7 +1152,7 @@ void BZ_API(BZ2_bzReadClose) ( int *bzerror, BZFILE *b ) { BZ_SETERR(BZ_SEQUENCE_ERROR); return; }; if (bzf->initialisedOk) - (void)BZ2_bzDecompressEnd ( &(bzf->strm) ); + (void)BZ2_bzDecompressEnd ( &(bzf->strm)); free ( bzf ); } @@ -1196,7 +1196,7 @@ int BZ_API(BZ2_bzRead) bzf->strm.next_in = bzf->buf; } - ret = BZ2_bzDecompress ( &(bzf->strm) ); + ret = BZ2_bzDecompress ( &(bzf->strm)); if (ret != BZ_OK && ret != BZ_STREAM_END) { BZ_SETERR(ret); return 0; }; diff --git a/plugins/Updater/bzip2-1.0.3/compress.c b/plugins/Updater/bzip2-1.0.3/compress.c index caf7696011..98e64027d4 100644 --- a/plugins/Updater/bzip2-1.0.3/compress.c +++ b/plugins/Updater/bzip2-1.0.3/compress.c @@ -303,7 +303,7 @@ void sendMTFValues ( EState* s ) VPrintf5( " initial group %d, [%d .. %d], " "has %d syms (%4.1f%%)\n", nPart, gs, ge, aFreq, - (100.0 * (float)aFreq) / (float)(s->nMTF) ); + (100.0 * (float)aFreq) / (float)(s->nMTF)); for (v = 0; v < alphaSize; v++) if (v >= gs && v <= ge) @@ -624,7 +624,7 @@ void BZ2_compressBlock ( EState* s, Bool is_last_block ) bsPutUChar ( s, BZ_HDR_B ); bsPutUChar ( s, BZ_HDR_Z ); bsPutUChar ( s, BZ_HDR_h ); - bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k) ); + bsPutUChar ( s, (UChar)(BZ_HDR_0 + s->blockSize100k)); } if (s->nblock > 0) { diff --git a/plugins/Updater/bzip2-1.0.3/decompress.c b/plugins/Updater/bzip2-1.0.3/decompress.c index 311f5668f9..9e692a26fb 100644 --- a/plugins/Updater/bzip2-1.0.3/decompress.c +++ b/plugins/Updater/bzip2-1.0.3/decompress.c @@ -209,13 +209,13 @@ Int32 BZ2_decompress ( DState* s ) s->blockSize100k -= BZ_HDR_0; if (s->smallDecompress) { - s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16) ); + s->ll16 = BZALLOC( s->blockSize100k * 100000 * sizeof(UInt16)); s->ll4 = BZALLOC( ((1 + s->blockSize100k * 100000) >> 1) * sizeof(UChar) ); if (s->ll16 == NULL || s->ll4 == NULL) RETURN(BZ_MEM_ERROR); } else { - s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32) ); + s->tt = BZALLOC( s->blockSize100k * 100000 * sizeof(Int32)); if (s->tt == NULL) RETURN(BZ_MEM_ERROR); } diff --git a/plugins/UserGuide/main.c b/plugins/UserGuide/main.c index 0adc8dab7a..8fd3f6f818 100644 --- a/plugins/UserGuide/main.c +++ b/plugins/UserGuide/main.c @@ -58,7 +58,7 @@ static INT_PTR ShowGuideFile(WPARAM wParam,LPARAM lParam) if (pszDivider == NULL)
{
pszDirName = "";
- strncpy(pszFileName, dbv.pszVal, strlen(dbv.pszVal) );
+ strncpy(pszFileName, dbv.pszVal, strlen(dbv.pszVal));
}
else
{
diff --git a/plugins/UserInfoEx/Flags/svc_flags.cpp b/plugins/UserInfoEx/Flags/svc_flags.cpp index 49435ec5c0..ec08f9704c 100644 --- a/plugins/UserInfoEx/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/Flags/svc_flags.cpp @@ -366,7 +366,7 @@ static int OnExtraIconSvcChanged(WPARAM wParam,LPARAM lParam) { DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
if ((HANDLE)wParam!=NULL)return 0;
if (!lstrcmpA(dbcws->szModule, "ExtraIcons") &&
- !lstrcmpA(dbcws->szSetting,"Slot_Flags") ) {
+ !lstrcmpA(dbcws->szSetting,"Slot_Flags")) {
BOOL bEnable;
switch (dbcws->value.type) {
case DBVT_BYTE:
diff --git a/plugins/UserInfoEx/Flags/svc_flagsicons.cpp b/plugins/UserInfoEx/Flags/svc_flagsicons.cpp index a765b8e8f8..e265d1b850 100644 --- a/plugins/UserInfoEx/Flags/svc_flagsicons.cpp +++ b/plugins/UserInfoEx/Flags/svc_flagsicons.cpp @@ -103,10 +103,10 @@ static int CountryNumberToBitmapIndex(int countryNumber) countryNumber=599; /* Netherlands Antilles (dissolved 2010) */
//countryNumber=31; /* Netherlands */
break;
- case 5995: /* St. Maarten (new country in 2010 (from Netherlands Antilles) new country in 2010 (from Netherlands Antilles) ) */
+ case 5995: /* St. Maarten (new country in 2010 (from Netherlands Antilles) new country in 2010 (from Netherlands Antilles)) */
countryNumber=599; /* Netherlands Antilles (dissolved 2010) */
break;
- case 5999: /* Curacao (new country in 2010 (from Netherlands Antilles) new country in 2010 (from Netherlands Antilles) ) */
+ case 5999: /* Curacao (new country in 2010 (from Netherlands Antilles) new country in 2010 (from Netherlands Antilles)) */
countryNumber=599; /* Netherlands Antilles (dissolved 2010) */
break;
case 5399: /* missing Guantanamo Bay */
diff --git a/plugins/UserInfoEx/dlg_anniversarylist.cpp b/plugins/UserInfoEx/dlg_anniversarylist.cpp index 60718f5861..680dd1e23b 100644 --- a/plugins/UserInfoEx/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/dlg_anniversarylist.cpp @@ -583,14 +583,14 @@ class CAnnivList if (!pDlg->_wmINIT && (wndPos->cx != 0 || wndPos->cy != 0)) {
//win pos change
if ( (wndPos->cx == pDlg->_rcWin.right - pDlg->_rcWin.left) &&
- (wndPos->cy == pDlg->_rcWin.bottom - pDlg->_rcWin.top) ) {
+ (wndPos->cy == pDlg->_rcWin.bottom - pDlg->_rcWin.top)) {
//win pos change (store new pos)
GetWindowRect(hDlg, &pDlg->_rcWin);
}
//win size change
else {
// l change
- if ( (wndPos->cx < pDlg->_sizeMin.cx) && (wndPos->x > pDlg->_rcWin.left) ) {
+ if ( (wndPos->cx < pDlg->_sizeMin.cx) && (wndPos->x > pDlg->_rcWin.left)) {
wndPos->x = wndPos->x + wndPos->cx - pDlg->_sizeMin.cx;
wndPos->cx = pDlg->_sizeMin.cx;
}
@@ -600,7 +600,7 @@ class CAnnivList }
// t change
- if ( (wndPos->cy < pDlg->_sizeMin.cy) && (wndPos->y > pDlg->_rcWin.top) ) {
+ if ( (wndPos->cy < pDlg->_sizeMin.cy) && (wndPos->y > pDlg->_rcWin.top)) {
wndPos->y = wndPos->y + wndPos->cy - pDlg->_sizeMin.cy;
wndPos->cy = pDlg->_sizeMin.cy;
}
diff --git a/plugins/UserInfoEx/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/ex_import/classExImContactXML.cpp index 11f2aed631..2264f4d278 100644 --- a/plugins/UserInfoEx/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/ex_import/classExImContactXML.cpp @@ -579,10 +579,10 @@ VOID CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents) numSettings = numEvents = 0;
for (xmod = _xmlNode->FirstChild();
xmod != NULL;
- xmod = xmod->NextSibling(XKEY_MOD) ) {
+ xmod = xmod->NextSibling(XKEY_MOD)) {
for (xkey = xmod->FirstChild();
xkey != NULL;
- xkey = xkey->NextSibling() ) {
+ xkey = xkey->NextSibling()) {
if (!mir_stricmp(xkey->Value(), XKEY_SET)) numSettings++;
else numEvents++;
}
@@ -941,7 +941,7 @@ INT CExImContactXML::ImportModule(TiXmlNode* xmlModule) else if(isProtoModule && isMetaModule) {
if (!mir_stricmp(xKey->Attribute("key"),"Nick") ||
!mir_stricmp(xKey->Attribute("key"),"TzName") ||
- !mir_stricmp(xKey->Attribute("key"),"Timezone") ) {
+ !mir_stricmp(xKey->Attribute("key"),"Timezone")) {
if (ImportSetting(pszModule, xKey->ToElement()) == ERROR_OK) {
_pXmlFile->_numSettingsDone++;
}
diff --git a/plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp index ba026e2c52..9ca27d7289 100644 --- a/plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/ex_import/dlg_ExImModules.cpp @@ -363,7 +363,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar (!pDat->ExImContact->hContact || mir_stricmp(p, pszProto)) &&
//mir_stricmp(p, "Protocol") &&
mir_stricmp(p, USERINFO) &&
- mir_stricmp(p, MOD_MBIRTHDAY) )
+ mir_stricmp(p, MOD_MBIRTHDAY))
{
ExportTree_AddItem(hTree, hItemOptional, (LPSTR)p, bImagesLoaded, 1);
}
diff --git a/plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp index 6e1bb7ad54..d9d0efbd7d 100644 --- a/plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/ex_import/dlg_ExImOpenSaveFile.cpp @@ -168,7 +168,7 @@ static LRESULT PlacesBarSubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM // profile button
case 41064:
// set button text
- iString = SendMessage(hWnd, TB_ADDSTRING, NULL, (LPARAM) TranslateT("Profile") );
+ iString = SendMessage(hWnd, TB_ADDSTRING, NULL, (LPARAM) TranslateT("Profile"));
if (iString != -1) tbb->iString = iString;
// set tooltip
diff --git a/plugins/UserInfoEx/mir_db.cpp b/plugins/UserInfoEx/mir_db.cpp index b17dc3e7d0..e4596df4cc 100644 --- a/plugins/UserInfoEx/mir_db.cpp +++ b/plugins/UserInfoEx/mir_db.cpp @@ -1222,7 +1222,7 @@ BOOLEAN Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei) sdbe = hDbExistingEvent;
for ( edbe = sdbe;
edbe && !GetInfo(edbe, &edbei) && (dbei->timestamp <= edbei.timestamp);
- edbe = FindPrev(edbe) ) {
+ edbe = FindPrev(edbe)) {
hDbExistingEvent = edbe;
//compare without data (faster)
if ( result = IsEqual(dbei, &edbei, false)) {
@@ -1239,7 +1239,7 @@ BOOLEAN Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei) if (!result) {
for ( edbe = FindNext(sdbe);
edbe && !GetInfo(edbe, &edbei) && (dbei->timestamp >= edbei.timestamp);
- edbe = FindNext(edbe) ) {
+ edbe = FindNext(edbe)) {
hDbExistingEvent = edbe;
//compare without data (faster)
if ( result = IsEqual(dbei, &edbei, false)) {
diff --git a/plugins/UserInfoEx/svc_reminder.cpp b/plugins/UserInfoEx/svc_reminder.cpp index 203b98faa4..20abe584a6 100644 --- a/plugins/UserInfoEx/svc_reminder.cpp +++ b/plugins/UserInfoEx/svc_reminder.cpp @@ -1189,22 +1189,22 @@ VOID SvcReminderLoadModule(VOID) // init sounds
SKINSOUNDDESCEX ssd = { 0 };
ssd.cbSize = sizeof(ssd);
- ssd.pszSection = LPGEN(MODNAME);
+ ssd.pszSection = MODNAME;
ssd.pszName = SOUND_BIRTHDAY_TODAY;
ssd.pszDescription = LPGEN("Birthday reminder");
ssd.pszDefaultFile = "Sounds\\BirthDay.wav";
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ Skin_AddSound(&ssd);
ssd.pszName = SOUND_BIRTHDAY_SOON;
ssd.pszDescription = LPGEN("Birthday reminder: it's coming");
ssd.pszDefaultFile = "Sounds\\BirthDayComing.wav";
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ Skin_AddSound(&ssd);
ssd.pszName = SOUND_ANNIVERSARY;
ssd.pszDescription = LPGEN("Anniversary Reminder");
ssd.pszDefaultFile = "Sounds\\Reminder.wav";
- CallService(MS_SKIN_ADDNEWSOUND, 0, (LPARAM)&ssd);
+ Skin_AddSound(&ssd);
// create service functions
myCreateServiceFunction(MS_USERINFO_REMINDER_CHECK, CheckService);
diff --git a/plugins/Utils/mir_options.cpp b/plugins/Utils/mir_options.cpp index 2fa58dffbf..6f8a831e5d 100644 --- a/plugins/Utils/mir_options.cpp +++ b/plugins/Utils/mir_options.cpp @@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. #include "mir_memory.h"
-#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]) )
+#define MAX_REGS(_A_) ( sizeof(_A_) / sizeof(_A_[0]))
static TCHAR* MyDBGetContactSettingTString(HANDLE hContact, char* module, char* setting, TCHAR* out, size_t len, TCHAR *def)
diff --git a/plugins/Variables/contact.cpp b/plugins/Variables/contact.cpp index c6b7b8f566..b6d48ee1e3 100644 --- a/plugins/Variables/contact.cpp +++ b/plugins/Variables/contact.cpp @@ -339,7 +339,7 @@ int getContactFromString( CONTACTSINFO* ci ) free(tmp);
}
- if ( (tszContact == NULL) || (_tcslen(tszContact) == 0) )
+ if ( (tszContact == NULL) || (_tcslen(tszContact) == 0))
return -1;
ci->hContacts = NULL;
@@ -394,7 +394,7 @@ int getContactFromString( CONTACTSINFO* ci ) tszProto = a2u(szProto);
- if ( (tszProto != NULL) && (szFind != NULL) ) {
+ if ( (tszProto != NULL) && (szFind != NULL)) {
wsprintf(szFind, _T("<%s:%s>"), tszProto, cInfo);
free(cInfo);
free(tszProto);
@@ -407,7 +407,7 @@ int getContactFromString( CONTACTSINFO* ci ) }
}
// id (exact)
- if ( (ci->flags&CI_UNIQUEID) && (!bMatch) ) {
+ if ( (ci->flags&CI_UNIQUEID) && (!bMatch)) {
szFind = getContactInfoT(CNF_UNIQUEID, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind))
@@ -417,7 +417,7 @@ int getContactFromString( CONTACTSINFO* ci ) }
}
// nick (not exact)
- if ( (ci->flags&CI_NICK) && (!bMatch) ) {
+ if ( (ci->flags&CI_NICK) && (!bMatch)) {
szFind = getContactInfoT(CNF_NICK, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind))
@@ -427,7 +427,7 @@ int getContactFromString( CONTACTSINFO* ci ) }
}
// list name (not exact)
- if ( (ci->flags&CI_LISTNAME) && (!bMatch) ) {
+ if ( (ci->flags&CI_LISTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_DISPLAY, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind))
@@ -437,7 +437,7 @@ int getContactFromString( CONTACTSINFO* ci ) }
}
// firstname (exact)
- if ( (ci->flags&CI_FIRSTNAME) && (!bMatch) ) {
+ if ( (ci->flags&CI_FIRSTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_FIRSTNAME, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind)) {
@@ -447,7 +447,7 @@ int getContactFromString( CONTACTSINFO* ci ) }
}
// lastname (exact)
- if ( (ci->flags&CI_LASTNAME) && (!bMatch) ) {
+ if ( (ci->flags&CI_LASTNAME) && (!bMatch)) {
szFind = getContactInfoT(CNF_LASTNAME, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind)) {
@@ -457,7 +457,7 @@ int getContactFromString( CONTACTSINFO* ci ) }
}
// email (exact)
- if ( (ci->flags&CI_EMAIL) && (!bMatch) ) {
+ if ( (ci->flags&CI_EMAIL) && (!bMatch)) {
szFind = getContactInfoT(CNF_EMAIL, hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind)) {
@@ -467,7 +467,7 @@ int getContactFromString( CONTACTSINFO* ci ) }
}
// CNF_ (exact)
- if ( (ci->flags&CI_CNFINFO) && (!bMatch) ) {
+ if ( (ci->flags&CI_CNFINFO) && (!bMatch)) {
szFind = getContactInfoT((BYTE)(ci->flags&~(CI_CNFINFO|CI_TCHAR)), hContact, ci->flags&CI_TCHAR);
if (szFind != NULL) {
if (!_tcscmp(tszContact, szFind)) {
@@ -533,7 +533,7 @@ static int contactSettingChanged(WPARAM wParam, LPARAM lParam) ((!strcmp(dbw->szSetting, "e-mail")) && (cce[i].flags&CI_EMAIL)) ||
((!strcmp(dbw->szSetting, "MyHandle")) && (cce[i].flags&CI_LISTNAME)) ||
(cce[i].flags & CI_CNFINFO) != 0 || // lazy; always invalidate CNF info cache entries
- (( ((int)uid != CALLSERVICE_NOTFOUND) && (uid != NULL) ) && (!strcmp(dbw->szSetting, uid)) && (cce[i].flags & CI_UNIQUEID)))
+ (( ((int)uid != CALLSERVICE_NOTFOUND) && (uid != NULL)) && (!strcmp(dbw->szSetting, uid)) && (cce[i].flags & CI_UNIQUEID)))
{
/* remove from cache */
free(cce[i].tszContact);
diff --git a/plugins/Variables/help.cpp b/plugins/Variables/help.cpp index 3fe5915cb2..5231294de3 100644 --- a/plugins/Variables/help.cpp +++ b/plugins/Variables/help.cpp @@ -163,7 +163,7 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM free(tszContact);
} }
- if ( (hContact != INVALID_HANDLE_VALUE) && (hContact != NULL) )
+ if ( (hContact != INVALID_HANDLE_VALUE) && (hContact != NULL))
hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
else
hItem = NULL;
@@ -429,7 +429,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg,UINT msg,WPARAM wParam i += 1;
tszHelpDesc = tszTokenDesc = NULL;
tr = getTokenRegister(i);
- if ( (tr == NULL) || (tr->tszTokenString == NULL) ) {
+ if ( (tr == NULL) || (tr->tszTokenString == NULL)) {
continue;
}
else if (hdd != NULL) {
@@ -498,7 +498,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg,UINT msg,WPARAM wParam else {
text = NULL;
}
- if ( (text != NULL) && ((last == NULL) || (_tcsicmp(last, text))) ) {
+ if ( (text != NULL) && ((last == NULL) || (_tcsicmp(last, text)))) {
lvItem.mask = LVIF_TEXT;
lvItem.pszText = text;
ListView_InsertItem(hList, &lvItem);
@@ -521,7 +521,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg,UINT msg,WPARAM wParam }
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TOKENLIST) && (((NMHDR*)lParam)->code == NM_DBLCLK) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TOKENLIST) && (((NMHDR*)lParam)->code == NM_DBLCLK)) {
HWND hList, hwndInputDlg;
LVITEM lvItem;
int len, item;
@@ -940,7 +940,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar ShowWindow(hPage, SW_HIDE);
TabCtrl_InsertItem(hTab, tabCount++, &tci);
hShow = hShow==0?hPage:hShow;
- if ( (dat->vhs->fi != NULL) && (dat->vhs->fi->szFormat != NULL) ) {
+ if ( (dat->vhs->fi != NULL) && (dat->vhs->fi->szFormat != NULL)) {
if (dat->vhs->fi->flags & FIF_UNICODE)
SendMessage(hwndDlg, VARM_SETINPUTTEXT, 0, (LPARAM)dat->vhs->fi->tszFormat);
else {
@@ -966,7 +966,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar }
}
if ( (dat->vhs->flags&VHF_SUBJECT) ||
- ((dat->vhs->flags&VHF_INPUT) && (((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL)) || (dat->vhs->flags&VHF_SETLASTSUBJECT))) ) {
+ ((dat->vhs->flags&VHF_INPUT) && (((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL)) || (dat->vhs->flags&VHF_SETLASTSUBJECT)))) {
// subject window is created, but not necessarily shown
dat->hwndSubjectDlg = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CLIST_DIALOG), hwndDlg, clistDlgProc, (LPARAM)GetParent(hwndDlg));
if (pfnEnableThemeDialogTexture) {
@@ -976,7 +976,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
ShowWindow(hPage, SW_HIDE);
- if ((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL) )
+ if ((dat->vhs->fi != NULL) && (dat->vhs->fi->hContact != NULL))
SendMessage(hwndDlg, VARM_SETSUBJECT, (WPARAM)dat->vhs->fi->hContact, 0);
else if (dat->vhs->flags&VHF_SETLASTSUBJECT)
SendMessage(hwndDlg, VARM_SETSUBJECT, (WPARAM)INVALID_HANDLE_VALUE, 0);
@@ -991,7 +991,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar }
}
if ( (dat->vhs->flags&VHF_EXTRATEXT) ||
- ((dat->vhs->flags&VHF_INPUT) && (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL)) ) {
+ ((dat->vhs->flags&VHF_INPUT) && (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL))) {
// extratext window is created, but not necessarily shown
dat->hwndExtraTextDlg = hPage = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_EXTRATEXT_DIALOG), hwndDlg, extratextDlgProc, (LPARAM)GetParent(hwndDlg));
if (pfnEnableThemeDialogTexture)
@@ -999,7 +999,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar MoveWindow(hPage, (rcTabs.left - rcParent.left), (rcTabs.top - rcParent.top), (rcTabs.right - rcTabs.left) - 2*iFrameX, (rcTabs.bottom - rcTabs.top) - 2*iFrameY, TRUE);
ShowWindow(hPage, SW_HIDE);
- if ( (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL) ) {
+ if ( (dat->vhs->fi != NULL) && (dat->vhs->fi->tszExtraText != NULL)) {
if (dat->vhs->fi->flags & FIF_UNICODE)
SendMessage(hwndDlg, VARM_SETEXTRATEXT, 0, (LPARAM)dat->vhs->fi->tszExtraText);
else {
@@ -1042,7 +1042,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_OK:
- if ( (dat->vhs->fi != NULL) && (!(dat->vhs->flags&VHF_DONTFILLSTRUCT)) ) {
+ if ( (dat->vhs->fi != NULL) && (!(dat->vhs->flags&VHF_DONTFILLSTRUCT))) {
int len = SendMessage(hwndDlg, VARM_GETINPUTTEXTLENGTH, 0, 0);
if (len > 0) {
@@ -1081,7 +1081,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar (LPARAM)dat->vhs->hwndCtrl);
}
- if ( (dat->vhs->flags&VHF_FULLFILLSTRUCT) && (dat->vhs->fi != NULL) ) {
+ if ( (dat->vhs->flags&VHF_FULLFILLSTRUCT) && (dat->vhs->fi != NULL)) {
int len;
len = SendMessage(hwndDlg, VARM_GETEXTRATEXTLENGTH, 0, 0);
@@ -1217,7 +1217,7 @@ static BOOL CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lPar }
case WM_NOTIFY:
- if ( (((NMHDR*)lParam)->idFrom == IDC_TABS) ) {
+ if ( (((NMHDR*)lParam)->idFrom == IDC_TABS)) {
if (((NMHDR*)lParam)->code == TCN_SELCHANGING) {
TCITEM tci;
diff --git a/plugins/Variables/options.cpp b/plugins/Variables/options.cpp index b4a720094f..175baff0f0 100644 --- a/plugins/Variables/options.cpp +++ b/plugins/Variables/options.cpp @@ -43,7 +43,7 @@ static INT_PTR CALLBACK SetOptsDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARA break;
case WM_COMMAND:
- if ( (HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED) ) {
+ if ( (HIWORD(wParam) == EN_CHANGE) || (HIWORD(wParam) == BN_CLICKED)) {
switch (LOWORD(wParam)) {
case IDC_PARSEATSTARTUP:
case IDC_STRIPCRLF:
diff --git a/plugins/Variables/parse_alias.cpp b/plugins/Variables/parse_alias.cpp index 7f90e0eb04..2fe4164d15 100644 --- a/plugins/Variables/parse_alias.cpp +++ b/plugins/Variables/parse_alias.cpp @@ -29,7 +29,7 @@ static ALIASREGISTER *searchAliasRegister(TCHAR *szAlias) { unsigned int i;
res = NULL;
- if ( (szAlias == NULL) || (_tcslen(szAlias) == 0) ) {
+ if ( (szAlias == NULL) || (_tcslen(szAlias) == 0)) {
return NULL;
}
EnterCriticalSection(&csAliasRegister);
@@ -55,12 +55,12 @@ static TCHAR *replaceArguments(TCHAR *res, TCHAR *tArg, TCHAR *rArg) { cur = ecur = 0;
while (*(res+cur) != _T('\0')) {
- if ( (*(res+cur) == _T('(')) || (*(res+cur) == _T(',')) ) {
+ if ( (*(res+cur) == _T('(')) || (*(res+cur) == _T(','))) {
ecur = ++cur;
- while ( (*(res+ecur) != _T(')')) && (*(res+ecur) != _T(',')) ) {
+ while ( (*(res+ecur) != _T(')')) && (*(res+ecur) != _T(','))) {
ecur++;
}
- if ( ((signed int)_tcslen(tArg) == (ecur-cur)) && (!_tcsncmp(tArg, res+cur, _tcslen(tArg))) ) {
+ if ( ((signed int)_tcslen(tArg) == (ecur-cur)) && (!_tcsncmp(tArg, res+cur, _tcslen(tArg)))) {
if (_tcslen(rArg) > _tcslen(tArg)) {
res = ( TCHAR* )realloc(res, (_tcslen(res) + (_tcslen(rArg)-_tcslen(tArg)) + 1)*sizeof(TCHAR));
if (res == NULL)
@@ -83,7 +83,7 @@ static TCHAR *parseTranslateAlias(ARGUMENTSINFO *ai) { ALIASREGISTER *areg;
areg = searchAliasRegister(ai->targv[0]);
- if ( (areg == NULL) || (areg->argc != ai->argc-1) ) {
+ if ( (areg == NULL) || (areg->argc != ai->argc-1)) {
return NULL;
}
res = _tcsdup(areg->szTranslation);
@@ -188,7 +188,7 @@ static TCHAR *parseAddAlias(ARGUMENTSINFO *ai) { if (i != argc-1)
_tcscat(szArgs, _T(","));
}
- if ( (szArgs != NULL) && (argc > 0) ) {
+ if ( (szArgs != NULL) && (argc > 0)) {
szArgsA = u2a(szArgs);
diff --git a/plugins/Variables/parse_external.cpp b/plugins/Variables/parse_external.cpp index a93f6ba44f..65226fb0e4 100644 --- a/plugins/Variables/parse_external.cpp +++ b/plugins/Variables/parse_external.cpp @@ -73,7 +73,7 @@ static TCHAR *parseWinampSong(ARGUMENTSINFO *ai) { }
scur = _tcschr(szTitle, _T('.'));
cur = _tcsstr(scur, _T(" - Winamp"));
- if ( (scur == NULL) || (cur == NULL) || (scur >= cur) || (scur > (szTitle + _tcslen(szTitle) - 2)) || (cur > (szTitle + _tcslen(szTitle))) ) {
+ if ( (scur == NULL) || (cur == NULL) || (scur >= cur) || (scur > (szTitle + _tcslen(szTitle) - 2)) || (cur > (szTitle + _tcslen(szTitle)))) {
free(szTitle);
return NULL;
}
@@ -101,15 +101,15 @@ static TCHAR *parseWinampState(ARGUMENTSINFO *ai) { }
scur = _tcschr(szTitle, _T('.'));
cur = _tcsstr(scur, _T(" - Winamp"));
- if ( (scur == NULL) || (cur == NULL) ) {
+ if ( (scur == NULL) || (cur == NULL)) {
free(szTitle);
return _tcsdup(TranslateT("Stopped"));
}
- if ( (!_tcsncmp(cur+10, _T("[Stopped]"), 9)) ) {
+ if ( (!_tcsncmp(cur+10, _T("[Stopped]"), 9))) {
free(szTitle);
return _tcsdup(TranslateT("Stopped"));
}
- if ( (!_tcsncmp(cur+10, _T("[Paused]"), 8)) ) {
+ if ( (!_tcsncmp(cur+10, _T("[Paused]"), 8))) {
free(szTitle);
return _tcsdup(TranslateT("Paused"));
}
@@ -135,7 +135,7 @@ static unsigned int checkAMIP() { }
log_debugA("AMIP failed to initialized");
if (lastAMIPFailure == 0) {
- /* if this is the first failure after a succesful init, call uninit for a cleanup (maybe it'll help for the next try ;) ) */
+ /* if this is the first failure after a succesful init, call uninit for a cleanup (maybe it'll help for the next try ;)) */
acUninit();
}
lastAMIPFailure = GetTickCount();
diff --git a/plugins/Variables/parse_inet.cpp b/plugins/Variables/parse_inet.cpp index 21938b21ad..41481e3b60 100644 --- a/plugins/Variables/parse_inet.cpp +++ b/plugins/Variables/parse_inet.cpp @@ -37,7 +37,7 @@ static TCHAR *parseUrlEnc(ARGUMENTSINFO *ai) { }
cur = 0;
while (cur < strlen(res)) {
- if ( ( (*(res+cur) >= '0') && (*(res+cur) <= '9') ) || ( (*(res+cur) >= 'a') && (*(res+cur) <= 'z') ) || ( (*(res+cur) >= 'A') && (*(res+cur) <= 'Z') ) ) {
+ if ( ( (*(res+cur) >= '0') && (*(res+cur) <= '9')) || ( (*(res+cur) >= 'a') && (*(res+cur) <= 'z')) || ( (*(res+cur) >= 'A') && (*(res+cur) <= 'Z')) ) {
cur++;
continue;
}
@@ -75,7 +75,7 @@ static TCHAR *parseUrlDec(ARGUMENTSINFO *ai) { }
cur = 0;
while (cur < strlen(res)) {
- if ( (*(res+cur) == '%') && (strlen(res+cur) >= 3) ) {
+ if ( (*(res+cur) == '%') && (strlen(res+cur) >= 3)) {
memset(hex, '\0', sizeof(hex));
strncpy(hex, res+cur+1, 2);
*(res+cur) = (char)strtol(hex, NULL, 16);
diff --git a/plugins/Variables/parse_logic.cpp b/plugins/Variables/parse_logic.cpp index 36a5f664e3..23f8badca8 100644 --- a/plugins/Variables/parse_logic.cpp +++ b/plugins/Variables/parse_logic.cpp @@ -141,7 +141,7 @@ static TCHAR *parseIfequal(ARGUMENTSINFO *ai) tszFirst = formatString(&fi);
fi.szFormat = ai->argv[2];
tszSecond = formatString(&fi);
- if ( (tszFirst == NULL) || (tszSecond == NULL) ) {
+ if ( (tszFirst == NULL) || (tszSecond == NULL)) {
if (tszFirst != NULL)
free(tszFirst);
@@ -150,7 +150,7 @@ static TCHAR *parseIfequal(ARGUMENTSINFO *ai) return NULL;
}
- if ( (ttoi(tszFirst)) == (ttoi(tszSecond)) ) {
+ if ( (ttoi(tszFirst)) == (ttoi(tszSecond))) {
free(tszFirst);
free(tszSecond);
return _tcsdup(ai->targv[3]);
@@ -176,7 +176,7 @@ static TCHAR *parseIfgreater(ARGUMENTSINFO *ai) { tszFirst = formatString(&fi);
fi.szFormat = ai->argv[2];
tszSecond = formatString(&fi);
- if ( (tszFirst == NULL) || (tszSecond == NULL) ) {
+ if ( (tszFirst == NULL) || (tszSecond == NULL)) {
if (tszFirst != NULL) {
free(tszFirst);
}
@@ -185,7 +185,7 @@ static TCHAR *parseIfgreater(ARGUMENTSINFO *ai) { }
return NULL;
}
- if ( (ttoi(tszFirst)) > (ttoi(tszSecond)) ) {
+ if ( (ttoi(tszFirst)) > (ttoi(tszSecond))) {
free(tszFirst);
free(tszSecond);
return _tcsdup(ai->targv[3]);
@@ -210,7 +210,7 @@ static TCHAR *parseIflonger(ARGUMENTSINFO *ai) { tszFirst = formatString(&fi);
fi.szFormat = ai->argv[2];
tszSecond = formatString(&fi);
- if ( (tszFirst == NULL) || (tszSecond == NULL) ) {
+ if ( (tszFirst == NULL) || (tszSecond == NULL)) {
if (tszFirst != NULL) {
free(tszFirst);
}
@@ -219,7 +219,7 @@ static TCHAR *parseIflonger(ARGUMENTSINFO *ai) { }
return NULL;
}
- if ( _tcslen(tszFirst) > _tcslen(tszSecond) ) {
+ if ( _tcslen(tszFirst) > _tcslen(tszSecond)) {
free(tszFirst);
free(tszSecond);
return _tcsdup(ai->targv[3]);
@@ -302,7 +302,7 @@ static TCHAR *parseLonger(ARGUMENTSINFO *ai) if (ai->argc != 3)
return NULL;
- if ( _tcslen(ai->targv[1]) <= _tcslen(ai->targv[2]) )
+ if ( _tcslen(ai->targv[1]) <= _tcslen(ai->targv[2]))
ai->flags |= AIF_FALSE;
return _tcsdup(_T(""));
diff --git a/plugins/Variables/parse_miranda.cpp b/plugins/Variables/parse_miranda.cpp index e941a91e89..7a4e26567e 100644 --- a/plugins/Variables/parse_miranda.cpp +++ b/plugins/Variables/parse_miranda.cpp @@ -430,7 +430,7 @@ static TCHAR *parseLastSeenStatus(ARGUMENTSINFO *ai) { ci.tszContact = ai->targv[1];
ci.flags = 0xFFFFFFFF^(CI_TCHAR==0?CI_UNICODE:0);
count = getContactFromString( &ci );
- if ( (count == 1) && (ci.hContacts != NULL) ) {
+ if ( (count == 1) && (ci.hContacts != NULL)) {
hContact = ci.hContacts[0];
free(ci.hContacts);
}
@@ -598,7 +598,7 @@ static BOOL isValidDbEvent(DBEVENTINFO *dbe, int flags) ((dbe->eventType == EVENTTYPE_STATUSCHANGE) && (flags&DBE_STATUSCHANGE)) ||
((flags&DBE_OTHER));
bEventFlags = (dbe->flags&DBEF_SENT)?(flags&DBE_SENT):(flags&DBE_RCVD);
- bEventFlags = (bEventFlags && ((dbe->flags&DBEF_READ)?(flags&DBE_READ):(flags&DBE_UNREAD)) );
+ bEventFlags = (bEventFlags && ((dbe->flags&DBEF_READ)?(flags&DBE_READ):(flags&DBE_UNREAD)));
return (bEventType && bEventFlags);
}
@@ -614,9 +614,9 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags) dbe.cbBlob = 0;
dbe.pBlob = NULL;
if (hContact != NULL) {
- if ( (flags & DBE_FIRST) && (flags & DBE_UNREAD) ) {
+ if ( (flags & DBE_FIRST) && (flags & DBE_UNREAD)) {
hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRSTUNREAD, (WPARAM)hContact, 0);
- if ( hDbEvent == NULL && (flags & DBE_READ) )
+ if ( hDbEvent == NULL && (flags & DBE_READ))
hDbEvent = (HANDLE)CallService(MS_DB_EVENT_FINDFIRST, (WPARAM)hContact, 0);
}
else if (flags & DBE_FIRST)
@@ -673,7 +673,7 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags) hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!CallService(MS_DB_EVENT_GET, (WPARAM)hSearchEvent, (LPARAM)&dbe)) {
- if (((dbe.timestamp < matchTimestamp) || (matchTimestamp == 0) ) && (dbe.timestamp > priorTimestamp)) {
+ if (((dbe.timestamp < matchTimestamp) || (matchTimestamp == 0)) && (dbe.timestamp > priorTimestamp)) {
hMatchEvent = hSearchEvent;
matchTimestamp = dbe.timestamp;
}
@@ -691,7 +691,7 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags) hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!CallService(MS_DB_EVENT_GET, (WPARAM)hSearchEvent, (LPARAM)&dbe)) {
- if ( ((dbe.timestamp > matchTimestamp) || (matchTimestamp == 0)) && (dbe.timestamp < priorTimestamp) ) {
+ if ( ((dbe.timestamp > matchTimestamp) || (matchTimestamp == 0)) && (dbe.timestamp < priorTimestamp)) {
hMatchEvent = hSearchEvent;
matchTimestamp = dbe.timestamp;
}
@@ -717,7 +717,7 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags) flags &= ~DBE_LAST;
}
}
- } while ( (!bEventOk) && (hDbEvent != NULL) );
+ } while ( (!bEventOk) && (hDbEvent != NULL));
return hDbEvent;
}
@@ -806,7 +806,7 @@ static TCHAR *parseDbEvent(ARGUMENTSINFO *ai) ci.tszContact = ai->targv[1];
ci.flags = 0xFFFFFFFF^(CI_TCHAR==0?CI_UNICODE:0);
count = getContactFromString( &ci );
- if ( (count == 1) && (ci.hContacts != NULL) ) {
+ if ( (count == 1) && (ci.hContacts != NULL)) {
hContact = ci.hContacts[0];
free(ci.hContacts);
}
diff --git a/plugins/Variables/parse_str.cpp b/plugins/Variables/parse_str.cpp index d8edcf642d..df1739a815 100644 --- a/plugins/Variables/parse_str.cpp +++ b/plugins/Variables/parse_str.cpp @@ -32,7 +32,7 @@ static TCHAR *parseCaps(ARGUMENTSINFO *ai) { *cur = (TCHAR)CharUpper((LPTSTR)*cur);
cur++;
while (*cur != _T('\0')) {
- if ( (*cur == _T(' ')) && (*(cur+1) != _T('\0')) ) {
+ if ( (*cur == _T(' ')) && (*(cur+1) != _T('\0'))) {
cur++;
if (IsCharLower(*cur))
*cur = (TCHAR)CharUpper((LPTSTR)*cur);
@@ -58,7 +58,7 @@ static TCHAR *parseCaps2(ARGUMENTSINFO *ai) { *cur = (TCHAR)CharUpper((LPTSTR)*cur);
cur++;
while (*cur != _T('\0')) {
- if ( (*cur == _T(' ')) && (*(cur+1) != _T('\0')) ) {
+ if ( (*cur == _T(' ')) && (*(cur+1) != _T('\0'))) {
cur++;
if (IsCharLower(*cur))
*cur = (TCHAR)CharUpper((LPTSTR)*cur);
@@ -87,7 +87,7 @@ static TCHAR *parseEolToCrlf(ARGUMENTSINFO *ai) { cur = res;
do {
cur = _tcschr(cur, _T('\n'));
- if ( (cur == NULL) || ((cur > res) && (*(cur-1) == '\r')) ) {
+ if ( (cur == NULL) || ((cur > res) && (*(cur-1) == '\r'))) {
continue;
}
log_debug(cur);
@@ -116,7 +116,7 @@ static TCHAR *parseFixeol(ARGUMENTSINFO *ai) { return NULL;
}
cur = ai->targv[1];
- while ( (_tcscmp(cur, _T("\r\n"))) && (*cur != _T('\n')) && (*cur != _T('\0')) ) {
+ while ( (_tcscmp(cur, _T("\r\n"))) && (*cur != _T('\n')) && (*cur != _T('\0'))) {
cur++;
}
if (*cur == '\0') {
@@ -445,7 +445,7 @@ static TCHAR *parseReplace(ARGUMENTSINFO *ai) { TCHAR *res, *cur;
unsigned int i, pos;
- if ( (ai->argc < 4) || (ai->argc%2 != 0) ) {
+ if ( (ai->argc < 4) || (ai->argc%2 != 0)) {
return NULL;
}
pos = 0;
@@ -556,7 +556,7 @@ static TCHAR *parseStrchr(ARGUMENTSINFO *ai) { }
ZeroMemory(szVal, sizeof(szVal));
c = _tcschr(ai->targv[1], *ai->targv[2]);
- if ( (c == NULL) || (*c == _T('\0')) ) {
+ if ( (c == NULL) || (*c == _T('\0'))) {
return _tcsdup(_T("0"));
}
@@ -650,7 +650,7 @@ static TCHAR *parseStrrchr(ARGUMENTSINFO *ai) { return NULL;
}
c = _tcsrchr(ai->targv[1], *ai->targv[2]);
- if ( (c == NULL) || (*c == _T('\0')) ) {
+ if ( (c == NULL) || (*c == _T('\0'))) {
return _tcsdup(_T("0"));
}
@@ -665,7 +665,7 @@ static TCHAR *parseStrstr(ARGUMENTSINFO *ai) { return NULL;
}
c = _tcsstr(ai->targv[1], ai->targv[2]);
- if ( (c == NULL) || (*c == _T('\0')) ) {
+ if ( (c == NULL) || (*c == _T('\0'))) {
return _tcsdup(_T("0"));
}
@@ -705,7 +705,7 @@ static TCHAR *parseSelect(ARGUMENTSINFO *ai) { return NULL;
}
n = ttoi(ai->targv[1]);
- if ( (n > (signed int)ai->argc-2) || (n <= 0) ) {
+ if ( (n > (signed int)ai->argc-2) || (n <= 0)) {
return NULL;
}
@@ -739,7 +739,7 @@ static TCHAR *parseTrim(ARGUMENTSINFO *ai) { scur++;
}
ecur = ai->targv[1] + _tcslen(ai->targv[1])-1;
- while ( (*ecur == _T(' ')) && (ecur > ai->targv[1]) ) {
+ while ( (*ecur == _T(' ')) && (ecur > ai->targv[1])) {
ecur--;
}
if (scur >= ecur) {
@@ -761,7 +761,7 @@ static TCHAR *parseTab(ARGUMENTSINFO *ai) { TCHAR *res, *cur;
count = 1;
- if ( (ai->argc == 2) && (_tcslen(ai->targv[1]) > 0) ) {
+ if ( (ai->argc == 2) && (_tcslen(ai->targv[1]) > 0)) {
count = ttoi(ai->targv[1]);
}
if (count < 0) {
@@ -809,7 +809,7 @@ static TCHAR *getNthWord(TCHAR *szString, int w) { scur++;
}
count+=1;
- while ( (count < w) && (scur < szString+_tcslen(szString)) ) {
+ while ( (count < w) && (scur < szString+_tcslen(szString))) {
if (*scur == _T(' ')) {
while (*scur == _T(' ')) {
scur++;
@@ -824,7 +824,7 @@ static TCHAR *getNthWord(TCHAR *szString, int w) { return NULL;
}
ecur = scur;
- while ( (*ecur != _T(' ')) && (*ecur != _T('\0')) ) {
+ while ( (*ecur != _T(' ')) && (*ecur != _T('\0'))) {
ecur++;
}
res = ( TCHAR* )malloc((ecur-scur+1)*sizeof(TCHAR));
@@ -855,7 +855,7 @@ static TCHAR *parseWord(ARGUMENTSINFO *ai) { }
else to = from;
- if ( (from == 0) || (to == 0) || (from > to) )
+ if ( (from == 0) || (to == 0) || (from > to))
return NULL;
for (i=from;i<=to;i++) {
diff --git a/plugins/Variables/parse_system.cpp b/plugins/Variables/parse_system.cpp index 65e75ffc9a..9ede81bf4a 100644 --- a/plugins/Variables/parse_system.cpp +++ b/plugins/Variables/parse_system.cpp @@ -194,7 +194,7 @@ static TCHAR *parseDirectory(ARGUMENTSINFO *ai) { ecur = ai->targv[1]+_tcslen(ai->targv[1]);
while (depth > 0) {
- while ( (*ecur != _T('\\')) && (ecur > ai->targv[1]) )
+ while ( (*ecur != _T('\\')) && (ecur > ai->targv[1]))
ecur--;
if (*ecur != _T('\\'))
@@ -204,7 +204,7 @@ static TCHAR *parseDirectory(ARGUMENTSINFO *ai) { ecur--;
}
scur = ecur;
- while ( (*scur != _T('\\')) && (scur > ai->targv[1]) )
+ while ( (*scur != _T('\\')) && (scur > ai->targv[1]))
scur--;
if (*scur == _T('\\'))
@@ -239,7 +239,7 @@ static TCHAR *parseDirectory2(ARGUMENTSINFO *ai) { ecur = ai->targv[1]+_tcslen(ai->targv[1]);
while (depth > 0) {
- while ( (*ecur != _T('\\')) && (ecur > ai->targv[1]) )
+ while ( (*ecur != _T('\\')) && (ecur > ai->targv[1]))
ecur--;
if (*ecur != _T('\\'))
@@ -456,12 +456,12 @@ static TCHAR *parseListDir(ARGUMENTSINFO *ai) { if (hFind == INVALID_HANDLE_VALUE) {
return NULL;
}
- if ( ((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles)) ) {
+ if ( ((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles))) {
tszRes = ( TCHAR* )malloc((_tcslen(ffd.cFileName) + _tcslen(tszSeperator) + 1)*sizeof(TCHAR));
_tcscpy(tszRes, ffd.cFileName);
}
while (FindNextFile(hFind, &ffd) != 0) {
- if ( ((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles)) ) {
+ if ( ((ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) && (bDirs)) || ((!(ffd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)) && (bFiles))) {
if (tszRes != NULL) {
_tcscat(tszRes, tszSeperator);
tszRes = ( TCHAR* )realloc(tszRes, (_tcslen(tszRes) + _tcslen(ffd.cFileName) + _tcslen(tszSeperator) + 1)*sizeof(TCHAR));
@@ -484,7 +484,7 @@ static BOOL CALLBACK MyProcessEnumerator(DWORD dwPID, WORD wTask, char *szProces char **szProc;
szProc = (char **)lParam;
- if ( (*szProc != NULL) && (!_stricmp(*szProc, szProcess)) ) {
+ if ( (*szProc != NULL) && (!_stricmp(*szProc, szProcess))) {
*szProc = NULL;
}
@@ -558,7 +558,7 @@ static TCHAR *parseRegistryValue(ARGUMENTSINFO *ai) { }
ZeroMemory(res, len);
err = RegQueryValueEx(hKey, ai->targv[2], NULL, &type, (BYTE*)res, &len);
- if ( (err != ERROR_SUCCESS) || (type != REG_SZ) ) {
+ if ( (err != ERROR_SUCCESS) || (type != REG_SZ)) {
RegCloseKey(hKey);
free(res);
return NULL;
@@ -602,7 +602,7 @@ static TCHAR *parseTimestamp2Date(ARGUMENTSINFO *ai) { if (timestamp == 0) {
return NULL;
}
- if ( (ai->argc == 2) || ((ai->argc > 2) && (_tcslen(ai->targv[2]) == 0)) ) {
+ if ( (ai->argc == 2) || ((ai->argc > 2) && (_tcslen(ai->targv[2]) == 0))) {
szFormat = NULL;
}
else {
@@ -638,7 +638,7 @@ static TCHAR *parseTimestamp2Time(ARGUMENTSINFO *ai) { if (timestamp == 0) {
return NULL;
}
- if ( (ai->argc == 2) || ((ai->argc > 2) && (_tcslen(ai->targv[2]) == 0)) ) {
+ if ( (ai->argc == 2) || ((ai->argc > 2) && (_tcslen(ai->targv[2]) == 0))) {
szFormat = NULL;
}
else {
@@ -755,7 +755,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) { }
}
}
- } while ( (totalReadSz < fileSz) && (readSz > 0) );
+ } while ( (totalReadSz < fileSz) && (readSz > 0));
if (lineNo < 0) {
lineNo = lineCount + lineNo + 1;
}
@@ -796,12 +796,12 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) { }
}
}
- if ( ((tUC) && (*(TCHAR *)pCur == _T('\r'))) || ((!tUC) && (*(char *)pCur == '\r')) ) {
+ if ( ((tUC) && (*(TCHAR *)pCur == _T('\r'))) || ((!tUC) && (*(char *)pCur == '\r'))) {
// in case the \r was at the end of the buffer, \n could be next
SetFilePointer(hFile, -1*csz, NULL, FILE_CURRENT);
totalReadSz -= csz;
}
- } while ( (totalReadSz < fileSz) && (readSz > 0) );
+ } while ( (totalReadSz < fileSz) && (readSz > 0));
if (linePos < 0) {
CloseHandle(hFile);
free(pBuf);
@@ -823,7 +823,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) { }
for (pCur = pBuf;(pCur < pBuf+readSz);pCur+=csz) {
if ((tUC) && ((!_tcsncmp((TCHAR *)pCur, _T("\r\n"), 2)) || (*(TCHAR *)pCur == _T('\n'))) ||
- ((!tUC) && (((!strncmp((char *)pCur, "\r\n", 2)) || (*(char *)pCur == '\n')))) ) {
+ ((!tUC) && (((!strncmp((char *)pCur, "\r\n", 2)) || (*(char *)pCur == '\n'))))) {
CloseHandle(hFile);
if (tUC) {
*(TCHAR *)pCur = _T('\0');
@@ -843,7 +843,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) { return res;
}
}
- if ( ((DWORD)(linePos+(pCur-pBuf)) == fileSz) ) { // eof
+ if ( ((DWORD)(linePos+(pCur-pBuf)) == fileSz)) { // eof
CloseHandle(hFile);
if (tUC) {
@@ -859,7 +859,7 @@ static TCHAR *parseTextFile(ARGUMENTSINFO *ai) { if (readSz == bufSz-csz) {
// buffer must be increased
bufSz += TXTFILEBUFSZ*csz;
- if ( ((tUC) && (*(TCHAR *)pCur == _T('\r'))) || ((!tUC) && (*(char *)pCur == '\r')) ) {
+ if ( ((tUC) && (*(TCHAR *)pCur == _T('\r'))) || ((!tUC) && (*(char *)pCur == '\r'))) {
pCur -= csz;
}
icur = pCur - pBuf;
diff --git a/plugins/Variables/parse_variables.cpp b/plugins/Variables/parse_variables.cpp index 19f5a39c20..58520f1087 100644 --- a/plugins/Variables/parse_variables.cpp +++ b/plugins/Variables/parse_variables.cpp @@ -28,12 +28,12 @@ static int addToVariablesRegister(TCHAR *szName, TCHAR *szText) { int i;
- if ( (szName == NULL) || (szText == NULL) || (_tcslen(szName) <= 0) ) {
+ if ( (szName == NULL) || (szText == NULL) || (_tcslen(szName) <= 0)) {
return -1;
}
EnterCriticalSection(&csVarRegister);
for (i=0;i<vrCount;i++) {
- if ( (!_tcscmp(vr[i].szName, szName)) ) { // && (vr[i].dwOwnerThread == GetCurrentThreadId()) ) {
+ if ( (!_tcscmp(vr[i].szName, szName))) { // && (vr[i].dwOwnerThread == GetCurrentThreadId())) {
free(vr[i].szText);
vr[i].szText = _tcsdup(szText);
LeaveCriticalSection(&csVarRegister);
@@ -61,12 +61,12 @@ static TCHAR *searchVariableRegister(TCHAR *szName) { int i;
res = NULL;
- if ( (szName == NULL) || (_tcslen(szName) <= 0) ) {
+ if ( (szName == NULL) || (_tcslen(szName) <= 0)) {
return NULL;
}
EnterCriticalSection(&csVarRegister);
for (i=0;i<vrCount;i++) {
- if ( (!_tcscmp(vr[i].szName, szName)) ) { // && (vr[i].dwOwnerThread == GetCurrentThreadId()) ) {
+ if ( (!_tcscmp(vr[i].szName, szName))) { // && (vr[i].dwOwnerThread == GetCurrentThreadId())) {
res = _tcsdup(vr[i].szText);
LeaveCriticalSection(&csVarRegister);
return res;
diff --git a/plugins/Variables/tokenregister.cpp b/plugins/Variables/tokenregister.cpp index c9b13e674f..56d30ffc30 100644 --- a/plugins/Variables/tokenregister.cpp +++ b/plugins/Variables/tokenregister.cpp @@ -183,7 +183,7 @@ TCHAR *parseFromRegister(ARGUMENTSINFO *ai) TCHAR *temp, *res;
TOKENREGISTEREX *thisVr, trCopy;
- if ( (ai == NULL) || (ai->argc == 0) || (ai->targv[0] == NULL) ) {
+ if ( (ai == NULL) || (ai->argc == 0) || (ai->targv[0] == NULL)) {
return NULL;
}
callRes = 0;
diff --git a/plugins/Variables/variables.cpp b/plugins/Variables/variables.cpp index 69adcd87f0..5f81c35eb3 100644 --- a/plugins/Variables/variables.cpp +++ b/plugins/Variables/variables.cpp @@ -61,7 +61,7 @@ TCHAR *getArguments(TCHAR *string, TCHAR ***aargv, int *aargc) { cur++;
scur = cur-1;
bDontParse = bNewArg = bDone = FALSE;
- while ( (!bDone) && (*cur != _T('\0')) ) {
+ while ( (!bDone) && (*cur != _T('\0'))) {
switch (*cur) {
case _T(DONTPARSE_CHAR):
if (bDontParse) {
@@ -73,7 +73,7 @@ TCHAR *getArguments(TCHAR *string, TCHAR ***aargv, int *aargc) { break;
case _T(','):
- if ( (!bDontParse) && (brackets == 0) ) {
+ if ( (!bDontParse) && (brackets == 0)) {
bNewArg = TRUE;
}
break;
@@ -85,10 +85,10 @@ TCHAR *getArguments(TCHAR *string, TCHAR ***aargv, int *aargc) { break;
case _T(')'):
- if ( (brackets == 0) && (!bDontParse) ) {
+ if ( (brackets == 0) && (!bDontParse)) {
bDone = bNewArg = TRUE;
}
- else if ( (brackets > 0) && (!bDontParse) ) {
+ else if ( (brackets > 0) && (!bDontParse)) {
brackets -= 1;
}
break;
@@ -207,12 +207,12 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi) continue;
}
// remove end of lines
- else if ( (!_tcsncmp(cur, _T("\r\n"), 2)) && (gParseOpts.bStripEOL) ) {
+ else if ( (!_tcsncmp(cur, _T("\r\n"), 2)) && (gParseOpts.bStripEOL)) {
MoveMemory(cur, cur+2, (_tcslen(cur+2)+1)*sizeof(TCHAR));
pos = cur-string-1;
continue;
}
- else if ( ((*cur == _T('\n')) && (gParseOpts.bStripEOL)) || ((*cur == _T(' ')) && (gParseOpts.bStripWS)) ) {
+ else if ( ((*cur == _T('\n')) && (gParseOpts.bStripEOL)) || ((*cur == _T(' ')) && (gParseOpts.bStripWS))) {
MoveMemory(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR));
pos = cur - string - 1;
continue;
@@ -232,7 +232,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi) pos = scur-string-1;
continue;
}
- else if ( (*cur != _T(FIELD_CHAR)) && (*cur != _T(FUNC_CHAR)) && (*cur != _T(FUNC_ONCE_CHAR)) ) {
+ else if ( (*cur != _T(FIELD_CHAR)) && (*cur != _T(FUNC_CHAR)) && (*cur != _T(FUNC_ONCE_CHAR))) {
if (gParseOpts.bStripAll) {
MoveMemory(cur, cur+1, (_tcslen(cur+1)+1)*sizeof(TCHAR));
pos = cur - string - 1;
@@ -283,12 +283,12 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi) }
cur += len+1;
}
- else if ( (*cur == _T(FUNC_CHAR)) || (*cur == _T(FUNC_ONCE_CHAR)) ) {
+ else if ( (*cur == _T(FUNC_CHAR)) || (*cur == _T(FUNC_ONCE_CHAR))) {
TCHAR *argcur;
cur += _tcslen(tr->tszTokenString)+1;
argcur = getArguments(cur, &argv, &argc);
- if ( (argcur == cur) || (argcur == NULL) ) {
+ if ( (argcur == cur) || (argcur == NULL)) {
fi->eCount += 1;
// error getting arguments
continue;
@@ -348,7 +348,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi) // 'special' chars need to be taken care of (DONTPARSE, TRYPARSE, \r\n)
// if the var contains the escape character, this character must be doubled, we don't want it to act as an esacpe char
/*for (tcur=parsedToken;*tcur != '\0';tcur++) {
- if (*tcur == DONTPARSE_CHAR) {//|| (*(var+pos) == ')') ) {
+ if (*tcur == DONTPARSE_CHAR) {//|| (*(var+pos) == ')')) {
parsedToken = realloc(parsedToken, strlen(parsedToken) + 2);
if (parsedToken == NULL) {
fi->err = EMEM;
@@ -572,7 +572,7 @@ int LoadVarModule() { HMODULE hUxTheme;
- if ( (initTokenRegister() != 0) || (initContactModule() != 0) ) {
+ if ( (initTokenRegister() != 0) || (initContactModule() != 0)) {
return -1;
}
diff --git a/plugins/WhenWasIt/dlg_handlers.cpp b/plugins/WhenWasIt/dlg_handlers.cpp index e789b29d32..37160995e2 100644 --- a/plugins/WhenWasIt/dlg_handlers.cpp +++ b/plugins/WhenWasIt/dlg_handlers.cpp @@ -740,7 +740,7 @@ INT_PTR CALLBACK BirthdaysCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam return res;
}
-//only updates the birthday part of the list view entry. Won't update the protocol and the contact name (those shouldn't change anyway :) )
+//only updates the birthday part of the list view entry. Won't update the protocol and the contact name (those shouldn't change anyway :))
int UpdateBirthdayEntry(HWND hList, HANDLE hContact, int entry, int bShowAll, int bShowCurrentAge, int bAdd)
{
const int maxSize = 2048;
diff --git a/plugins/WhenWasIt/hooked_events.cpp b/plugins/WhenWasIt/hooked_events.cpp index 4353e605f6..dca0cbf879 100644 --- a/plugins/WhenWasIt/hooked_events.cpp +++ b/plugins/WhenWasIt/hooked_events.cpp @@ -98,8 +98,8 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) hContactSettingChanged = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnContactSettingChanged);
hTopToolBarModuleLoaded = HookEvent(ME_TTB_MODULELOADED, OnTopToolBarModuleLoaded);
- SkinAddNewSoundEx(BIRTHDAY_NEAR_SOUND, "WhenWasIt", "Birthday near");
- SkinAddNewSoundEx(BIRTHDAY_TODAY_SOUND, "WhenWasIt", "Birthday today");
+ SkinAddNewSoundEx(BIRTHDAY_NEAR_SOUND, LPGEN("WhenWasIt"), LPGEN("Birthday near"));
+ SkinAddNewSoundEx(BIRTHDAY_TODAY_SOUND, LPGEN("WhenWasIt"), LPGEN("Birthday today"));
RebuildAdvIconList();
diff --git a/plugins/helpers/gen_helpers.cpp b/plugins/helpers/gen_helpers.cpp index 084be88139..a792493284 100644 --- a/plugins/helpers/gen_helpers.cpp +++ b/plugins/helpers/gen_helpers.cpp @@ -31,7 +31,7 @@ char *Hlp_GetProtocolNameA(const char *proto) { char protoname[256];
- if ( (!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname)) ) {
+ if ( (!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname))) {
return NULL;
}
@@ -42,7 +42,7 @@ TCHAR *Hlp_GetProtocolName(const char *proto) { char protoname[256];
- if ( (!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname)) ) {
+ if ( (!ProtoServiceExists(proto, PS_GETNAME)) || (CallProtoService(proto, PS_GETNAME, (WPARAM)sizeof(protoname), (LPARAM)protoname))) {
return NULL;
}
@@ -413,7 +413,7 @@ int Hlp_UnicodeCheck(char *szPluginName, BOOL bForce, const char *szModule) { if (!CallService(MS_SYSTEM_GETVERSIONTEXT, (WPARAM)sizeof(szVersionText), (LPARAM)szVersionText)) {
ptr = strstr(szVersionText, "Unicode");
- if ( (ptr == NULL) && (!DBGetContactSettingByte(NULL, szModule, SETTING_NOENCODINGCHECK, 0)) ) {
+ if ( (ptr == NULL) && (!DBGetContactSettingByte(NULL, szModule, SETTING_NOENCODINGCHECK, 0))) {
if (bForce) {
MessageBoxA(NULL, "You are running the ANSI version Miranda. Please use the ANSI build of this plugin.", szPluginName, MB_OK);
|