From ce7ed8b5d95e707528bc44b2b0276559e4d21910 Mon Sep 17 00:00:00 2001 From: sje Date: Tue, 22 May 2007 14:21:10 +0000 Subject: made backward compatible added mingw project file fixed unused var warning git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@181 4f64403b-2f21-0410-a795-97e2b3489a10 --- shhhonidle/common.h | 23 +++++------ shhhonidle/shhhonidle.c | 14 +++++-- shhhonidle/shhhonidle.mdsp | 96 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+), 15 deletions(-) create mode 100644 shhhonidle/shhhonidle.mdsp diff --git a/shhhonidle/common.h b/shhhonidle/common.h index 47e55bf..f96c5d4 100644 --- a/shhhonidle/common.h +++ b/shhhonidle/common.h @@ -4,26 +4,27 @@ #define MIRANDA_VER 0x0600 #include +#include #include #include "resource.h" - #include -#include "../include/m_system.h" -#include "../include/m_langpack.h" -#include "../include/m_options.h" -#include "../include/m_idle.h" -#include "../include/m_skin.h" -#include "../include/m_database.h" -#include "../include/m_clist.h" +#include +#include +#include +#include +#include +#include +#include + +#include -#include "../include/m_popup.h" +#include -#include "../alarms/m_alarms.h" extern HINSTANCE hInst; extern PLUGINLINK *pluginLink; #ifndef MIID_SHHHONIDLE #define MIID_SHHHONIDLE {0x778fc97f, 0x1d26, 0x427e, { 0x8a, 0x7, 0x10, 0x1a, 0xfb, 0x79, 0x6b, 0x46}} -#endif \ No newline at end of file +#endif diff --git a/shhhonidle/shhhonidle.c b/shhhonidle/shhhonidle.c index 90f6235..2398fd3 100644 --- a/shhhonidle/shhhonidle.c +++ b/shhhonidle/shhhonidle.c @@ -13,11 +13,11 @@ PLUGINLINK *pluginLink; PLUGININFOEX pluginInfo={ sizeof(PLUGININFOEX), "Shhh on Idle", - PLUGIN_MAKE_VERSION(0,0,2,0), + PLUGIN_MAKE_VERSION(0,1,0,0), "Disable sounds (and optionally PopUps) when Miranda goes idle", "Scott Ellis", "mail@scottellis.com.au", - "© 2005 Scott Ellis", + "© 2005-2007 Scott Ellis", "http://www.scottellis.com.au/", 0, //not transient 0, //doesn't replace anything built-in @@ -30,6 +30,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) return TRUE; } +__declspec(dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion) +{ + pluginInfo.cbSize = sizeof(PLUGININFO); + return (PLUGININFO*)&pluginInfo; +} + __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfo; @@ -56,7 +62,7 @@ WORD saved_status; #define ALARM_ON_TIME (1000 * 60 * 10) // alow sound for 10 mins when an alarm with sound notification is triggered void EnableSounds(BOOL enable) { - BOOL enabled = (BOOL)DBGetContactSettingByte(0, "Skin", "UseSound", 1); + //BOOL enabled = (BOOL)DBGetContactSettingByte(0, "Skin", "UseSound", 1); DBWriteContactSettingByte(0, "Skin", "UseSound", enable ? 1 : 0); } @@ -136,4 +142,4 @@ int __declspec(dllexport) Unload(void) { UnhookEvent(hook_idle); return 0; -} \ No newline at end of file +} diff --git a/shhhonidle/shhhonidle.mdsp b/shhhonidle/shhhonidle.mdsp new file mode 100644 index 0000000..7ff6898 --- /dev/null +++ b/shhhonidle/shhhonidle.mdsp @@ -0,0 +1,96 @@ +[Project] +name=shhhonidle +type=2 +defaultConfig=0 + + +[Debug] +// compiler +workingDirectory= +arguments= +intermediateFilesDirectory=Debug +outputFilesDirectory=Debug +compilerPreprocessor= +extraCompilerOptions= +compilerIncludeDirectory=..\..\include +noWarning=0 +defaultWarning=0 +allWarning=1 +extraWarning=0 +isoWarning=0 +warningsAsErrors=0 +debugType=1 +debugLevel=2 +exceptionEnabled=1 +runtimeTypeEnabled=1 +optimizeLevel=0 + +// linker +libraryPath= +outputFilename=Debug\shhhonidle.dll +libraries= +extraLinkerOptions= +ignoreStartupFile=0 +ignoreDefaultLibs=0 +stripExecutableFile=0 + +// archive +extraArchiveOptions= + +//resource +resourcePreprocessor= +resourceIncludeDirectory= +extraResourceOptions= + +[Release] +// compiler +workingDirectory= +arguments= +intermediateFilesDirectory=Release +outputFilesDirectory=Release +compilerPreprocessor= +extraCompilerOptions= +compilerIncludeDirectory=..\..\include +noWarning=0 +defaultWarning=0 +allWarning=1 +extraWarning=0 +isoWarning=0 +warningAsErrors=0 +debugType=0 +debugLevel=1 +exceptionEnabled=1 +runtimeTypeEnabled=1 +optimizeLevel=2 + +// linker +libraryPath= +outputFilename=Release\shhhonidle.dll +libraries= +extraLinkerOptions= +ignoreStartupFile=0 +ignoreDefaultLibs=0 +stripExecutableFile=1 + +// archive +extraArchiveOptions= + +//resource +resourcePreprocessor= +resourceIncludeDirectory= +extraResourceOptions= + +[Source] +1=options.c +2=shhhonidle.c +[Header] +1=common.h +2=options.h +3=resource.h +[Resource] +1=resource.rc +[Other] +[History] +common.h,129 +options.c,388 +shhhonidle.c,2450 -- cgit v1.2.3