Beispiel #1
0
int SystemModulesLoaded(WPARAM, LPARAM)
{
	//Insert "Check mail (YAMN)" item to Miranda's menu
	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = 0xb0000000;
	mi.icolibItem = g_GetIconHandle(0);
	mi.pszName = LPGEN("Check &mail (All Account)");
	mi.pszPopupName = NULL;//YAMN_DBMODULE;
	mi.pszService = MS_YAMN_FORCECHECK;
	hMenuItemMain = Menu_AddMainMenuItem(&mi);

	mi.pszName = LPGEN("Check &mail (This Account)");
	mi.pszContactOwner = YAMN_DBMODULE;
	mi.pszService = MS_YAMN_CLISTCONTEXT;
	hMenuItemCont = Menu_AddContactMenuItem(&mi);

	mi.icolibItem = g_GetIconHandle(1);
	mi.pszName = LPGEN("Launch application");
	mi.pszContactOwner = YAMN_DBMODULE;
	mi.pszService = MS_YAMN_CLISTCONTEXTAPP;
	hMenuItemContApp = Menu_AddContactMenuItem(&mi);

	CheckMenuItems();

	if (hAccountFolder = FoldersRegisterCustomPathT(LPGEN("YAMN"), LPGEN("YAMN Account Folder"), UserDirectory))
		FoldersGetCustomPathT(hAccountFolder, UserDirectory, MAX_PATH, UserDirectory);

	RegisterPOP3Plugin(0, 0);
	return 0;
}
Beispiel #2
0
void CSametimeProto::InitConferenceMenu()
{
	debugLog(_T("CSametimeProto::InitConferenceMenu()"));

	CreateProtoService(MS_SAMETIME_MENULEAVECHAT, &CSametimeProto::onMenuLeaveChat);
	CreateProtoService(MS_SAMETIME_MENUCREATECHAT, &CSametimeProto::onMenuCreateChat);

	char service[128];

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
	mi.pszContactOwner = m_szModuleName;
	
	mi.ptszName = LPGENT("Leave conference");
	mir_snprintf(service, SIZEOF(service), "%s%s", m_szModuleName, MS_SAMETIME_MENULEAVECHAT);
	mi.pszService = service;
	mi.icolibItem = GetIconHandle(IDI_ICON_LEAVE);
	hLeaveChatMenuItem = Menu_AddContactMenuItem(&mi);

	mi.ptszName = LPGENT("Start conference");
	mir_snprintf(service, SIZEOF(service), "%s%s", m_szModuleName, MS_SAMETIME_MENUCREATECHAT);
	mi.pszService = service;
	mi.icolibItem = GetIconHandle(IDI_ICON_INVITE);
	hCreateChatMenuItem = Menu_AddContactMenuItem(&mi);

	HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSametimeProto::PrebuildContactMenu);
}
Beispiel #3
0
int SystemModulesLoaded(WPARAM, LPARAM)
{
	//Insert "Check mail (YAMN)" item to Miranda's menu
	CMenuItem mi;
	
	SET_UID(mi, 0xa01ff3d9, 0x53cb, 0x4406, 0x85, 0xd9, 0xf1, 0x90, 0x3a, 0x94, 0xed, 0xf4);
	mi.position = 0xb0000000;
	mi.hIcolibItem = g_GetIconHandle(0);
	mi.name.a = LPGEN("Check &mail (All Account)");
	mi.pszService = MS_YAMN_FORCECHECK;
	hMenuItemMain = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xfe22191f, 0x40c8, 0x479f, 0x93, 0x5d, 0xa5, 0x17, 0x1f, 0x57, 0x2f, 0xcb);
	mi.name.a = LPGEN("Check &mail (This Account)");
	mi.pszService = MS_YAMN_CLISTCONTEXT;
	hMenuItemCont = Menu_AddContactMenuItem(&mi, YAMN_DBMODULE);

	SET_UID(mi, 0x147c7800, 0x12d0, 0x4209, 0xab, 0xcc, 0xfa, 0x64, 0xc6, 0xb0, 0xa6, 0xeb);
	mi.hIcolibItem = g_GetIconHandle(1);
	mi.name.a = LPGEN("Launch application");
	mi.pszService = MS_YAMN_CLISTCONTEXTAPP;
	hMenuItemContApp = Menu_AddContactMenuItem(&mi, YAMN_DBMODULE);

	CheckMenuItems();

	if (hAccountFolder = FoldersRegisterCustomPathT(LPGEN("YAMN"), LPGEN("YAMN Account Folder"), UserDirectory))
		FoldersGetCustomPathT(hAccountFolder, UserDirectory, MAX_PATH, UserDirectory);

	RegisterPOP3Plugin(0, 0);
	return 0;
}
Beispiel #4
0
void WhatsAppProto::InitContactMenus()
{
	::HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);

	CLISTMENUITEM mi = {sizeof(mi)};

	mi.position = -2000006100;
	mi.icolibItem = GetIconHandle("leaveGroup");
	mi.pszName = GetIconDescription("leaveGroup");
	mi.pszService = "WhatsAppProto/LeaveGroup";
	CreateServiceFunction(mi.pszService,GlobalService<&WhatsAppProto::OnLeaveGroup>);
	g_hContactMenuItems[CMI_LEAVE_GROUP] = Menu_AddContactMenuItem(&mi);

	mi.position = -2000006100;
	mi.icolibItem = GetIconHandle("leaveAndDeleteGroup");
	mi.pszName = GetIconDescription("leaveAndDeleteGroup");
	g_hContactMenuItems[CMI_REMOVE_GROUP] = Menu_AddContactMenuItem(&mi);

	mi.position = -2000006099;
	mi.icolibItem = GetIconHandle("changeGroupSubject");
	mi.pszName = GetIconDescription("changeGroupSubject");
	mi.pszService = "WhatsAppProto/ChangeGroupSubject";
	CreateServiceFunction(mi.pszService,GlobalService<&WhatsAppProto::OnChangeGroupSubject>);
	g_hContactMenuItems[CMI_CHANGE_GROUP_SUBJECT] = Menu_AddContactMenuItem(&mi);
}
Beispiel #5
0
void InitMenu()
{
	CMenuItem mi(g_plugin);
	mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
	mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("News Aggregator"), 500099000);
	Menu_ConfigureItem(mi.root, MCI_OPT_UID, "D9733E4F-1946-4390-8EB3-591E8687222E");

	SET_UID(mi, 0x3ec91864, 0xefa7, 0x4994, 0xb7, 0x75, 0x6c, 0x96, 0xcb, 0x29, 0x2f, 0x93);
	mi.position = 10100001;
	if (db_get_b(NULL, MODULENAME, "AutoUpdate", 1))
		mi.name.w = LPGENW("Auto Update Enabled");
	else
		mi.name.w = LPGENW("Auto Update Disabled");
	mi.hIcolibItem = GetIconHandle("main");
	mi.pszService = MS_NEWSAGGREGATOR_ENABLED;
	hService2[0] = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x8076bb4d, 0x1e44, 0x43af, 0x97, 0x1e, 0x31, 0xd8, 0xa4, 0xe9, 0xb8, 0x37);
	mi.position = 20100001;
	mi.name.w = LPGENW("Check All Feeds");
	mi.pszService = MS_NEWSAGGREGATOR_CHECKALLFEEDS;
	hService2[1] = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xb876484d, 0x28aa, 0x4e03, 0x9e, 0x98, 0xed, 0xbc, 0xd1, 0xcf, 0x31, 0x80);
	mi.position = 20100002;
	mi.hIcolibItem = GetIconHandle("addfeed");
	mi.name.w = LPGENW("Add Feed");
	mi.pszService = MS_NEWSAGGREGATOR_ADDFEED;
	hService2[2] = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x600bf2c2, 0xa974, 0x44d3, 0x98, 0xf9, 0xe6, 0x65, 0x7c, 0x1f, 0x63, 0x37);
	mi.position = 20100003;
	mi.hIcolibItem = GetIconHandle("importfeeds");
	mi.name.w = LPGENW("Import Feeds");
	mi.pszService = MS_NEWSAGGREGATOR_IMPORTFEEDS;
	hService2[3] = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xc09c8119, 0x64c2, 0x49bd, 0x81, 0xf, 0x54, 0x20, 0x69, 0xd7, 0x30, 0xcf);
	mi.position = 20100004;
	mi.hIcolibItem = GetIconHandle("exportfeeds");
	mi.name.w = LPGENW("Export Feeds");
	mi.pszService = MS_NEWSAGGREGATOR_EXPORTFEEDS;
	hService2[4] = Menu_AddMainMenuItem(&mi);

	// adding contact menu items
	SET_UID(mi, 0x92be499c, 0x928c, 0x4789, 0x8f, 0x36, 0x28, 0xa2, 0x9f, 0xb7, 0x1a, 0x97);
	mi.root = nullptr;
	mi.position = -0x7FFFFFFA;
	mi.hIcolibItem = GetIconHandle("checkfeed");
	mi.name.w = LPGENW("Check feed");
	mi.pszService = MS_NEWSAGGREGATOR_CHECKFEED;
	hService2[5] = Menu_AddContactMenuItem(&mi, MODULENAME);

	SET_UID(mi, 0x41a70fbc, 0x9241, 0x44c0, 0x90, 0x90, 0x87, 0xd2, 0xc5, 0x9f, 0xc9, 0xac);
	mi.name.w = LPGENW("Change feed");
	mi.pszService = MS_NEWSAGGREGATOR_CHANGEFEED;
	hService2[6] = Menu_AddContactMenuItem(&mi, MODULENAME);

	Menu_ModifyItem(hService2[0], nullptr, GetIconHandle(db_get_b(NULL, MODULENAME, "AutoUpdate", 1) ? "enabled" : "disabled"));
}
int LoadFavoriteContactMenu()
{
	Icon_Register(g_hInst, LPGEN("Contact list"), iconList, _countof(iconList));

	CreateServiceFunction(CLUI_FAVSETRATE, FAV_SetRate);
	CreateServiceFunction(CLUI_FAVTOGGLESHOWOFFLINE, FAV_ToggleShowOffline);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, FAV_OnContactMenuBuild);

	CMenuItem mi;
	SET_UID(mi, 0xf99a2320, 0xc024, 0x48bd, 0x81, 0xf7, 0x9f, 0xa2, 0x5, 0xb0, 0x7f, 0xdc);
	mi.name.t = FAVMENUROOTNAME;
	mi.flags = CMIF_TCHAR;
	hFavoriteContactMenu = Menu_AddContactMenuItem(&mi);
	Menu_ConfigureItem(hFavoriteContactMenu, MCI_OPT_UNIQUENAME, "ModernClistMenu_ContactRate");

	UNSET_UID(mi);
	mi.root = hFavoriteContactMenu;
	mi.flags = CMIF_TCHAR | CMIF_SYSTEM; // not included into new menu settings
	mi.pszService = CLUI_FAVSETRATE;
	for (int i = 0; i < _countof(rates); i++) {
		mi.hIcolibItem = iconList[i].hIcolib;
		mi.name.t = rates[i];
		hFavoriteContactMenuItems[i] = Menu_AddContactMenuItem(&mi);
		Menu_ConfigureItem(hFavoriteContactMenuItems[i], MCI_OPT_EXECPARAM, i);
	}

	mi.hIcolibItem = NULL;
	mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE;
	mi.position = -100000000;
	mi.name.t = LPGENT("Show even if offline");
	hShowIfOflineItem = Menu_AddContactMenuItem(&mi);
	Menu_ConfigureItem(hShowIfOflineItem, MCI_OPT_EXECPARAM, _countof(rates) + 100000000);
	return 0;
}
Beispiel #7
0
int LoadAwayMsgModule(void)
{
	hWindowList = WindowList_Create();
	hWindowList2 = WindowList_Create();

	CMenuItem mi;
	mi.flags = CMIF_TCHAR;

	CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
	mi.position = -2000005000;
	mi.name.t = LPGENT("Re&ad Away message");
	mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
	hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi);

	CreateServiceFunction(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand);
	mi.position = -2000006000;
	mi.hIcolibItem = GetIconHandle(IDI_COPY);
	mi.name.t = LPGENT("Copy Away message");
	mi.pszService = MS_SIMPLESTATUSMSG_COPYMSG;
	hCopyMsgMenuItem = Menu_AddContactMenuItem(&mi);

	CreateServiceFunction(MS_SIMPLESTATUSMSG_GOTOURLMSG, GoToURLMsgCommand);
	mi.position = -2000007000;
	mi.hIcolibItem = GetIconHandle(IDI_GOTOURL);
	mi.name.t = LPGENT("&Go to URL in Away message");
	mi.pszService = MS_SIMPLESTATUSMSG_GOTOURLMSG;
	hGoToURLMenuItem = Menu_AddContactMenuItem(&mi);

	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, AwayMsgPreBuildMenu);

	return 0;
}
Beispiel #8
0
static int ModulesLoaded(WPARAM, LPARAM)
{
	LoadChatIcons();

	HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);

	CMenuItem mi;
	SET_UID(mi, 0x2bb76d5, 0x740d, 0x4fd2, 0x8f, 0xee, 0x7c, 0xa4, 0x5a, 0x74, 0x65, 0xa6);
	mi.position = -2000090001;
	mi.flags = CMIF_DEFAULT;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
	mi.name.a = LPGEN("&Join chat");
	mi.pszService = "GChat/JoinChat";
	hJoinMenuItem = Menu_AddContactMenuItem(&mi);

	SET_UID(mi, 0x72b7440b, 0xd2db, 0x4e22, 0xa6, 0xb1, 0x2, 0xd0, 0x96, 0xee, 0xad, 0x88);
	mi.position = -2000090000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_LEAVE);
	mi.flags = CMIF_NOTOFFLINE;
	mi.name.a = LPGEN("&Leave chat");
	mi.pszService = "GChat/LeaveChat";
	hLeaveMenuItem = Menu_AddContactMenuItem(&mi);

	chatApi.SetAllOffline(TRUE, NULL);
	return 0;
}
Beispiel #9
0
int LoadAwayMsgModule(void)
{
	hWindowList = WindowList_Create();
	hWindowList2 = WindowList_Create();

	CMenuItem mi;
	mi.flags = CMIF_TCHAR;

	SET_UID(mi, 0xd3282acc, 0x9ff1, 0x4ede, 0x8a, 0x1e, 0x36, 0x72, 0x3f, 0x44, 0x4f, 0x84);
	CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
	mi.position = -2000005000;
	mi.name.t = LPGENT("Re&ad Away message");
	mi.pszService = MS_AWAYMSG_SHOWAWAYMSG;
	hAwayMsgMenuItem = Menu_AddContactMenuItem(&mi);

	SET_UID(mi, 0x311124e9, 0xb477, 0x42ef, 0x84, 0xd2, 0xc, 0x6c, 0x50, 0x3f, 0x4a, 0x84);
	CreateServiceFunction(MS_SIMPLESTATUSMSG_COPYMSG, CopyAwayMsgCommand);
	mi.position = -2000006000;
	mi.hIcolibItem = GetIconHandle(IDI_COPY);
	mi.name.t = LPGENT("Copy Away message");
	mi.pszService = MS_SIMPLESTATUSMSG_COPYMSG;
	hCopyMsgMenuItem = Menu_AddContactMenuItem(&mi);

	SET_UID(mi, 0xe2c75070, 0x455d, 0x455f, 0xbf, 0x53, 0x86, 0x64, 0xbc, 0x14, 0xa1, 0xbe);
	CreateServiceFunction(MS_SIMPLESTATUSMSG_GOTOURLMSG, GoToURLMsgCommand);
	mi.position = -2000007000;
	mi.hIcolibItem = GetIconHandle(IDI_GOTOURL);
	mi.name.t = LPGENT("&Go to URL in Away message");
	mi.pszService = MS_SIMPLESTATUSMSG_GOTOURLMSG;
	hGoToURLMenuItem = Menu_AddContactMenuItem(&mi);

	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, AwayMsgPreBuildMenu);

	return 0;
}
Beispiel #10
0
static int ModulesLoaded(WPARAM, LPARAM)
{
	LoadChatIcons();

	HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = -2000090001;
	mi.flags = CMIF_DEFAULT;
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN);
	mi.pszName = LPGEN("&Join chat");
	mi.pszService = "GChat/JoinChat";
	hJoinMenuItem = Menu_AddContactMenuItem(&mi);

	mi.position = -2000090000;
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_LEAVE);
	mi.flags = CMIF_NOTOFFLINE;
	mi.pszName = LPGEN("&Leave chat");
	mi.pszService = "GChat/LeaveChat";
	hLeaveMenuItem = Menu_AddContactMenuItem(&mi);

	ci.SetAllOffline(TRUE, NULL);
	return 0;
}
Beispiel #11
0
void CSkypeProto::InitMenus()
{
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, &CSkypeProto::PrebuildContactMenu);

	//hChooserMenu = Menu_AddObject("SkypeAccountChooser", LPGEN("Skype menu chooser"), 0, "Skype/MenuChoose");

	CMenuItem mi;
	mi.flags = CMIF_TCHAR;

	// Request authorization
	mi.pszService = MODULE"/RequestAuth";
	mi.name.t = LPGENT("Request authorization");
	mi.position = CMI_POSITION + CMI_AUTH_REQUEST;
	mi.hIcolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
	SET_UID(mi, 0x36375a1f, 0xc142, 0x4d6e, 0xa6, 0x57, 0xe4, 0x76, 0x5d, 0xbc, 0x59, 0x8e);
	ContactMenuItems[CMI_AUTH_REQUEST] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnRequestAuth>);

	// Grant authorization
	mi.pszService = MODULE"/GrantAuth";
	mi.name.t = LPGENT("Grant authorization");
	mi.position = CMI_POSITION + CMI_AUTH_GRANT;
	mi.hIcolibItem = ::Skin_GetIconHandle(SKINICON_AUTH_GRANT);
	SET_UID(mi, 0x4c90452a, 0x869a, 0x4a81, 0xaf, 0xa8, 0x28, 0x34, 0xaf, 0x2b, 0x6b, 0x30);
	ContactMenuItems[CMI_AUTH_GRANT] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::OnGrantAuth>);

	mi.pszService = MODULE"/GetHistory";
	mi.name.t = LPGENT("Get server history");
	mi.position = CMI_POSITION + CMI_GETSERVERHISTORY;
	mi.hIcolibItem = GetIconHandle(IDI_SYNCHISTORY);
	SET_UID(mi, 0xc9a64e98, 0x9257, 0x4b52, 0x98, 0xdd, 0x7f, 0x56, 0xb3, 0x90, 0xe3, 0xde);
	ContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::GetContactHistory>);

	mi.pszService = MODULE"/BlockContact";
	mi.name.t = LPGENT("Block contact");
	mi.position = CMI_POSITION + CMI_BLOCK;
	mi.hIcolibItem = GetIconHandle(IDI_BLOCKUSER);
	SET_UID(mi ,0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
	ContactMenuItems[CMI_BLOCK] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::BlockContact>);

	mi.pszService = MODULE"/UnblockContact";
	mi.name.t = LPGENT("Unblock contact");
	mi.position = CMI_POSITION + CMI_UNBLOCK;
	mi.hIcolibItem = GetIconHandle(IDI_UNBLOCKUSER);
	SET_UID(mi, 0x88542f43, 0x7448, 0x48d0, 0x81, 0xa3, 0x26, 0x0, 0x4f, 0x37, 0xee, 0xe0);
	ContactMenuItems[CMI_UNBLOCK] = Menu_AddContactMenuItem(&mi);
	CreateServiceFunction(mi.pszService, GlobalService<&CSkypeProto::UnblockContact>);
}
Beispiel #12
0
HANDLE add_contextmenu(MCONTACT) {
	CLISTMENUITEM mi = CallItem();
	hMenuCallItem = Menu_AddContactMenuItem(&mi);

	mi = HupItem();
	hMenuCallHangup = Menu_AddContactMenuItem(&mi);

	mi = SkypeOutCallItem();
	hMenuSkypeOutCallItem = Menu_AddContactMenuItem(&mi);

	mi = HoldCallItem();
	hMenuHoldCallItem = Menu_AddContactMenuItem(&mi);

	// We cannot use flag PF1_FILESEND for sending files, as Skype opens its own
	// sendfile-Dialog.
	mi = FileTransferItem();
	hMenuFileTransferItem = Menu_AddContactMenuItem(&mi);

	mi = ChatInitItem();
	hMenuChatInitItem = Menu_AddContactMenuItem(&mi);

	mi = BlockContactItem();
	hMenuBlockContactItem = Menu_AddContactMenuItem(&mi);

	memset(&mi, 0, sizeof(mi));
	mi.cbSize = sizeof(mi);
	mi.position = -2000005000;
	mi.flags = CMIF_TCHAR;
	mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_IMPORT));
	mi.pszContactOwner = SKYPE_PROTONAME;
	mi.ptszName = LPGENT("Import Skype history");
	mi.pszService = SKYPE_IMPORTHISTORY;
	return Menu_AddContactMenuItem(&mi);
}
Beispiel #13
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);

	GetModuleFileName(hInst, tszPath, _countof(tszPath));
	*(_tcsrchr(tszPath, _T('\\')) + 1) = _T('\0');

	/*initialize miranda hooks and services on options dialog*/
	HookEvent(ME_OPT_INITIALISE, MessageOptInit);
	/*initialize miranda hooks and services*/
	HookEvent(ME_DB_EVENT_ADDED, MessageEventAdded);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MessagePrebuild);

	CreateServiceFunction(SERV_CONTACT_AUTO_CHAT, ContactClickAutoChat);
	CreateServiceFunction(SERV_CONTACT_NOT_TO_CHAT, ContactClickNotToChat);
	CreateServiceFunction(SERV_CONTACT_START_CHATTING, ContactClickStartChatting);
	{
		CMenuItem mi;

		SET_UID(mi, 0xea31f628, 0x1445, 0x4b62, 0x98, 0x19, 0xce, 0x15, 0x81, 0x49, 0xa, 0xbd);
		mi.position = -50010002; //TODO: check the warning
		mi.name.a = BOLTUN_AUTO_CHAT;
		mi.pszService = SERV_CONTACT_AUTO_CHAT;
		hMenuItemAutoChat = Menu_AddContactMenuItem(&mi);

		SET_UID(mi, 0x726af984, 0x988c, 0x4d5d, 0x97, 0x30, 0xdc, 0x46, 0x55, 0x76, 0x1, 0x73);
		mi.position = -50010001; //TODO: check the warning
		mi.name.a = BOLTUN_NOT_TO_CHAT;
		mi.pszService = SERV_CONTACT_NOT_TO_CHAT;
		hMenuItemNotToChat = Menu_AddContactMenuItem(&mi);

		SET_UID(mi, 0x9e0117f3, 0xb7df, 0x4f1b, 0xae, 0xec, 0xc4, 0x72, 0x59, 0x72, 0xc8, 0x58);
		mi.flags = CMIF_NOTOFFLINE;
		mi.position = -50010000; //TODO: check the warning
		mi.hIcolibItem = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_RECVMSG));
		mi.name.a = BOLTUN_START_CHATTING;
		mi.pszService = SERV_CONTACT_START_CHATTING;
		hMenuItemStartChatting = Menu_AddContactMenuItem(&mi);
	}

	int line;
	blInit = LoadMind(Config.MindFileName, line);
	if (!blInit) {
		TCHAR path[2000];
		mir_sntprintf(path, TranslateTS(FAILED_TO_LOAD_BASE), line, (const TCHAR*)Config.MindFileName);
		MessageBox(NULL, path, TranslateTS(BOLTUN_ERROR), MB_ICONERROR | MB_TASKMODAL | MB_OK);
	}
	return 0;
}
Beispiel #14
0
extern "C" int __declspec(dllexport) Load(void)
{
	mir_getLP(&pluginInfo);
	INITCOMMONCONTROLSEX icex;

	icex.dwSize = sizeof(icex);
	icex.dwICC = ICC_DATE_CLASSES;

	InitCommonControlsEx(&icex);

	if ((hUxTheme = LoadLibraryA("uxtheme.dll")) != 0)
		MyEnableThemeDialogTexture = (BOOL(WINAPI *)(HANDLE, DWORD))GetProcAddress(hUxTheme, "EnableThemeDialogTexture");

	/// all initialization here
	hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_HISTORYICON));
	hOpenWindowsList = WindowList_Create();

	InitServices();

	/// menu items
	CMenuItem mi;
	mi.name.t = LPGENT("View &history");
	mi.flags = CMIF_TCHAR;
	mi.position = 1000090000;
	mi.hIcolibItem = hIcon;
	mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
	Menu_AddContactMenuItem(&mi);

	/// @todo (White-Tiger#1#08/19/14): fully implement System History someday^^
	mi.name.t = LPGENT("&System History");
	Menu_AddMainMenuItem(&mi);

	HookEvents();
	return 0;
}
Beispiel #15
0
static int ModulesLoaded(WPARAM, LPARAM)
{
    CMenuItem mi;
    SET_UID(mi, 0x5ba238de, 0xe16b, 0x4928, 0xa0, 0x70, 0xff, 0x43, 0xf6, 0x1f, 0x16, 0xd4);
    mi.position = 2000070050;
    mi.hIcolibItem = icon.hIcolib;
    mi.name.a = LPGEN("Assign smiley category");
    hContactMenuItem = Menu_AddContactMenuItem(&mi);

    DownloadInit();

    //install hooks if enabled
    InstallDialogBoxHook();

    g_SmileyCategories.AddAllProtocolsAsCategory();
    g_SmileyCategories.ClearAndLoadAll();

    ColourID cid = { sizeof(cid) };
    strcpy_s(cid.dbSettingsGroup, "SmileyAdd");
    strcpy_s(cid.group, LPGEN("SmileyAdd"));
    strcpy_s(cid.name, LPGEN("Background color"));
    strcpy_s(cid.setting, "SelWndBkgClr");
    cid.defcolour = GetSysColor(COLOR_WINDOW);
    ColourRegister(&cid);
    return 0;
}
Beispiel #16
0
extern "C" int __declspec(dllexport)Load(void)
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
	CreateServiceFunction(protocolname"/ToggleAutoanswer",Toggle);

	CMenuItem mi;
	mi.position = 500090000;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleEnable";
	hEnableMenu = Menu_AddMainMenuItem(&mi);

	mi.position = -0x7FFFFFFF;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleAutoanswer";
	hToggle = Menu_AddContactMenuItem(&mi);

	//add hook
	HookEvent(ME_OPT_INITIALISE, OptInit);
	HookEvent(ME_DB_EVENT_ADDED, addEvent);
	HookEvent(ME_SYSTEM_MODULESLOADED, CheckDefaults);

	Icon_RegisterT(hinstance, _T("Simple Auto Replier"), iconList, _countof(iconList));

	return 0;
}
Beispiel #17
0
static int OnModulesLoaded(WPARAM, LPARAM)
{
	ReloadGlobals();
	LoadGlobalIcons();
	LoadMsgLogIcons();
	ModuleLoad(0, 0);

	CMenuItem mi;
	SET_UID(mi, 0x58d8dc1, 0x1c25, 0x49c0, 0xb8, 0x7c, 0xa3, 0x22, 0x2b, 0x3d, 0xf1, 0xd8);
	mi.position = -2000090000;
	mi.flags = CMIF_DEFAULT;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_MESSAGE);
	mi.name.a = LPGEN("&Message");
	mi.pszService = MS_MSG_SENDMESSAGE;
	hMsgMenuItem = Menu_AddContactMenuItem(&mi);
	IcoLib_ReleaseIcon((HICON)mi.hIcolibItem);

	HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileySettingsChanged);
	HookEvent(ME_IEVIEW_OPTIONSCHANGED, SmileySettingsChanged);
	HookEvent(ME_AV_AVATARCHANGED, AvatarChanged);
	HookEvent(ME_FONT_RELOAD, FontServiceFontsChanged);
	HookEvent(ME_MSG_ICONPRESSED, StatusIconPressed);
	HookEvent(ME_MC_DEFAULTTCHANGED, MetaContactChanged);

	RestoreUnreadMessageAlerts();
	OptionsInit();
	RegisterStatusIcons();
	return 0;
}
Beispiel #18
0
int LoadModules(void)
{
	HookEvent(ME_OPT_INITIALISE,OptInitialise);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU,SmsRebuildContactMenu);
	HookEvent(ME_PROTO_ACK,handleAckSMS);
	HookEvent(ME_DB_EVENT_ADDED,handleNewMessage);
	HookEvent(ME_PROTO_ACCLISTCHANGED,RefreshAccountList);

	char szServiceFunction[MAX_PATH];
	mir_snprintf(szServiceFunction,sizeof(szServiceFunction),"%s%s",PROTOCOL_NAMEA,SMS_SEND);

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = 300050000;
	mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMS);
	mi.ptszName = SMS_SEND_STR;
	mi.pszService = szServiceFunction;
	mi.flags = CMIF_TCHAR;
	Menu_AddMainMenuItem(&mi);

	mi.position = -2000070000;
	mi.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SMS);
	mi.ptszName = SMS_SEND_CM_STR;
	mi.pszService = szServiceFunction;
	mi.flags = CMIF_TCHAR;	
	ssSMSSettings.hContactMenuItems[0] = Menu_AddContactMenuItem(&mi);

	SkinAddNewSoundEx("RecvSMSMsg",PROTOCOL_NAMEA,LPGEN("Incoming SMS Message"));
	SkinAddNewSoundEx("RecvSMSConfirmation",PROTOCOL_NAMEA,LPGEN("Incoming SMS Confirmation"));

	RefreshAccountList(NULL,NULL);

	RestoreUnreadMessageAlerts();
	return 0;
}
Beispiel #19
0
extern "C" int __declspec(dllexport)Load(void)
{
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	CreateServiceFunction(protocolname"/ToggleEnable", ToggleEnable);
	CreateServiceFunction(protocolname"/ToggleAutoanswer", Toggle);

	CMenuItem mi;

	SET_UID(mi, 0xac1c64a, 0x82ca, 0x4845, 0x86, 0x89, 0x59, 0x76, 0x12, 0x74, 0x72, 0x7b);
	mi.position = 500090000;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleEnable";
	hEnableMenu = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xb290cccd, 0x4ecc, 0x475e, 0x87, 0xcb, 0x51, 0xf4, 0x3b, 0xc3, 0x44, 0x9c);
	mi.position = -0x7FFFFFFF;
	mi.name.t = _T("");
	mi.pszService = protocolname"/ToggleAutoanswer";
	hToggle = Menu_AddContactMenuItem(&mi);

	//add hook
	HookEvent(ME_OPT_INITIALISE, OptInit);
	HookEvent(ME_DB_EVENT_ADDED, addEvent);
	HookEvent(ME_SYSTEM_MODULESLOADED, CheckDefaults);

	Icon_RegisterT(hinstance, _T("Simple Auto Replier"), iconList, _countof(iconList));

	return 0;
}
Beispiel #20
0
int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/)
{
	Initialize();

	bReadMirandaDirAndPath();
	UpdateFileToColWidth();

	HookEvent(ME_DB_EVENT_ADDED, nExportEvent);
	HookEvent(ME_DB_CONTACT_DELETED, nContactDeleted);
	HookEvent(ME_OPT_INITIALISE, OptionsInitialize);

	if ( !bReplaceHistory)
	{
		CLISTMENUITEM mi = { sizeof(mi) };
		mi.flags = 0;
		mi.pszContactOwner = NULL;    //all contacts
		mi.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
		mi.position = 1000090100;
		mi.pszName = LPGEN("Open E&xported History");
		mi.pszService = MS_SHOW_EXPORT_HISTORY;
		hOpenHistoryMenuItem = Menu_AddContactMenuItem(&mi);

		if ( !hOpenHistoryMenuItem)
			MessageBox(NULL, TranslateT("Failed to add menu item Open Exported History\nCallService(MS_CLIST_ADDCONTACTMENUITEM,...)"), MSG_BOX_TITEL, MB_OK);
	}

	HookEvent(ME_SYSTEM_SHUTDOWN, nSystemShutdown);
	return 0;
}
Beispiel #21
0
void MirandaContact::addMenuItem()
{
	CMenuItem mi;
	mi.name.a = MENU_ITEM_TEXT;
	mi.position = 65535;
	mi.pszService = MENU_COMMAND_CALLBACK_SERVICE;
	hTransliterateCmdMenuItem = Menu_AddContactMenuItem(&mi);
}
Beispiel #22
0
void MSN_InitContactMenu(void)
{
	char servicefunction[100];
	mir_strcpy(servicefunction, "MSN");
	char* tDest = servicefunction + mir_strlen(servicefunction);

	CMenuItem mi;
	mi.pszService = servicefunction;

	SET_UID(mi, 0xc6169b8f, 0x53ab, 0x4242, 0xbe, 0x90, 0xe2, 0x4a, 0xa5, 0x73, 0x88, 0x32);
	mir_strcpy(tDest, MSN_BLOCK);
	hBlockCom = CreateServiceFunction(servicefunction, MsnMenuBlockCommand);
	mi.position = -500050000;
	mi.hIcolibItem = GetIconHandle(IDI_MSNBLOCK);
	mi.name.a = LPGEN("&Block");
	hBlockMenuItem = Menu_AddContactMenuItem(&mi);

	SET_UID(mi, 0x7f7e4c24, 0x821c, 0x450f, 0x93, 0x76, 0xbe, 0x65, 0xe9, 0x2f, 0xb6, 0xc2);
	mir_strcpy(tDest, MSN_VIEW_PROFILE);
	hViewProfile = CreateServiceFunction(servicefunction, MsnMenuViewProfile);
	mi.position = -500050003;
	mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
	mi.name.a = LPGEN("View &Profile");
	hLiveSpaceMenuItem = Menu_AddContactMenuItem(&mi);

#ifdef OBSOLETE
	mir_strcpy(tDest, MSN_NETMEETING);
	hNetMeeting = CreateServiceFunction(servicefunction, MsnMenuSendNetMeeting);
	mi.flags = CMIF_NOTOFFLINE;
	mi.position = -500050002;
	mi.hIcolibItem = GetIconHandle(IDI_NETMEETING);
	mi.name.a = LPGEN("&Start Netmeeting");
	hNetmeetingMenuItem = Menu_AddContactMenuItem(&mi);
#endif

	SET_UID(mi,0x25a007c0, 0x8dc7, 0x4284, 0x8a, 0x5e, 0x2, 0x83, 0x17, 0x5d, 0x52, 0xea);
	mir_strcpy(tDest, "/SendHotmail");
	hSendHotMail = CreateServiceFunction(servicefunction, MsnMenuSendHotmail);
	mi.position = -2000010005;
	mi.flags = CMIF_HIDDEN;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
	mi.name.a = LPGEN("Open &Hotmail Inbox");
	hOpenInboxMenuItem = Menu_AddContactMenuItem(&mi);

	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MSN_OnPrebuildContactMenu);
}
Beispiel #23
0
static void addMenuItem(CMenuItem &mi)
{
	if (g_AddContListMI) {
		HGENMENU save = mi.root; mi.root = NULL;
		Menu_AddContactMenuItem(&mi);
		mi.root = save;
	}
	Menu_AddMainMenuItem(&mi);
}
Beispiel #24
0
void MSN_InitContactMenu(void)
{
	char servicefunction[100];
	mir_strcpy(servicefunction, "MSN");
	char* tDest = servicefunction + mir_strlen(servicefunction);

	CMenuItem mi;
	mi.pszService = servicefunction;

	mir_strcpy(tDest, MSN_BLOCK);
	hBlockCom = CreateServiceFunction(servicefunction, MsnMenuBlockCommand);
	mi.position = -500050000;
	mi.hIcolibItem = GetIconHandle(IDI_MSNBLOCK);
	mi.name.a = LPGEN("&Block");
	hBlockMenuItem = Menu_AddContactMenuItem(&mi);

	mir_strcpy(tDest, MSN_VIEW_PROFILE);
	hViewProfile = CreateServiceFunction(servicefunction, MsnMenuViewProfile);
	mi.position = -500050003;
	mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
	mi.name.a = LPGEN("View &Profile");
	hLiveSpaceMenuItem = Menu_AddContactMenuItem(&mi);

#ifdef OBSOLETE
	mir_strcpy(tDest, MSN_NETMEETING);
	hNetMeeting = CreateServiceFunction(servicefunction, MsnMenuSendNetMeeting);
	mi.flags = CMIF_NOTOFFLINE;
	mi.position = -500050002;
	mi.hIcolibItem = GetIconHandle(IDI_NETMEETING);
	mi.name.a = LPGEN("&Start Netmeeting");
	hNetmeetingMenuItem = Menu_AddContactMenuItem(&mi);
#endif

	mir_strcpy(tDest, "/SendHotmail");
	hSendHotMail = CreateServiceFunction(servicefunction, MsnMenuSendHotmail);
	mi.position = -2000010005;
	mi.flags = CMIF_HIDDEN;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
	mi.name.a = LPGEN("Open &Hotmail Inbox");
	hOpenInboxMenuItem = Menu_AddContactMenuItem(&mi);

	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, MSN_OnPrebuildContactMenu);
}
Beispiel #25
0
int ModulesLoaded(WPARAM wParam,LPARAM lParam)
{
	// Register menu item
	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = 1900000001;
	mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGEDIT));
	mi.pszPopupName = "Database";
	mi.pszName = modFullname;
	mi.pszService = "DBEditorpp/MenuCommand";
	Menu_AddMainMenuItem(&mi);

	ZeroMemory(&mi, sizeof(mi));
	mi.cbSize = sizeof(mi);
	mi.position = 1900000001;
	mi.flags = db_get_b(NULL, modname, "UserMenuItem", 0) ? 0 : CMIF_HIDDEN;
	mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGUSER));
	mi.pszName = LPGEN("Open user tree in DBE++");
	mi.pszService = "DBEditorpp/MenuCommand";
	hUserMenu = Menu_AddContactMenuItem(&mi);

	// Register hotkeys
	HOTKEYDESC hkd = { sizeof(hkd) };
	hkd.pszName = "hk_dbepp_open";
	hkd.pszService = "DBEditorpp/MenuCommand";
	hkd.ptszDescription = LPGEN("Open Database Editor");
	hkd.ptszSection = modFullname;
	hkd.DefHotKey = HOTKEYCODE(HOTKEYF_SHIFT | HOTKEYF_EXT, 'D');
	Hotkey_Register(&hkd);

	// icons
	TCHAR szModuleFileName[MAX_PATH];
	if (GetModuleFileName(hInst, szModuleFileName, MAX_PATH))
		addIcons(szModuleFileName);

	UnhookEvent(hModulesLoadedHook);

	usePopups = db_get_b(NULL, modname, "UsePopUps", 0);

	// Load the name order
	for (int i = 0; i < NAMEORDERCOUNT; i++)
		nameOrder[i] = i;

	DBVARIANT dbv;
	if (!db_get(NULL, "Contact", "NameOrder", &dbv)) {
		CopyMemory(nameOrder, dbv.pbVal, dbv.cpbVal);
		db_free(&dbv);
	}

	HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);

	if (bServiceMode)
		CallService("DBEditorpp/MenuCommand", 0, 0);

	return 0;
}
Beispiel #26
0
void InitMenuItems()
{
	CLISTMENUITEM mi = { sizeof(mi) };
	mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
	mi.icolibItem = icon.hIcolib;
	mi.position = 3000090005;
	mi.ptszName = LPGENT("Paste It");

	hContactMenu = Menu_AddContactMenuItem(&mi);

	memset(&mi, 0, sizeof(mi));
	mi.cbSize = sizeof(mi);
	mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR;
	mi.pszService = MS_PASTEIT_CONTACTMENU;
	mi.hParentMenu = hContactMenu;
	mi.popupPosition = FROM_CLIPBOARD;	
	mi.ptszName = LPGENT("Paste from clipboard");
	Menu_AddContactMenuItem(&mi);

	mi.popupPosition = FROM_FILE;
	mi.ptszName = LPGENT("Paste from file");
	Menu_AddContactMenuItem(&mi);

	mi.popupPosition = DEF_PAGES_START - 1;
	mi.ptszName = LPGENT("Default web page");
	HGENMENU hDefWebMenu = Menu_AddContactMenuItem(&mi);
	
	CLISTMENUITEM mi2 = { sizeof(mi2) };
	mi2.pszService = MS_PASTEIT_CONTACTMENU;
	mi2.hParentMenu = hDefWebMenu;
	for(int i = 0 ; i < PasteToWeb::pages; ++i)
	{
		mi2.flags =  CMIF_CHILDPOPUP | CMIF_ROOTHANDLE | CMIF_TCHAR;
		if(Options::instance->defWeb == i)
			mi2.flags |= CMIF_CHECKED;
		mi2.ptszName = pasteToWebs[i]->GetName();
		mi2.popupPosition = mi2.position = DEF_PAGES_START + i;
		hWebPageMenus[i] = Menu_AddContactMenuItem(&mi2);
	}

	hPrebuildContactMenu = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
}
Beispiel #27
0
int MainInit(WPARAM, LPARAM)
{
	CMenuItem mi;
	SET_UID(mi, 0x719c1596, 0xb0fd, 0x4c74, 0xb7, 0xe4, 0xeb, 0x22, 0xf4, 0x99, 0xd7, 0x68);
	mi.position = 10;
	mi.hIcolibItem = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POUNCE));
	mi.name.a = LPGEN("&Buddy Pounce");
	mi.pszService = "BuddyPounce/MenuCommand";
	Menu_AddContactMenuItem(&mi);
	return 0;
}
Beispiel #28
0
void MTG_OnmodulesLoad()
{
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnContactMenuBuild);
	CreateServiceFunction(MTG_MOVE, MTG_DOMOVE);

	CMenuItem mi;
	SET_UID(mi, 0x403c548, 0x4ac6, 0x4ced, 0xa7, 0x6c, 0x4e, 0xb9, 0xc8, 0xba, 0x94, 0x5);
	mi.position = 100000;
	mi.name.a = LPGEN("&Move to group");
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUP);
	hMoveToGroupItem = Menu_AddContactMenuItem(&mi);
}
Beispiel #29
0
		HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService)
		{
			// TODO: support for unicode-core with unicode-aware CList
			CMenuItem mi;
			mi.name.t = (TCHAR*)pszName;
			mi.flags = flags | CMIF_TCHAR;
			mi.position = position;
			mi.hIcolibItem = hIcon;
			mi.pszService = const_cast<char*>(pszService);
			mi.uid = menu_id; menu_id.d[7]++;
			return Menu_AddContactMenuItem(&mi);
		}
Beispiel #30
0
static int SRUrlModulesLoaded(WPARAM, LPARAM)
{
	CMenuItem mi;
	mi.position = -2000040000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
	mi.name.a = LPGEN("Web page address (&URL)");
	mi.pszService = MS_URL_SENDURL;
	hSRUrlMenuItem = Menu_AddContactMenuItem(&mi);

	RestoreUnreadUrlAlerts();
	return 0;
}