summaryrefslogtreecommitdiff
path: root/plugins/StatusPlugins
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-06-25 07:09:31 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-06-25 07:09:31 +0000
commitb33e2997d6a2f98b18571e92468f4db39254a42f (patch)
tree4a9a63499886e610e7301aa6121def2debfcc50d /plugins/StatusPlugins
parentdafffe73026dbbf0f36e7d910959951517cef937 (diff)
next step of external api cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@625 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins')
-rw-r--r--plugins/StatusPlugins/StartupStatus/StartupStatus.rc4
-rw-r--r--plugins/StatusPlugins/commonstatus.cpp58
-rw-r--r--plugins/StatusPlugins/commonstatus.h1
-rw-r--r--plugins/StatusPlugins/resource.rc4
-rw-r--r--plugins/StatusPlugins/version.rc2
5 files changed, 28 insertions, 41 deletions
diff --git a/plugins/StatusPlugins/StartupStatus/StartupStatus.rc b/plugins/StatusPlugins/StartupStatus/StartupStatus.rc
index 8f41f36229..a7a2bebb2a 100644
--- a/plugins/StatusPlugins/StartupStatus/StartupStatus.rc
+++ b/plugins/StatusPlugins/StartupStatus/StartupStatus.rc
@@ -7,7 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -34,7 +34,7 @@ END
2 TEXTINCLUDE
BEGIN
- "#include ""afxres.h""\r\n"
+ "#include ""winres.h""\r\n"
"\0"
END
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp
index fb9bac079e..d1e214b307 100644
--- a/plugins/StatusPlugins/commonstatus.cpp
+++ b/plugins/StatusPlugins/commonstatus.cpp
@@ -313,43 +313,31 @@ static void SetStatusMsg(PROTOCOLSETTINGEX *ps, int newstatus)
{
TCHAR* tszMsg = GetDefaultStatusMessage( ps, newstatus );
if ( tszMsg ) {
- if ( ServiceExists( MS_VSRAMM_SETAWAYMSG )) {
- PROTOMSGINFO pmi;
-
- pmi.statusMode = ps->status;
- pmi.szProto = ps->szName;
- pmi.msg = mir_t2a( tszMsg );
- log_debugA("CommonStatus sets status message for %s using VSRAMM", ps->szName);
- CallService( MS_VSRAMM_SETAWAYMSG, 0, (LPARAM)&pmi );
- mir_free( pmi.msg );
- }
- else {
/* replace the default vars in msg (I believe this is from core) */
- for ( int j=0; tszMsg[j]; j++ ) {
- TCHAR substituteStr[128];
-
- if ( tszMsg[j] != '%' )
- continue;
-
- if ( !_tcsnicmp( tszMsg+j, _T("%time%"), 6 ))
- GetTimeFormat( LOCALE_USER_DEFAULT, TIME_NOSECONDS, 0, 0, substituteStr, SIZEOF(substituteStr));
- else if ( !_tcsnicmp( tszMsg+j, _T("%date%"), 6 ))
- GetDateFormat( LOCALE_USER_DEFAULT, DATE_SHORTDATE, 0, 0, substituteStr, SIZEOF(substituteStr));
- else
- continue;
-
- if ( lstrlen( substituteStr ) > 6 )
- tszMsg = (TCHAR*)mir_realloc(tszMsg, sizeof(TCHAR)*(lstrlen(tszMsg)+1+lstrlen(substituteStr)-6));
- MoveMemory( tszMsg + j + lstrlen(substituteStr), tszMsg+j+6, sizeof(TCHAR)*(lstrlen(tszMsg)-j-5));
- CopyMemory( tszMsg + j, substituteStr, sizeof(TCHAR)*lstrlen( substituteStr ));
- }
+ for ( int j=0; tszMsg[j]; j++ ) {
+ TCHAR substituteStr[128];
- TCHAR* szFormattedMsg = variables_parsedup(tszMsg, ps->tszAccName, NULL);
- if (szFormattedMsg != NULL) {
- mir_free( tszMsg );
- tszMsg = mir_tstrdup( szFormattedMsg );
- free( szFormattedMsg );
- }
+ if ( tszMsg[j] != '%' )
+ continue;
+
+ if ( !_tcsnicmp( tszMsg+j, _T("%time%"), 6 ))
+ GetTimeFormat( LOCALE_USER_DEFAULT, TIME_NOSECONDS, 0, 0, substituteStr, SIZEOF(substituteStr));
+ else if ( !_tcsnicmp( tszMsg+j, _T("%date%"), 6 ))
+ GetDateFormat( LOCALE_USER_DEFAULT, DATE_SHORTDATE, 0, 0, substituteStr, SIZEOF(substituteStr));
+ else
+ continue;
+
+ if ( lstrlen( substituteStr ) > 6 )
+ tszMsg = (TCHAR*)mir_realloc(tszMsg, sizeof(TCHAR)*(lstrlen(tszMsg)+1+lstrlen(substituteStr)-6));
+ MoveMemory( tszMsg + j + lstrlen(substituteStr), tszMsg+j+6, sizeof(TCHAR)*(lstrlen(tszMsg)-j-5));
+ CopyMemory( tszMsg + j, substituteStr, sizeof(TCHAR)*lstrlen( substituteStr ));
+ }
+
+ TCHAR* szFormattedMsg = variables_parsedup(tszMsg, ps->tszAccName, NULL);
+ if (szFormattedMsg != NULL) {
+ mir_free( tszMsg );
+ tszMsg = mir_tstrdup( szFormattedMsg );
+ free( szFormattedMsg );
}
}
diff --git a/plugins/StatusPlugins/commonstatus.h b/plugins/StatusPlugins/commonstatus.h
index 5c0a531d0c..e0909e94ac 100644
--- a/plugins/StatusPlugins/commonstatus.h
+++ b/plugins/StatusPlugins/commonstatus.h
@@ -44,7 +44,6 @@
#include <m_variables.h>
#include <m_netlib.h>
#include "m_statusplugins.h"
-#include <m_vsramm.h>
#include <m_utils.h>
#include <m_NewAwaySys.h>
#include <m_updater.h>
diff --git a/plugins/StatusPlugins/resource.rc b/plugins/StatusPlugins/resource.rc
index 99658d9ecb..c4fa7935d1 100644
--- a/plugins/StatusPlugins/resource.rc
+++ b/plugins/StatusPlugins/resource.rc
@@ -7,7 +7,7 @@
//
// Generated from the TEXTINCLUDE 2 resource.
//
-#include "afxres.h"
+#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
@@ -34,7 +34,7 @@ END
2 TEXTINCLUDE
BEGIN
- "#include ""afxres.h""\r\n"
+ "#include ""winres.h""\r\n"
"\0"
END
diff --git a/plugins/StatusPlugins/version.rc b/plugins/StatusPlugins/version.rc
index 8f6f25b2da..9ac8419e99 100644
--- a/plugins/StatusPlugins/version.rc
+++ b/plugins/StatusPlugins/version.rc
@@ -1,5 +1,5 @@
#include "version.h"
-#include "afxres.h"
+#include "winres.h"
#ifdef _WIN32
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL