diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-16 21:10:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-16 21:10:03 +0300 |
commit | 8c316d216807ca02e86050e29752ac3940a11c7a (patch) | |
tree | 53ba6284ac017a842e13bdb3820b740b5007b39e /plugins | |
parent | 4eb749780954e748b365818b9678ad8894e373db (diff) |
Dropbox: fix for the toolbar button creation
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Dropbox/src/dropbox.h | 1 | ||||
-rw-r--r-- | plugins/Dropbox/src/dropbox_events.cpp | 24 | ||||
-rw-r--r-- | plugins/Dropbox/src/version.h | 2 |
3 files changed, 16 insertions, 11 deletions
diff --git a/plugins/Dropbox/src/dropbox.h b/plugins/Dropbox/src/dropbox.h index 577bd190fc..b6dcb340e6 100644 --- a/plugins/Dropbox/src/dropbox.h +++ b/plugins/Dropbox/src/dropbox.h @@ -41,6 +41,7 @@ private: // hooks
static int OnProtoAck(WPARAM wParam, LPARAM lParam);
+ int OnToolbarLoaded(WPARAM wParam, LPARAM lParam);
int OnModulesLoaded(WPARAM wParam, LPARAM lParam);
int OnContactDeleted(WPARAM wParam, LPARAM lParam);
int OnOptionsInitialized(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp index 6e07cd1713..0d5c915006 100644 --- a/plugins/Dropbox/src/dropbox_events.cpp +++ b/plugins/Dropbox/src/dropbox_events.cpp @@ -1,10 +1,24 @@ #include "stdafx.h"
+int CDropbox::OnToolbarLoaded(WPARAM, LPARAM)
+{
+ BBButton bbd = {};
+ bbd.pszModuleName = MODULE;
+ bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON;
+ bbd.pwszTooltip = TranslateT("Upload files to Dropbox");
+ bbd.hIcon = GetIconHandleByName("upload");
+ bbd.dwButtonID = BBB_ID_FILE_SEND;
+ bbd.dwDefPos = 100 + bbd.dwButtonID;
+ Srmm_AddButton(&bbd);
+ return 0;
+}
+
int CDropbox::OnModulesLoaded(WPARAM, LPARAM)
{
HookEventObj(ME_DB_CONTACT_DELETED, GlobalEvent<&CDropbox::OnContactDeleted>, this);
HookEventObj(ME_OPT_INITIALISE, GlobalEvent<&CDropbox::OnOptionsInitialized>, this);
HookEventObj(ME_CLIST_PREBUILDCONTACTMENU, GlobalEvent<&CDropbox::OnPrebuildContactMenu>, this);
+ HookEventObj(ME_MSG_TOOLBARLOADED, GlobalEvent<&CDropbox::OnToolbarLoaded>, this);
HookEventObj(ME_MSG_WINDOWEVENT, GlobalEvent<&CDropbox::OnSrmmWindowOpened>, this);
HookEventObj(ME_FILEDLG_CANCELED, GlobalEvent<&CDropbox::OnFileDialogCancelled>, this);
@@ -13,7 +27,6 @@ int CDropbox::OnModulesLoaded(WPARAM, LPARAM) nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = MODULE;
nlu.ptszDescriptiveName = L"Dropbox";
-
hNetlibConnection = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nlu);
GetDefaultContact();
@@ -21,15 +34,6 @@ int CDropbox::OnModulesLoaded(WPARAM, LPARAM) WORD status = ProtoGetStatus(0, 0);
ProtoBroadcastAck(MODULE, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)ID_STATUS_OFFLINE, status);
- BBButton bbd = {};
- bbd.pszModuleName = MODULE;
- bbd.bbbFlags = BBBF_ISIMBUTTON | BBBF_ISCHATBUTTON | BBBF_ISRSIDEBUTTON;
- bbd.pwszTooltip = TranslateT("Upload files to Dropbox");
- bbd.hIcon = GetIconHandleByName("upload");
- bbd.dwButtonID = BBB_ID_FILE_SEND;
- bbd.dwDefPos = 100 + bbd.dwButtonID;
- Srmm_AddButton(&bbd);
-
HookEventObj(ME_MSG_BUTTONPRESSED, GlobalEvent<&CDropbox::OnTabSrmmButtonPressed>, this);
return 0;
}
diff --git a/plugins/Dropbox/src/version.h b/plugins/Dropbox/src/version.h index 929b1c61ae..836810112c 100644 --- a/plugins/Dropbox/src/version.h +++ b/plugins/Dropbox/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 12
#define __RELEASE_NUM 2
-#define __BUILD_NUM 2
+#define __BUILD_NUM 3
#include <stdver.h>
|