diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-22 21:33:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-22 21:33:42 +0000 |
commit | e1c1c7c4b0703bea2acfe2921e9351aa099a3c64 (patch) | |
tree | 033907d2135c06d74d99a0e3d523c07452c7866e /plugins/StatusPlugins/StartupStatus/startupstatus.cpp | |
parent | ea9e4b0622f1c2ec9a3cc0b2b8bc5828108dd620 (diff) |
NAS support returned back to status plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@8226 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/StartupStatus/startupstatus.cpp')
-rw-r--r-- | plugins/StatusPlugins/StartupStatus/startupstatus.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index 1483286278..2d4ca5b7fe 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -228,7 +228,7 @@ static int StatusChange(WPARAM wParam, LPARAM lParam) if ( !db_get_b(NULL, MODULENAME, SETTING_OVERRIDE, 1) || startupSettings.getCount() == 0 )
return 0;
- char* szProto = (char *)lParam;
+ char *szProto = (char *)lParam;
if (szProto == NULL) { // global status change
for ( int i=0; i < startupSettings.getCount(); i++ ) {
startupSettings[i].szName = "";
@@ -307,9 +307,23 @@ static int OnOkToExit(WPARAM, LPARAM) if ( !(CallProtoService(pa->szModuleName, PS_GETCAPS, (WPARAM)PFLAGNUM_3, 0)&Proto_Status2Flag(status)))
continue;
- } }
- if ( (db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1)) || (db_get_b(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0))) {
+ // NewAwaySys
+ if (ServiceExists(MS_NAS_GETSTATE)) {
+ NAS_PROTOINFO npi = { sizeof(npi) };
+ npi.szProto = protos[i]->szModuleName;
+ CallService(MS_NAS_GETSTATE, (WPARAM)&npi, 1);
+ if (npi.szMsg == NULL) {
+ npi.status = 0;
+ npi.szProto = NULL;
+ CallService(MS_NAS_GETSTATE, (WPARAM)&npi, 1);
+ }
+ if (npi.szMsg != NULL) {
+ db_set_ts(NULL, MODULENAME, lastMsg, npi.tszMsg);
+ mir_free(npi.tszMsg);
+ } } } }
+
+ if (db_get_b(NULL, MODULENAME, SETTING_SETPROFILE, 1) || db_get_b(NULL, MODULENAME, SETTING_OFFLINECLOSE, 0)) {
if (ServiceExists(MS_CLIST_SETSTATUSMODE))
CallService(MS_CLIST_SETSTATUSMODE, (WPARAM)ID_STATUS_OFFLINE, 0);
else
|