diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-27 13:51:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-27 13:51:27 +0000 |
commit | 65c6790a7463df68854d14917de26b101d35553f (patch) | |
tree | 1eb9ae9242ae3a596da76031c51c680a3febd2fd | |
parent | 5f8a607f900a42e27bf166b86185001aadf3e9f2 (diff) |
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8294 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
31 files changed, 68 insertions, 64 deletions
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 4a941f26c2..6e0c31486f 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -880,7 +880,7 @@ static INT_PTR CALLBACK DlgProcTrayOpts(HWND hwndDlg, UINT msg, WPARAM wParam, L db_set_b(NULL, "CLUI", "XStatusTray", xOptions);
int cursel = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
- PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cursel, 0);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cursel, 0);
if (!pa)
db_unset(NULL, "CList", "PrimaryStatus");
else
diff --git a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp index 975664458d..53c7e66741 100644 --- a/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp +++ b/plugins/Clist_mw/src/CLUIFrames/statusbar.cpp @@ -87,7 +87,7 @@ void DrawDataForStatusBar(LPDRAWITEMSTRUCT dis) else x += 2;
if (showOpts & 2) {
- PROTOACCOUNT* pa = ProtoGetAccount(szProto);
+ PROTOACCOUNT *pa = ProtoGetAccount(szProto);
TCHAR szName[64];
mir_sntprintf(szName, SIZEOF(szName), _T("%s%s"), pa->tszAccountName, showOpts&4 ? _T(" ") : _T(""));
GetTextExtentPoint32(dis->hDC, szName, (int)_tcslen(szName), &textSize);
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index 5166bf63af..256536acc6 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -218,7 +218,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP db_set_b(NULL,"CList","NoIconBlink", (BYTE)IsDlgButtonChecked(hwndDlg,IDC_ICONBLINK));
{
int cursel = SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETCURSEL,0,0);
- PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETITEMDATA,cursel,0);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg,IDC_PRIMARYSTATUS,CB_GETITEMDATA,cursel,0);
if ( pa == NULL )
db_unset(NULL, "CList","PrimaryStatus");
else
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index b6758f0fee..bf6ce21a9b 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -188,7 +188,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP cfg::writeByte("CList", "NoTrayTips", (BYTE)cfg::dat.bNoTrayTips);
{
int cursel = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
- PROTOACCOUNT* pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cursel, 0);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cursel, 0);
if ( !pa )
db_unset(NULL, "CList", "PrimaryStatus");
else
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index df05b2397d..25620c7c93 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1723,7 +1723,7 @@ buttons_done: if (showOpts & 2) {
TCHAR szName[64];
- PROTOACCOUNT* pa = ProtoGetAccount( szProto );
+ PROTOACCOUNT *pa = ProtoGetAccount( szProto );
if ( pa ) {
lstrcpyn( szName, pa->tszAccountName, SIZEOF(szName));
szName[ SIZEOF(szName)-1 ] = 0;
diff --git a/plugins/Clist_nicer/src/cluiservices.cpp b/plugins/Clist_nicer/src/cluiservices.cpp index 2dea0bfa67..e9140ed75b 100644 --- a/plugins/Clist_nicer/src/cluiservices.cpp +++ b/plugins/Clist_nicer/src/cluiservices.cpp @@ -122,7 +122,7 @@ void CluiProtocolStatusChanged( int parStatus, const char* szProto ) int x;
HFONT hofont;
TCHAR szName[32];
- PROTOACCOUNT* pa;
+ PROTOACCOUNT *pa;
hdc=GetDC(NULL);
hofont = reinterpret_cast<HFONT>(SelectObject(hdc,(HFONT)SendMessage(pcli->hwndStatus,WM_GETFONT,0,0)));
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 1fb7fb9b9a..5272152279 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -180,7 +180,7 @@ int __forceinline GetProtoIndex(char * szName) if ( !szName )
return -1;
- PROTOACCOUNT* pa = ProtoGetAccount( szName );
+ PROTOACCOUNT *pa = ProtoGetAccount( szName );
return ( pa == NULL ) ? -1 : pa->iOrder;
}
diff --git a/plugins/NewXstatusNotify/src/options.cpp b/plugins/NewXstatusNotify/src/options.cpp index be7ad11dbd..4b840f726b 100644 --- a/plugins/NewXstatusNotify/src/options.cpp +++ b/plugins/NewXstatusNotify/src/options.cpp @@ -693,7 +693,7 @@ INT_PTR CALLBACK DlgProcXPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM return FALSE;
}
-bool IsSuitableProto(PROTOACCOUNT* pa)
+bool IsSuitableProto(PROTOACCOUNT *pa)
{
if ( pa == NULL )
return false;
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.h b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.h index 4e7ed9ba50..984069e6a3 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.h +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.h @@ -55,7 +55,7 @@ struct TAAAProtoSetting : public PROTOCOLSETTINGEX, public MZeroedObject
{
- TAAAProtoSetting(PROTOACCOUNT* pa);
+ TAAAProtoSetting(PROTOACCOUNT *pa);
~TAAAProtoSetting();
int originalStatusMode;
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 13bf159ead..41dee6ec7c 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -91,7 +91,7 @@ static DWORD CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM extern int OptionsInit(WPARAM wparam,LPARAM);
extern int InitCommonStatus();
-TConnectionSettings::TConnectionSettings( PROTOACCOUNT* pa )
+TConnectionSettings::TConnectionSettings( PROTOACCOUNT *pa )
{
cbSize = sizeof(PROTOCOLSETTINGEX);
szName = pa->szModuleName;
@@ -1169,7 +1169,7 @@ static DWORD CALLBACK MessageWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int OnAccChanged(WPARAM wParam, LPARAM lParam)
{
- PROTOACCOUNT* pa = (PROTOACCOUNT*)lParam;
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam;
switch (wParam) {
case PRAC_ADDED:
connectionSettings.insert(new TConnectionSettings(pa));
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.h b/plugins/StatusPlugins/KeepStatus/keepstatus.h index 9df88b36bb..d52b7b218f 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.h +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.h @@ -105,7 +105,7 @@ struct TConnectionSettings : public PROTOCOLSETTINGEX
{
- TConnectionSettings( PROTOACCOUNT* pa );
+ TConnectionSettings( PROTOACCOUNT *pa );
~TConnectionSettings();
int lastStatusAckTime; // the time the last status ack was received
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index f43d556e3c..f00a0a49dc 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -37,7 +37,7 @@ TSSSetting::TSSSetting(PROTOACCOUNT *pa) szMsg = NULL;
}
-TSSSetting::TSSSetting(int profile, PROTOACCOUNT* pa)
+TSSSetting::TSSSetting(int profile, PROTOACCOUNT *pa)
{
cbSize = sizeof(PROTOCOLSETTINGEX);
@@ -183,7 +183,7 @@ static void SetLastStatusMessages(TSettingsList &ps) int OnAccChanged(WPARAM wParam, LPARAM lParam)
{
- PROTOACCOUNT* pa = (PROTOACCOUNT*)lParam;
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam;
switch (wParam) {
case PRAC_ADDED:
startupSettings.insert(new TSSSetting(-1, pa));
diff --git a/plugins/StopSpamPlus/src/opt_proto.cpp b/plugins/StopSpamPlus/src/opt_proto.cpp index 86ba136999..a3bedbe2ed 100644 --- a/plugins/StopSpamPlus/src/opt_proto.cpp +++ b/plugins/StopSpamPlus/src/opt_proto.cpp @@ -6,7 +6,7 @@ struct ProtocolData int show,enabled;
};
-int IsProtoIM(const PROTOACCOUNT* pa)
+int IsProtoIM(const PROTOACCOUNT *pa)
{
return (CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM);
}
diff --git a/plugins/TrafficCounter/src/statistics.cpp b/plugins/TrafficCounter/src/statistics.cpp index a55659b96e..f34f796bc8 100644 --- a/plugins/TrafficCounter/src/statistics.cpp +++ b/plugins/TrafficCounter/src/statistics.cpp @@ -330,7 +330,7 @@ void Stat_ReadFile(BYTE n) if (Size.QuadPart != 0) // Если файл со статистикой существует и имеет ненулевой размер...
{
// ...то читаем статистику из файла
- ProtoList[n].NumberOfRecords = Size.QuadPart/sizeof(HOURLYSTATS);
+ ProtoList[n].NumberOfRecords = DWORD(Size.QuadPart/sizeof(HOURLYSTATS));
ProtoList[n].AllStatistics = (HOURLYSTATS*)mir_alloc(sizeof(HOURLYSTATS)*ProtoList[n].NumberOfRecords);
ReadFile(ProtoList[n].hFile, &ProtoList[n].AllStatistics[0], sizeof(HOURLYSTATS)*ProtoList[n].NumberOfRecords, &BytesRead, NULL);
if (!BytesRead)
diff --git a/plugins/XSoundNotify/src/Common.h b/plugins/XSoundNotify/src/Common.h index c87618ceae..d635ed6079 100644 --- a/plugins/XSoundNotify/src/Common.h +++ b/plugins/XSoundNotify/src/Common.h @@ -41,7 +41,7 @@ extern HINSTANCE hInst; extern HANDLE hChangeSoundDlgList;
extern BYTE isIgnoreSound, isOwnSound;
-bool IsSuitableProto(PROTOACCOUNT* pa);
+bool IsSuitableProto(PROTOACCOUNT *pa);
INT OptInit(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index cd3bec8380..c862d9a6a8 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -9,7 +9,7 @@ There is no warranty. #include "Common.h"
-bool IsSuitableProto(PROTOACCOUNT* pa)
+bool IsSuitableProto(PROTOACCOUNT *pa)
{
if (pa == NULL)
return false;
diff --git a/src/core/miranda.h b/src/core/miranda.h index 29ef7d8509..83af987c5a 100644 --- a/src/core/miranda.h +++ b/src/core/miranda.h @@ -147,17 +147,17 @@ PROTOACCOUNT* __fastcall Proto_GetAccount(const char* accName); PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact);
PROTOCOLDESCRIPTOR* __fastcall Proto_IsProtocolLoaded(const char* szProtoName);
-bool __fastcall Proto_IsAccountEnabled(PROTOACCOUNT* pa);
-bool __fastcall Proto_IsAccountLocked(PROTOACCOUNT* pa);
+bool __fastcall Proto_IsAccountEnabled(PROTOACCOUNT *pa);
+bool __fastcall Proto_IsAccountLocked(PROTOACCOUNT *pa);
PROTO_INTERFACE* AddDefaultAccount(const char* szProtoName);
int FreeDefaultAccount(PROTO_INTERFACE* ppi);
-BOOL ActivateAccount(PROTOACCOUNT* pa);
+BOOL ActivateAccount(PROTOACCOUNT *pa);
void EraseAccount(const char *pszProtoName);
-void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase);
-void UnloadAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase);
-void OpenAccountOptions(PROTOACCOUNT* pa);
+void DeactivateAccount(PROTOACCOUNT *pa, bool bIsDynamic, bool bErase);
+void UnloadAccount(PROTOACCOUNT *pa, bool bIsDynamic, bool bErase);
+void OpenAccountOptions(PROTOACCOUNT *pa);
void LoadDbAccounts(void);
void WriteDbAccounts(void);
diff --git a/src/core/modules.cpp b/src/core/modules.cpp index b38bf3bad6..3111bc9e7d 100644 --- a/src/core/modules.cpp +++ b/src/core/modules.cpp @@ -150,7 +150,9 @@ int LoadDefaultModules(void) if (LoadContactsModule()) return 1;
if (LoadContactListModule()) return 1; // prepare contact list interface
if (LoadAddContactModule()) return 1;
- // if (LoadMetacontacts()) return 1;
+ #ifdef _DEBUG
+ if (LoadMetacontacts()) return 1;
+ #endif
if (LoadNewPluginsModule()) return 1; // will call Load(void) on everything, clist will load first
Langpack_SortDuplicates();
@@ -169,7 +171,9 @@ void UnloadDefaultModules(void) {
UnloadChatModule();
UnloadAccountsModule();
- // UnloadMetacontacts();
+ #ifdef _DEBUG
+ UnloadMetacontacts();
+ #endif
UnloadNewPlugins();
UnloadProtocolsModule();
UnloadSkinSounds();
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index 65a3b8cb61..4bff8fb660 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/src/clistopts.cpp @@ -213,7 +213,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP db_set_b(NULL, "CList", "NoIconBlink", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ICONBLINK));
{
int cur = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETCURSEL, 0, 0);
- PROTOACCOUNT* pa = ( PROTOACCOUNT* )SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cur, 0 );
+ PROTOACCOUNT *pa = ( PROTOACCOUNT* )SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_GETITEMDATA, cur, 0 );
if ( pa == NULL )
db_unset(NULL, "CList", "PrimaryStatus");
else
diff --git a/src/core/stduseronline/useronline.cpp b/src/core/stduseronline/useronline.cpp index 2f896fe3af..6c81c97084 100644 --- a/src/core/stduseronline/useronline.cpp +++ b/src/core/stduseronline/useronline.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int uniqueEventId = 0;
-static bool Proto_IsAccountEnabled(PROTOACCOUNT* pa)
+static bool Proto_IsAccountEnabled(PROTOACCOUNT *pa)
{
return pa && ((pa->bIsEnabled && !pa->bDynDisabled) || pa->bOldProto);
}
@@ -105,7 +105,7 @@ static int UserOnlineModulesLoaded(WPARAM, LPARAM) static int UserOnlineAccountsChanged(WPARAM eventCode, LPARAM lParam)
{
- PROTOACCOUNT* pa = (PROTOACCOUNT*)lParam;
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam;
switch(eventCode) {
case PRAC_ADDED:
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 6f96ae6d2e..ac0c408287 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -606,7 +606,7 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM) cli.currentDesiredStatusMode = smep->status;
for (int j=0; j < accounts.getCount(); j++) {
- PROTOACCOUNT* pa = accounts[j];
+ PROTOACCOUNT *pa = accounts[j];
if (!Proto_IsAccountEnabled(pa))
continue;
if (MenusProtoCount > 1 && Proto_IsAccountLocked(pa))
@@ -866,7 +866,7 @@ void RebuildMenuOrder(void) if (i == -1)
continue;
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
int pos = 0;
if (!bHideStatusMenu && !cli.pfnGetProtocolVisibility(pa->szModuleName))
continue;
@@ -975,7 +975,7 @@ void RebuildMenuOrder(void) //add to root menu
for (j = 0; j < SIZEOF(statusModeList); j++) {
for (i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
if (!bHideStatusMenu && !cli.pfnGetProtocolVisibility(pa->szModuleName))
continue;
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index cd5059ceca..72a9c21847 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -188,7 +188,7 @@ static INT_PTR GetContactIcon(WPARAM wParam, LPARAM) return cli.pfnGetContactIcon(wParam);
}
-static void AddProtoIconIndex(PROTOACCOUNT* pa)
+static void AddProtoIconIndex(PROTOACCOUNT *pa)
{
ProtoIconIndex *pii = new ProtoIconIndex;
pii->szProto = pa->szModuleName;
@@ -200,7 +200,7 @@ static void AddProtoIconIndex(PROTOACCOUNT* pa) protoIconIndex.insert(pii);
}
-static void RemoveProtoIconIndex(PROTOACCOUNT* pa)
+static void RemoveProtoIconIndex(PROTOACCOUNT *pa)
{
for (int i=0; i < protoIconIndex.getCount(); i++)
if (strcmp(protoIconIndex[i].szProto, pa->szModuleName) == 0) {
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index 17b017244f..052a1c9637 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -266,7 +266,7 @@ int fnTrayIconInit(HWND hwnd) for (int i=0; i < accounts.getCount(); i++) {
int j = cli.pfnGetAccountIndexByPos(i);
if (j >= 0) {
- PROTOACCOUNT* pa = accounts[j];
+ PROTOACCOUNT *pa = accounts[j];
if (cli.pfnGetProtocolVisibility(pa->szModuleName))
cli.pfnTrayIconAdd(hwnd, pa->szModuleName, NULL, CallProtoServiceInt(NULL,pa->szModuleName, PS_GETSTATUS, 0, 0));
}
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index 3c332f7042..7522afabf3 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -1002,7 +1002,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM else
x += 2;
if (showOpts & 2) {
- PROTOACCOUNT* pa;
+ PROTOACCOUNT *pa;
TCHAR tszName[64];
if ((pa = Proto_GetAccount(szProto)) != NULL)
mir_sntprintf(tszName, SIZEOF(tszName), _T("%s "), pa->tszAccountName);
diff --git a/src/modules/clist/cluiservices.cpp b/src/modules/clist/cluiservices.cpp index e3702d61cc..02f1a0485c 100644 --- a/src/modules/clist/cluiservices.cpp +++ b/src/modules/clist/cluiservices.cpp @@ -176,7 +176,7 @@ void fnCluiProtocolStatusChanged(int, const char*) x += g_IconWidth;
if (showOpts & 2) {
TCHAR tszName[64];
- PROTOACCOUNT* pa = Proto_GetAccount(cli.menuProtos[i].szProto);
+ PROTOACCOUNT *pa = Proto_GetAccount(cli.menuProtos[i].szProto);
if (pa)
mir_sntprintf(tszName, SIZEOF(tszName), _T("%s "), pa->tszAccountName);
else
diff --git a/src/modules/clist/protocolorder.cpp b/src/modules/clist/protocolorder.cpp index 747f81ddf4..a6d45fdc94 100644 --- a/src/modules/clist/protocolorder.cpp +++ b/src/modules/clist/protocolorder.cpp @@ -196,7 +196,7 @@ INT_PTR CALLBACK ProtocolOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (tvi.lParam != 0) {
ProtocolData* ppd = (ProtocolData*)tvi.lParam;
- PROTOACCOUNT* pa = Proto_GetAccount(ppd->RealName);
+ PROTOACCOUNT *pa = Proto_GetAccount(ppd->RealName);
if (pa != NULL) {
while (idx < accounts.getCount() && !ProtoToInclude(accounts[idx])) idx++;
pa->iOrder = idx++;
diff --git a/src/modules/findadd/findadd.cpp b/src/modules/findadd/findadd.cpp index bf91362ce0..4109c5f1f2 100644 --- a/src/modules/findadd/findadd.cpp +++ b/src/modules/findadd/findadd.cpp @@ -392,7 +392,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
for (i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
if (!Proto_IsAccountEnabled(pa))
continue;
@@ -1005,7 +1005,7 @@ static INT_PTR FindAddCommand(WPARAM, LPARAM) // protocols loaded but that would delay the creation until MODULE_LOADED and
// that is not good either...
for (int i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
if (!Proto_IsAccountEnabled(pa))
continue;
@@ -1049,7 +1049,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM) // Make sure we have some networks to search on.
for (int i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
int protoCaps = CallProtoServiceInt(NULL, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
if (protoCaps & (PF1_BASICSEARCH | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME | PF1_EXTSEARCHUI))
netProtoCount++;
diff --git a/src/modules/findadd/searchresults.cpp b/src/modules/findadd/searchresults.cpp index 6f2b78ce8d..19f8eae9cb 100644 --- a/src/modules/findadd/searchresults.cpp +++ b/src/modules/findadd/searchresults.cpp @@ -213,7 +213,7 @@ int BeginSearch(HWND, struct FindAddDlgData *dat, const char *szProto, const cha dat->searchCount = 0;
dat->search = (struct ProtoSearchInfo*)mir_calloc(sizeof(struct ProtoSearchInfo) * accounts.getCount());
for (int i=0; i < accounts.getCount();i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
if (!Proto_IsAccountEnabled(pa)) continue;
DWORD caps = (DWORD)CallProtoServiceInt(NULL,pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0);
if (!(caps&requiredCapability)) continue;
@@ -239,7 +239,7 @@ int BeginSearch(HWND, struct FindAddDlgData *dat, const char *szProto, const cha dat->search[0].szProto = szProto;
if (dat->search[0].hProcess == NULL) {
//infuriatingly vague error message. fixme.
- PROTOACCOUNT* pa = Proto_GetAccount(szProto);
+ PROTOACCOUNT *pa = Proto_GetAccount(szProto);
forkthread(BeginSearchFailed, 0, mir_tstrdup(pa->tszAccountName));
mir_free(dat->search);
dat->search = NULL;
@@ -260,7 +260,7 @@ void SetStatusBarSearchInfo(HWND hwndStatus, struct FindAddDlgData *dat) lstrcpy(str, TranslateT("Searching"));
for (i=0; i < dat->searchCount; i++) {
- PROTOACCOUNT* pa = Proto_GetAccount(dat->search[i].szProto);
+ PROTOACCOUNT *pa = Proto_GetAccount(dat->search[i].szProto);
if (!pa)
continue;
@@ -308,7 +308,7 @@ void SetStatusBarResultInfo(HWND hwndDlg) }
if (total != 0) {
TCHAR substr[64];
- PROTOACCOUNT* pa = Proto_GetAccount(subtotal[0].szProto);
+ PROTOACCOUNT *pa = Proto_GetAccount(subtotal[0].szProto);
if (pa == NULL)
return;
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index 9b4980b651..33c5a83ba2 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -47,7 +47,7 @@ static int EnumDbModules(const char *szModuleName, DWORD ofsModuleName, LPARAM l DBVARIANT dbv;
if (!db_get_s(NULL, szModuleName, "AM_BaseProto", &dbv)) {
if (!Proto_GetAccount(szModuleName)) {
- PROTOACCOUNT* pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
pa->cbSize = sizeof(*pa);
pa->szModuleName = mir_strdup(szModuleName);
pa->szProtoName = mir_strdup(dbv.pszVal);
@@ -74,7 +74,7 @@ void LoadDbAccounts(void) if (db_get_s(NULL, "Protocols", buf, &dbv))
continue;
- PROTOACCOUNT* pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
if (pa == NULL) {
db_free(&dbv);
continue;
@@ -172,7 +172,7 @@ void WriteDbAccounts() // write new data
for (i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
char buf[ 20 ];
_itoa(i, buf, 10);
@@ -210,7 +210,7 @@ static int OnContactDeleted(WPARAM hContact, LPARAM lParam) static int OnDbSettingsChanged(WPARAM hContact, LPARAM lParam)
{
if (hContact) {
- PROTOACCOUNT* pa = Proto_GetAccount(hContact);
+ PROTOACCOUNT *pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
pa->ppro->OnEvent(EV_PROTO_DBSETTINGSCHANGED, hContact, lParam);
}
@@ -222,7 +222,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM) int count = 0;
for (int i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
if (!pa->ppro || !Proto_IsAccountEnabled(pa))
continue;
@@ -244,7 +244,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM) static int UninitializeStaticAccounts(WPARAM, LPARAM)
{
for (int i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
if (!pa->ppro || !Proto_IsAccountEnabled(pa))
continue;
@@ -261,7 +261,7 @@ int LoadAccountsModule(void) bModuleInitialized = TRUE;
for (i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
pa->bDynDisabled = !Proto_IsProtocolLoaded(pa->szProtoName);
if (pa->ppro)
continue;
@@ -420,7 +420,7 @@ static HANDLE CreateProtoServiceEx(const char* szModule, const char* szService, return CreateServiceFunctionObj(tmp, pFunc, param);
}
-BOOL ActivateAccount(PROTOACCOUNT* pa)
+BOOL ActivateAccount(PROTOACCOUNT *pa)
{
PROTO_INTERFACE* ppi;
PROTOCOLDESCRIPTOR* ppd = Proto_IsProtocolLoaded(pa->szProtoName);
@@ -510,7 +510,7 @@ static int DeactivationThread(DeactivationThreadParam* param) return 0;
}
-void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase)
+void DeactivateAccount(PROTOACCOUNT *pa, bool bIsDynamic, bool bErase)
{
if (pa->ppro == NULL) {
if (bErase)
@@ -557,7 +557,7 @@ void EraseAccount(const char* pszModuleName) /////////////////////////////////////////////////////////////////////////////////////////
-void UnloadAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase)
+void UnloadAccount(PROTOACCOUNT *pa, bool bIsDynamic, bool bErase)
{
DeactivateAccount(pa, bIsDynamic, bErase);
@@ -577,7 +577,7 @@ void UnloadAccountsModule() if (!bModuleInitialized) return;
for (int i = accounts.getCount()-1; i >= 0; i--) {
- PROTOACCOUNT* pa = accounts[ i ];
+ PROTOACCOUNT *pa = accounts[ i ];
UnloadAccount(pa, false, false);
accounts.remove(i);
}
@@ -588,7 +588,7 @@ void UnloadAccountsModule() void BuildProtoMenus()
{
for (int i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[ i ];
+ PROTOACCOUNT *pa = accounts[ i ];
if (cli.pfnGetProtocolVisibility(pa->szModuleName) == 0)
continue;
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index 61fdd46177..0b7b18ace9 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -66,7 +66,7 @@ int UnloadPlugin(TCHAR* buf, int bufLen); typedef struct
{
int action;
- PROTOACCOUNT* pa;
+ PROTOACCOUNT *pa;
}
AccFormDlgParam;
@@ -118,7 +118,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam case IDOK:
{
AccFormDlgParam* param = (AccFormDlgParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- PROTOACCOUNT* pa = param->pa;
+ PROTOACCOUNT *pa = param->pa;
if (param->action == PRAC_ADDED) {
char buf[200];
@@ -709,7 +709,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM }
if (iItem != LB_ERR) {
- PROTOACCOUNT* pa = (PROTOACCOUNT*)ListBox_GetItemData(hwndList, iItem);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)ListBox_GetItemData(hwndList, iItem);
HMENU hMenu = CreatePopupMenu();
if (!pa->bOldProto && !pa->bDynDisabled)
AppendMenu(hMenu, MF_STRING, 1, TranslateT("Rename"));
@@ -851,7 +851,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM HWND hList = GetDlgItem(hwndDlg, IDC_ACCLIST);
int idx = ListBox_GetCurSel(hList);
if (idx != -1) {
- PROTOACCOUNT* pa = (PROTOACCOUNT*)ListBox_GetItemData(hList, idx);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)ListBox_GetItemData(hList, idx);
TCHAR buf[ 200 ];
mir_sntprintf(buf, SIZEOF(buf), TranslateT("Account %s is being deleted"), pa->tszAccountName);
if (pa->bOldProto) {
@@ -890,7 +890,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM HWND hList = GetDlgItem(hwndDlg, IDC_ACCLIST);
int idx = ListBox_GetCurSel(hList);
if (idx != -1) {
- PROTOACCOUNT* pa = (PROTOACCOUNT*)ListBox_GetItemData(hList, idx);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)ListBox_GetItemData(hList, idx);
if (pa->bOldProto) {
OPENOPTIONSDIALOG ood;
ood.cbSize = sizeof(ood);
@@ -1056,7 +1056,7 @@ int OptProtosLoaded(WPARAM, LPARAM) static int OnAccListChanged(WPARAM eventCode, LPARAM lParam)
{
- PROTOACCOUNT* pa = (PROTOACCOUNT*)lParam;
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam;
switch(eventCode) {
case PRAC_CHANGED:
diff --git a/src/modules/skin/skinicons.cpp b/src/modules/skin/skinicons.cpp index 2e6e071f02..0cc55cc0bb 100644 --- a/src/modules/skin/skinicons.cpp +++ b/src/modules/skin/skinicons.cpp @@ -264,7 +264,7 @@ HICON LoadSkinProtoIcon(const char *szProto, int status, bool big) mir_snprintf(iconName, SIZEOF(iconName), "%s%s%d", statusIconsFmt, szProto, statusIndx);
HICON hIcon = IcoLib_GetIcon(iconName, big);
if (hIcon == NULL && (caps2 == 0 || (caps2 & statusIcons[statusIndx].pf2))) {
- PROTOACCOUNT* pa = Proto_GetAccount(szProto);
+ PROTOACCOUNT *pa = Proto_GetAccount(szProto);
if (pa) {
TCHAR szPath[MAX_PATH], szFullPath[MAX_PATH], *str;
GetModuleFileName(hInst, szPath, MAX_PATH);
|