summaryrefslogtreecommitdiff
path: root/plugins/SendScreenshotPlus/src/Main.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-14 21:05:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-14 21:05:30 +0000
commit45358c3507af7d4bb32c031eaa25708905effa91 (patch)
tree202fd149b18a39cfe6314f037421cf8d4fe2e842 /plugins/SendScreenshotPlus/src/Main.cpp
parentae5bb5cc96d0f0add1d1189c2a3293daaea83d6f (diff)
old ansi popups removed, noone used them anyway
git-svn-id: http://svn.miranda-ng.org/main/trunk@4034 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SendScreenshotPlus/src/Main.cpp')
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp42
1 files changed, 12 insertions, 30 deletions
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index 362f698362..7048794d81 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
FI_INTERFACE *FIP = 0;
HINSTANCE hInst; //!< Global reference to the application
MGLOBAL myGlobals;
-int hLangpack;
+int hLangpack;
//Information gathered by Miranda, displayed in the plugin pane of the Option Dialog
@@ -59,10 +59,6 @@ HANDLE hsvc_Send2ImageShack=0;
HANDLE hNetlibUser = 0; //!< Netlib Register User
HANDLE hFolderScreenshot=0;
-HANDLE hhook_ModulesLoad=0;
-HANDLE hhook_SystemPShutdown=0;
-
-
// Functions ////////////////////////////////////////////////////////////////////////////
/*---------------------------------------------------------------------------
@@ -102,10 +98,8 @@ extern "C" int __declspec(dllexport) Load(void)
// load icon library (use UserInfoEx icon Pack)
IcoLib_LoadModule();
- hhook_ModulesLoad = HookEvent(ME_SYSTEM_MODULESLOADED, hook_ModulesLoaded);
- //hhook_options_init = HookEvent(ME_OPT_INITIALISE, hook_options_init);
- //hhook_OkToExit = HookEvent(ME_SYSTEM_OKTOEXIT, hook_OkToExit);
- hhook_SystemPShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, hook_SystemPShutdown);
+ HookEvent(ME_SYSTEM_MODULESLOADED, hook_ModulesLoaded);
+ HookEvent(ME_SYSTEM_PRESHUTDOWN, hook_SystemPShutdown);
AddMenuItems();
RegisterServices();
@@ -115,26 +109,21 @@ extern "C" int __declspec(dllexport) Load(void)
int hook_ModulesLoaded(WPARAM, LPARAM)
{
-
myGlobals.PopUpExist = ServiceExists(MS_POPUP_ADDPOPUP);
myGlobals.PopUpActionsExist = ServiceExists(MS_POPUP_REGISTERACTIONS);
myGlobals.PluginHTTPExist = ServiceExists(MS_HTTP_ACCEPT_CONNECTIONS);
myGlobals.PluginFTPExist = ServiceExists(MS_FTPFILE_SHAREFILE);
-// myGlobals.PluginUserinfoEx = ServiceExists(MS_USERINFO_VCARD_EXPORT);
// Netlib register
- if (!NetlibInit()){
- ;
- }
+ NetlibInit();
// load my button class
- if(!ServiceExists("UserInfo/vCard/Export")) {
+ if(!ServiceExists("UserInfo/vCard/Export"))
CtrlButtonLoadModule();
- }
// Folders plugin support
hFolderScreenshot = FoldersRegisterCustomPathT(LPGEN("SendSS"), LPGEN("Screenshots"),
- _T(PROFILE_PATH)_T("\\")_T(CURRENT_PROFILE)_T("\\Screenshots"));
+ _T(PROFILE_PATH)_T("\\")_T(CURRENT_PROFILE)_T("\\Screenshots"));
return 0;
}
@@ -143,34 +132,27 @@ int hook_ModulesLoaded(WPARAM, LPARAM)
* Prepare the plugin to stop
* Called by Miranda when it will exit or when the plugin gets deselected
*/
+
extern "C" int __declspec(dllexport) Unload(void)
{
- UnhookEvent(hhook_SystemPShutdown);
-
- DestroyServiceFunction(MS_SENDSS_OPENDIALOG);
- DestroyServiceFunction(MS_SENDSS_EDITBITMAP);
- DestroyServiceFunction(MS_SENDSS_SENDDESKTOP);
- DestroyServiceFunction(MS_SENDSS_SEND2IMAGESHACK);
return 0;
}
-int hook_SystemPShutdown(WPARAM wParam, LPARAM lParam) {
- UnhookEvent(hhook_ModulesLoad);
-
+int hook_SystemPShutdown(WPARAM wParam, LPARAM lParam)
+{
// Netlib unregister
NetlibClose();
// uninitialize classes
CtrlButtonUnloadModule();
-
return 0;
}
//---------------------------------------------------------------------------
// Netlib
-HANDLE NetlibInit(void) {
- NETLIBUSER nlu = {0};
- nlu.cbSize = sizeof(nlu);
+HANDLE NetlibInit(void)
+{
+ NETLIBUSER nlu = { sizeof(nlu) };
nlu.szSettingsModule = __PLUGIN_NAME;
nlu.ptszDescriptiveName = TranslateT("SendSS HTTP connections");
nlu.flags = NUF_OUTGOING|NUF_HTTPCONNS|NUF_TCHAR; //|NUF_NOHTTPSOPTION;