summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-11-28 18:45:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-11-28 18:45:54 +0000
commita70382b0e8bed265a1d314d9f6aae8f2dd48d20b (patch)
tree9a99a073c0d7b9483dab51a0eebf04a9119f61ed /plugins/StatusPlugins
parent68fb5b69ea8403a3f9dcb70b3133eb10e1711000 (diff)
ex-protos moved to the Plugins folder
git-svn-id: http://svn.miranda-ng.org/main/trunk@2545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins')
-rw-r--r--plugins/StatusPlugins/StartupStatus/options.cpp14
-rw-r--r--plugins/StatusPlugins/commonstatus.cpp29
-rw-r--r--plugins/StatusPlugins/commonstatus.h2
3 files changed, 18 insertions, 27 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/options.cpp b/plugins/StatusPlugins/StartupStatus/options.cpp
index d6b30052f7..c6cecb3d17 100644
--- a/plugins/StatusPlugins/StartupStatus/options.cpp
+++ b/plugins/StatusPlugins/StartupStatus/options.cpp
@@ -39,16 +39,16 @@ static int ClearDatabase(char* filter);
static TSettingsList* GetCurrentProtoSettings()
{
int count;
- PROTOACCOUNT** protos;
- ProtoEnumAccounts( &count, &protos );
+ PROTOACCOUNT **protos;
+ ProtoEnumAccounts(&count, &protos);
- TSettingsList* result = new TSettingsList( count, CompareSettings );
- if ( result == NULL )
+ TSettingsList *result = new TSettingsList(count, CompareSettings);
+ if (result == NULL)
return NULL;
- for ( int i=0; i < count; i++ )
- if ( IsSuitableProto( protos[i] ))
- result->insert( new TSSSetting( protos[i] ));
+ for (int i=0; i < count; i++)
+ if ( IsSuitableProto(protos[i]))
+ result->insert( new TSSSetting(protos[i]));
return result;
}
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp
index d02986a275..9ca9e15e35 100644
--- a/plugins/StatusPlugins/commonstatus.cpp
+++ b/plugins/StatusPlugins/commonstatus.cpp
@@ -164,11 +164,11 @@ static int equalsGlobalStatus(PROTOCOLSETTINGEX **ps) {
return 0;
int count;
- PROTOACCOUNT** protos;
- ProtoEnumAccounts( &count, &protos );
+ PROTOACCOUNT **protos;
+ ProtoEnumAccounts(&count, &protos);
- for ( i=0; i < count; i++ ) {
- if ( !IsSuitableProto( protos[i] ))
+ for (i=0; i < count; i++) {
+ if ( !IsSuitableProto(protos[i]))
continue;
pstatus = 0;
@@ -317,18 +317,9 @@ static INT_PTR GetProtocolCountService(WPARAM wParam, LPARAM lParam)
return GetProtoCount();
}
-bool IsSuitableProto( PROTOACCOUNT* pa )
+bool IsSuitableProto(PROTOACCOUNT *pa)
{
- if ( pa == NULL )
- return false;
-
- if ( pa->bDynDisabled || !pa->bIsEnabled )
- return false;
-
- if ( CallProtoService( pa->szProtoName, PS_GETCAPS, PFLAGNUM_2, 0 ) == 0 )
- return false;
-
- return true;
+ return (pa == NULL) ? false : (pcli->pfnGetProtocolVisibility(pa->szModuleName) != 0);
}
int GetProtoCount()
@@ -336,12 +327,12 @@ int GetProtoCount()
int pCount = 0;
int count;
- PROTOACCOUNT** protos;
+ PROTOACCOUNT **protos;
ProtoEnumAccounts( &count, &protos );
- for ( int i=0; i < count; i++ )
- if ( IsSuitableProto( protos[i] ))
- pCount ++;
+ for (int i=0; i < count; i++)
+ if ( IsSuitableProto(protos[i]))
+ pCount++;
return pCount;
}
diff --git a/plugins/StatusPlugins/commonstatus.h b/plugins/StatusPlugins/commonstatus.h
index 8eccbc3a8f..64619f11bd 100644
--- a/plugins/StatusPlugins/commonstatus.h
+++ b/plugins/StatusPlugins/commonstatus.h
@@ -75,7 +75,7 @@ static int statusModePf2List[]={PF2_OFFLINE,PF2_ONLINE,PF2_SHORTAWAY,PF2_LONGAWA
TCHAR *GetDefaultStatusMessage(PROTOCOLSETTINGEX *ps, int status);
int GetActualStatus(PROTOCOLSETTINGEX *protoSetting);
int InitCommonStatus();
-bool IsSuitableProto( PROTOACCOUNT* pa );
+bool IsSuitableProto(PROTOACCOUNT *pa);
/* SimpleAway */