Ejemplo n.º 1
0
void CAimProto::InitMainMenus(void)
{
	CMenuItem mi;
	mi.root = Menu_GetProtocolRoot(this);

	mi.pszService = "/ManageAccount";
	CreateProtoService(mi.pszService, &CAimProto::ManageAccount);
	mi.position = 201001;
	mi.hIcolibItem = GetIconHandle("aim");
	mi.name.a = LPGEN("Manage Account");
	hMainMenu[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = "/InstantIdle";
	CreateProtoService(mi.pszService, &CAimProto::InstantIdle);
	mi.position = 201002;
	mi.hIcolibItem = GetIconHandle("idle");
	mi.name.a = LPGEN("Instant Idle");
	hMainMenu[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = "/JoinChatRoom";
	CreateProtoService(mi.pszService, &CAimProto::JoinChatUI);
	mi.position = 201003;
	mi.hIcolibItem = GetIconHandle("aol");
	mi.name.a = LPGEN( "Join Chat Room" );
	hMainMenu[2] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
Ejemplo n.º 2
0
void GGPROTO::gc_menus_init(HGENMENU hRoot)
{
	if (gc_enabled) {
		char service[64];

		CLISTMENUITEM mi = { sizeof(mi) };
		mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
		mi.hParentMenu = hRoot;

		// Conferencing
		mir_snprintf(service, sizeof(service), "%s%s", m_szModuleName, GGS_OPEN_CONF);
		CreateProtoService(GGS_OPEN_CONF, &GGPROTO::gc_openconf);
		mi.position = 2000050001;
		mi.icolibItem = iconList[14].hIcolib;
		mi.ptszName = LPGENT("Open &conference...");
		mi.pszService = service;
		hMainMenu[0] = Menu_AddProtoMenuItem(&mi);

		// Clear ignored conferences
		mir_snprintf(service, sizeof(service), "%s%s", m_szModuleName, GGS_CLEAR_IGNORED);
		CreateProtoService(GGS_CLEAR_IGNORED, &GGPROTO::gc_clearignored);
		mi.position = 2000050002;
		mi.icolibItem = iconList[15].hIcolib;
		mi.ptszName = LPGENT("&Clear ignored conferences");
		mi.pszService = service;
		hMainMenu[1] = Menu_AddProtoMenuItem(&mi);
	}
}
Ejemplo n.º 3
0
int CVkProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
	// Chats
	GCREGISTER gcr = { sizeof(gcr) };
	gcr.ptszDispName = m_tszUserName;
	gcr.pszModule = m_szModuleName;
	gcr.nColors = SIZEOF(sttColors);
	gcr.pColors = sttColors;
	CallServiceSync(MS_GC_REGISTER, NULL, (LPARAM)&gcr);

	CreateProtoService(PS_CREATECHAT, &CVkProto::SvcCreateChat);

	HookProtoEvent(ME_GC_EVENT, &CVkProto::OnChatEvent);
	HookProtoEvent(ME_GC_BUILDMENU, &CVkProto::OnGcMenuHook);

	char szService[100];
	mir_snprintf(szService, sizeof(szService), "%s%s", m_szModuleName, PS_CREATECHAT);

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.flags = CMIF_CHILDPOPUP;
	mi.hParentMenu = MO_GetProtoRootMenu(m_szModuleName);
	mi.pszService = szService;
	mi.position = 10009;
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_CHAT_JOIN);
	mi.pszName = LPGEN("Create new chat");
	Menu_AddProtoMenuItem(&mi);
	return 0;
}
Ejemplo n.º 4
0
void CMsnProto::MsnInitMainMenu(void)
{
	CMenuItem mi;
	mi.root = Menu_GetProtocolRoot(this);

#ifdef OBSOLETE
	mi.pszService = MS_SET_NICKNAME_UI;
	CreateProtoService(mi.pszService, &CMsnProto::SetNicknameUI);
	mi.position = 201001;
	mi.hIcolibItem = GetIconHandle(IDI_MSN);
	mi.name.a = LPGEN("Set &Nickname");
	menuItemsMain[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
#endif

	mi.pszService = MSN_INVITE;
	CreateProtoService(mi.pszService, &CMsnProto::MsnInviteCommand);
	mi.position = 201002;
	mi.hIcolibItem = GetIconHandle(IDI_INVITE);
	mi.name.a = LPGEN("Create &Chat");
	menuItemsMain[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = MS_GOTO_INBOX;
	CreateProtoService(mi.pszService, &CMsnProto::MsnGotoInbox);
	mi.position = 201003;
	mi.hIcolibItem = GetIconHandle(IDI_INBOX);
	mi.name.a = LPGEN("Display &Hotmail Inbox");
	menuItemsMain[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = MS_EDIT_PROFILE;
	CreateProtoService(mi.pszService, &CMsnProto::MsnEditProfile);
	mi.position = 201004;
	mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
	mi.name.a = LPGEN("View &Profile");
	menuItemsMain[2] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = MS_EDIT_ALERTS;
	CreateProtoService(mi.pszService, &CMsnProto::MsnSetupAlerts);
	mi.position = 201004;
	mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
	mi.name.a = LPGEN("Setup Live &Alerts");
	menuItemsMain[3] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	MSN_EnableMenuItems(m_iStatus >= ID_STATUS_ONLINE);
}
Ejemplo n.º 5
0
HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bIsMain, const IconItem *pgdiItems, size_t dwCount, HGENMENU *hResult)
{
	if (!pgdiItems || !dwCount || !hResult)
		return NULL;

	char szServiceFunction[MAX_PATH];
	strncpy(szServiceFunction, m_szModuleName, sizeof(szServiceFunction));
	char *pszServiceFunctionName = szServiceFunction + strlen(m_szModuleName);

	CLISTMENUITEM mi = { sizeof(mi) };

	HGENMENU hRootMenu, (*fnAddFunc)(CLISTMENUITEM*);
	if (bIsMain) {
		fnAddFunc = Menu_AddProtoMenuItem;

		hRootMenu = MO_GetProtoRootMenu(m_szModuleName);
		if (hRootMenu == NULL) {
			mi.ptszName = m_tszUserName;
			mi.hParentMenu = HGENMENU_ROOT;
			mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
			mi.hIcon = g_hMainIcon;
			hRootMenu = Menu_AddProtoMenuItem(&mi);
		}

		mi.position = 20003;
		mi.hParentMenu = hRootMenu;
		mi.flags = CMIF_ROOTHANDLE;
	}
	else {
		fnAddFunc = Menu_AddContactMenuItem;
		mi.position = lPosition;
		mi.flags = CMIF_ROOTPOPUP;
	}

	mi.pszName = LPGEN("Services...");
	mi.hIcon = g_hMainIcon;
	hRootMenu = fnAddFunc(&mi);

	mi.flags = CMIF_CHILDPOPUP;
	mi.hParentMenu = hRootMenu;
	mi.popupPosition = lPopupPosition;
	mi.pszService = szServiceFunction;

	for (size_t i = 0; i < dwCount; i++) {
		strcpy(pszServiceFunctionName, pgdiItems[i].szName);
		mi.position = int(lPosition + i);
		mi.icolibItem = pgdiItems[i].hIcolib;
		mi.pszName = pgdiItems[i].szDescr;
		hResult[i] = fnAddFunc(&mi);
	}

	return hRootMenu;
}
Ejemplo n.º 6
0
void WhatsAppProto::InitMenu()
{
	CMenuItem mi;
	mi.flags = (isOnline() ? 0 : CMIF_GRAYED);
	mi.position = 201001;

	mi.pszService = "/CreateGroup";
	CreateProtoService(mi.pszService, &WhatsAppProto::OnCreateGroup);
	mi.root = Menu_GetProtocolRoot(this);
	mi.name.a = LPGEN("Create group");
	mi.hIcolibItem = GetIconHandle("createGroup");
	m_hMenuCreateGroup = Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
Ejemplo n.º 7
0
int CSkypeProto::OnInitStatusMenu()
{
	CMenuItem mi;
	mi.root = Menu_GetProtocolRoot(this);

	mi.pszService = "/CreateNewChat";
	CreateProtoService(mi.pszService, &CSkypeProto::SvcCreateChat);
	mi.name.a = LPGEN("Create new chat");
	mi.position = SMI_POSITION + SMI_CREATECHAT;
	mi.hIcolibItem = GetIconHandle(IDI_CONFERENCE);
	Menu_AddProtoMenuItem(&mi, m_szModuleName);
	return 0;
}
Ejemplo n.º 8
0
HGENMENU CMraProto::CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bIsMain, const IconItem *pgdiItems, size_t dwCount, HGENMENU *hResult)
{
	if (!pgdiItems || !dwCount || !hResult)
		return NULL;

	char szServiceFunction[MAX_PATH];

	CMenuItem mi;

	HGENMENU hRootMenu, (__stdcall *fnAddFunc)(TMO_MenuItem*, const char*);
	if (bIsMain) {
		fnAddFunc = Menu_AddProtoMenuItem;

		hRootMenu = Menu_GetProtocolRoot(this);
		if (hRootMenu == NULL) {
			mi.name.t = m_tszUserName;
			mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
			mi.hIcolibItem = g_hMainIcon;
			hRootMenu = Menu_AddProtoMenuItem(&mi);
		}

		mi.position = 20003;
		mi.root = hRootMenu;
	}
	else {
		fnAddFunc = Menu_AddContactMenuItem;
		mi.position = lPosition;
	}

	SET_UID(mi, 0x83C8B6A7, 0xEC0D, 0x41D6, 0x8A, 0x0E, 0xAC, 0x90, 0x8C, 0xEE, 0xAF, 0xFE);
	mi.flags = 0;
	mi.name.a = LPGEN("Services...");
	mi.hIcolibItem = g_hMainIcon;
	hRootMenu = fnAddFunc(&mi, m_szModuleName);
	UNSET_UID(mi);

	mi.flags = CMIF_SYSTEM;
	mi.root = hRootMenu;
	mi.pszService = szServiceFunction;

	for (size_t i = 0; i < dwCount; i++) {
		mi.pszService = pgdiItems[i].szName;
		mi.position = int(lPosition + i);
		mi.hIcolibItem = pgdiItems[i].hIcolib;
		mi.name.a = pgdiItems[i].szDescr;
		hResult[i] = fnAddFunc(&mi, m_szModuleName);
		Menu_ConfigureItem(hResult[i], MCI_OPT_EXECPARAM, lPopupPosition);
	}

	return hRootMenu;
}
Ejemplo n.º 9
0
void CSteamProto::OnInitStatusMenu()
{
	char text[200];
	strcpy(text, m_szModuleName);
	char* tDest = text + strlen(text);

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.pszService = text;

	HGENMENU hSteamRoot = MO_GetProtoRootMenu(m_szModuleName);
	if (!hSteamRoot)
	{
		mi.ptszName = m_tszUserName;
		mi.position = -1999901006;
		mi.hParentMenu = HGENMENU_ROOT;
		mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
		//mi.icolibItem = NULL;
		hSteamRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
	}
	else
	{
		if (m_hMenuRoot)
			CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)m_hMenuRoot, 0);
		m_hMenuRoot = NULL;
	}

	mi.hParentMenu = hSteamRoot;
	mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR;

	// Show block list
	strcpy(tDest, "/BlockList");
	CreateProtoService(tDest, &CSteamProto::OpenBlockListCommand);
	mi.ptszName = LPGENT("Blocked contacts");
	mi.position = 200000 + SMI_BLOCKED_LIST;
	//mi.icolibItem = NULL;
	Menu_AddProtoMenuItem(&mi);
}
Ejemplo n.º 10
0
////////////////////////////////////////////////////////////////////////////////
// Groupchat menus initialization
//
void GGPROTO::gc_menus_init(HGENMENU hRoot)
{
	if (gc_enabled) {
		CMenuItem mi;
		mi.flags = CMIF_TCHAR;
		mi.root = hRoot;

		// Conferencing
		mi.pszService = GGS_OPEN_CONF;
		CreateProtoService(mi.pszService, &GGPROTO::gc_openconf);
		mi.position = 2000050001;
		mi.hIcolibItem = iconList[14].hIcolib;
		mi.name.t = LPGENT("Open &conference...");
		hMainMenu[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

		// Clear ignored conferences
		mi.pszService = GGS_CLEAR_IGNORED;
		CreateProtoService(mi.pszService, &GGPROTO::gc_clearignored);
		mi.position = 2000050002;
		mi.hIcolibItem = iconList[15].hIcolib;
		mi.name.t = LPGENT("&Clear ignored conferences");
		hMainMenu[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
	}
}
Ejemplo n.º 11
0
int WhatsAppProto::OnBuildStatusMenu(WPARAM wParam,LPARAM lParam)
{
	debugLogA("");
	char text[200];
	strcpy(text,m_szModuleName);
	char *tDest = text+strlen(text);

	CLISTMENUITEM mi = {sizeof(mi)};
	mi.pszService = text;

	HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
	if (hRoot == NULL) {
		mi.popupPosition = 500085000;
		mi.hParentMenu = HGENMENU_ROOT;
		mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | ( this->isOnline() ? 0 : CMIF_GRAYED );
		mi.icolibItem = GetIconHandle( "whatsApp" );
		mi.ptszName = m_tszUserName;
		hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi);
	} else {
		if ( m_hMenuRoot )
			CallService( MS_CLIST_REMOVEMAINMENUITEM, ( WPARAM )m_hMenuRoot, 0 );
		m_hMenuRoot = NULL;
	}

	mi.flags = CMIF_CHILDPOPUP | ( this->isOnline() ? 0 : CMIF_GRAYED );
	mi.position = 201001;

	CreateProtoService("/CreateGroup", &WhatsAppProto::OnCreateGroup);
	strcpy(tDest, "/CreateGroup");
	mi.hParentMenu = hRoot;
	mi.pszName = LPGEN("Create Group");
	mi.icolibItem = GetIconHandle("createGroup");
	m_hMenuCreateGroup = Menu_AddProtoMenuItem(&mi);

	return 0;
}
Ejemplo n.º 12
0
int InitMenus(WPARAM wParam, LPARAM lParam)
{
	GoogleTalkAcc *pga = isGoogle(lParam);
	if (pga != NULL) {
		LPCSTR szModuleName = pga->m_japi->GetModuleName();
		char szServiceName[100];
		mir_snprintf(szServiceName, "%s/%s", szModuleName, MS_GTALKEXT_OPENMAILBOX);
		CreateServiceFunctionParam(szServiceName, OpenMailboxMenuHandler, (LPARAM)szModuleName);

		CMenuItem mi;
		mi.root = HGENMENU(wParam);
		mi.hIcolibItem = g_hPopupIcon;
		mi.position = 200101;
		mi.name.a = LPGEN("Open mailbox");
		mi.pszService = szServiceName;
		Menu_AddProtoMenuItem(&mi);
	}
	return 0;
}
Ejemplo n.º 13
0
void CVkProto::InitMenus()
{
	HookProtoEvent(ME_CLIST_PREBUILDCONTACTMENU, &CVkProto::OnPreBuildContactMenu);

	//Contact Menu Services
	CreateProtoService(PS_GETSERVERHISTORYLAST1DAY, &CVkProto::SvcGetServerHistoryLast1Day);
	CreateProtoService(PS_GETSERVERHISTORYLAST3DAY, &CVkProto::SvcGetServerHistoryLast3Day);
	CreateProtoService(PS_GETSERVERHISTORYLAST7DAY, &CVkProto::SvcGetServerHistoryLast7Day);
	CreateProtoService(PS_GETSERVERHISTORYLAST30DAY, &CVkProto::SvcGetServerHistoryLast30Day);
	CreateProtoService(PS_GETSERVERHISTORYLAST90DAY, &CVkProto::SvcGetServerHistoryLast90Day);
	CreateProtoService(PS_GETALLSERVERHISTORY, &CVkProto::SvcGetAllServerHistory);
	CreateProtoService(PS_VISITPROFILE, &CVkProto::SvcVisitProfile);
	CreateProtoService(PS_CREATECHAT, &CVkProto::SvcCreateChat);
	CreateProtoService(PS_ADDASFRIEND, &CVkProto::SvcAddAsFriend);
	CreateProtoService(PS_DELETEFRIEND, &CVkProto::SvcDeleteFriend);
	CreateProtoService(PS_BANUSER, &CVkProto::SvcBanUser);
	CreateProtoService(PS_REPORTABUSE, &CVkProto::SvcReportAbuse);
	CreateProtoService(PS_DESTROYKICKCHAT, &CVkProto::SvcDestroyKickChat);
	CreateProtoService(PS_OPENBROADCAST, &CVkProto::SvcOpenBroadcast);
	CreateProtoService(PS_LOADVKNEWS, &CVkProto::SvcLoadVKNews);
	CreateProtoService(PS_SETSTATUSMSG, &CVkProto::SvcSetStatusMsg);
	CreateProtoService(PS_WALLPOST, &CVkProto::SvcWallPost);
		
	CMenuItem mi;
	mi.root = Menu_GetProtocolRoot(this);

	// Proto menu
	mi.pszService = PS_CREATECHAT;
	mi.position = 10009 + PMI_CREATECHAT;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_CHAT_JOIN);
	mi.name.a = LPGEN("Create new chat");
	SET_UID(mi, 0xc217748d, 0x7218, 0x4a62, 0xab, 0x37, 0x9, 0x58, 0x6a, 0x88, 0x71, 0x3e);
	g_hProtoMenuItems[PMI_CREATECHAT] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_SETSTATUSMSG;
	mi.position = 10009 + PMI_SETSTATUSMSG;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_STATUS));
	mi.name.a = LPGEN("Status message");
	SET_UID(mi, 0x696bd932, 0xeee4, 0x4c4c, 0xa6, 0xf8, 0xb3, 0x72, 0xdf, 0xc6, 0xfa, 0xd1);
	g_hProtoMenuItems[PMI_SETSTATUSMSG] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_WALLPOST;
	mi.position = 10009 + PMI_WALLPOST;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL));
	mi.name.a = LPGEN("Send message to my wall");
	SET_UID(mi, 0x50a80044, 0xdddd, 0x47e6, 0x9e, 0x90, 0x32, 0x7b, 0x88, 0x13, 0x21, 0x4e);
	g_hProtoMenuItems[PMI_WALLPOST] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_LOADVKNEWS;
	mi.position = 10009 + PMI_LOADVKNEWS;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_NOTIFICATION));
	mi.name.a = LPGEN("Load news from VK");
	SET_UID(mi, 0x7c449456, 0xb731, 0x48cc, 0x9c, 0x4e, 0x20, 0xe4, 0x66, 0x7a, 0x16, 0x23);
	g_hProtoMenuItems[PMI_LOADVKNEWS] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
	
	mi.pszService = PS_VISITPROFILE;
	mi.position = 10009 + PMI_VISITPROFILE;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_VISITPROFILE));
	mi.name.a = LPGEN("Visit profile");
	SET_UID(mi, 0x9550515e, 0x2a45, 0x4913, 0x95, 0x1a, 0x1e, 0xfa, 0x7, 0xc6, 0x2d, 0x60);
	g_hProtoMenuItems[PMI_VISITPROFILE] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	// Contact Menu Items
	mi.root = NULL;
	mi.flags = CMIF_TCHAR;

	mi.pszService = PS_VISITPROFILE;
	mi.position = -200001000 + CMI_VISITPROFILE;
	mi.name.t = LPGENT("Visit profile");
	SET_UID(mi, 0x828cc50e, 0x398d, 0x43a2, 0xbf, 0xd3, 0xa9, 0x96, 0x47, 0x9d, 0x52, 0xff);
	g_hContactMenuItems[CMI_VISITPROFILE] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_WALLPOST;
	mi.position = -200001000 + CMI_WALLPOST;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_WALL));
	mi.name.t = LPGENT("Send message to user\'s wall");
	SET_UID(mi, 0xd8841aaf, 0x15f6, 0x4be9, 0x9f, 0x4f, 0x16, 0xa9, 0x47, 0x6a, 0x19, 0x81);
	g_hContactMenuItems[CMI_WALLPOST] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_ADDASFRIEND;
	mi.position = -200001000 + CMI_ADDASFRIEND;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_FRIENDADD));
	mi.name.t = LPGENT("Add as friend");
	SET_UID(mi, 0xf11b9a7f, 0x569, 0x4023, 0xb0, 0xd6, 0xa3, 0x16, 0xf6, 0xd4, 0xfb, 0xb5);
	g_hContactMenuItems[CMI_ADDASFRIEND] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_DELETEFRIEND;
	mi.position = -200001000 + CMI_DELETEFRIEND;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_FRIENDDEL));
	mi.name.t = LPGENT("Delete from friend list");
	SET_UID(mi, 0x1e26514, 0x854f, 0x4e60, 0x8c, 0xf8, 0xab, 0xaa, 0xe0, 0xc3, 0xa5, 0xa7);
	g_hContactMenuItems[CMI_DELETEFRIEND] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_BANUSER;
	mi.position = -200001000 + CMI_BANUSER;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_BAN));
	mi.name.t = LPGENT("Ban user");
	SET_UID(mi, 0x7ba06bab, 0xf770, 0x4938, 0x9c, 0x76, 0xef, 0x40, 0xbc, 0x55, 0x0, 0x9b);
	g_hContactMenuItems[CMI_BANUSER] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_REPORTABUSE;
	mi.position = -200001000 + CMI_REPORTABUSE;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_ABUSE));
	mi.name.t = LPGENT("Report abuse");
	SET_UID(mi, 0x56454cb9, 0xd80, 0x4050, 0xbe, 0xfc, 0x2c, 0xf6, 0x10, 0x2a, 0x7d, 0x19);
	g_hContactMenuItems[CMI_REPORTABUSE] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_DESTROYKICKCHAT;
	mi.position = -200001000 + CMI_DESTROYKICKCHAT;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_FRIENDDEL));
	mi.name.t = LPGENT("Destroy room");
	SET_UID(mi, 0x4fa6e75a, 0x30cd, 0x4482, 0xae, 0x8f, 0x0, 0x38, 0xd0, 0x17, 0x33, 0xcd);
	g_hContactMenuItems[CMI_DESTROYKICKCHAT] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_OPENBROADCAST;
	mi.position = -200001000 + CMI_OPENBROADCAST;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_BROADCAST));
	mi.name.t = LPGENT("Open broadcast");
	SET_UID(mi, 0x85251a06, 0xf734, 0x4985, 0x8c, 0x36, 0x6f, 0x66, 0x46, 0xf9, 0xa0, 0x10);
	g_hContactMenuItems[CMI_OPENBROADCAST] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_LOADVKNEWS;
	mi.position = -200001000 + CMI_LOADVKNEWS;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_NOTIFICATION));
	mi.name.t = LPGENT("Load news from VK");
	SET_UID(mi, 0xe1f6888b, 0x21ae, 0x409f, 0x82, 0xa2, 0x7b, 0x72, 0xef, 0x47, 0x9, 0xc0);
	g_hContactMenuItems[CMI_LOADVKNEWS] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// Sync history menu
	mi.pszService = PS_GETSERVERHISTORY;
	mi.position = -200001000 + CMI_GETSERVERHISTORY;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
	mi.name.t = LPGENT("Reload messages from vk.com...");
	SET_UID(mi, 0xc6b59e9f, 0x5250, 0x4146, 0xb6, 0xf3, 0x2d, 0xe1, 0x4, 0x3b, 0x95, 0xf5);
	g_hContactMenuItems[CMI_GETSERVERHISTORY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
		
	mi.root = g_hContactMenuItems[CMI_GETSERVERHISTORY];

	mi.pszService = PS_GETSERVERHISTORYLAST1DAY;
	mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST1DAY;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
	mi.name.t = LPGENT("for last 1 day");
	SET_UID(mi, 0x508dce88, 0x1a9a, 0x4dd7, 0x90, 0xf4, 0x41, 0x35, 0x7b, 0xc3, 0x17, 0xed);
	g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST1DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_GETSERVERHISTORYLAST3DAY;
	mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST3DAY;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
	mi.name.t = LPGENT("for last 3 days");
	SET_UID(mi, 0x9a878764, 0x5bbf, 0x433a, 0xbd, 0x50, 0xa9, 0xb9, 0x16, 0x1f, 0x99, 0x29);
	g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST3DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_GETSERVERHISTORYLAST7DAY;
	mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST7DAY;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
	mi.name.t = LPGENT("for last week");
	SET_UID(mi, 0xc6482460, 0xd280, 0x4596, 0x97, 0x4b, 0xf7, 0xfa, 0x6d, 0xe, 0xd5, 0xda);
	g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST7DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_GETSERVERHISTORYLAST30DAY;
	mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST30DAY;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
	mi.name.t = LPGENT("for last 30 days");
	SET_UID(mi, 0xc48e8a9f, 0x2860, 0x4d5b, 0xa8, 0xdf, 0xb8, 0x3f, 0xdf, 0x7b, 0xa2, 0xba);
	g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST30DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_GETSERVERHISTORYLAST90DAY;
	mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETSERVERHISTORYLAST90DAY;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
	mi.name.t = LPGENT("for last 90 days");
	SET_UID(mi, 0xd8e30530, 0xa585, 0x4672, 0xa6, 0x39, 0x18, 0xc9, 0xc9, 0xcb, 0xc7, 0x7d);
	g_hContactHistoryMenuItems[CHMI_GETSERVERHISTORYLAST90DAY] = Menu_AddContactMenuItem(&mi, m_szModuleName);

	mi.pszService = PS_GETALLSERVERHISTORY;
	mi.position = -200001000 + CMI_GETSERVERHISTORY + 100 + CHMI_GETALLSERVERHISTORY;
	mi.hIcolibItem = IcoLib_GetIconByHandle(GetIconHandle(IDI_HISTORY));
	mi.name.t = LPGENT("for all time");
	SET_UID(mi, 0xaee3d02b, 0x3667, 0x47c8, 0x9f, 0x43, 0x14, 0xb7, 0xab, 0x52, 0x14, 0x94);
	g_hContactHistoryMenuItems[CHMI_GETALLSERVERHISTORY] = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
Ejemplo n.º 14
0
void CYahooProto::MenuMainInit(void)
{
	CMenuItem mi;
	mi.flags = 0;
	mi.root = Menu_GetProtocolRoot(this);

	// Show custom status menu
	mi.pszService = YAHOO_SET_CUST_STAT;
	CreateProtoService(mi.pszService, &CYahooProto::SetCustomStatCommand);
	mi.position = 290000;
	mi.hIcolibItem = GetIconHandle(IDI_SET_STATUS);
	mi.name.a = LPGEN("Set &Custom Status");
	menuItemsAll[0] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	// Edit My profile
	mi.pszService = YAHOO_EDIT_MY_PROFILE;
	CreateProtoService(mi.pszService, &CYahooProto::OnEditMyProfile);
	mi.position = 290005;
	mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
	mi.name.a = LPGEN("&Edit My Profile");
	menuItemsAll[1] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	// Show My profile
	mi.pszService = YAHOO_SHOW_MY_PROFILE;
	CreateProtoService(mi.pszService, &CYahooProto::OnShowMyProfileCommand);
	mi.position = 290006;
	mi.hIcolibItem = GetIconHandle(IDI_PROFILE);
	mi.name.a = LPGEN("&My Profile");
	menuItemsAll[2] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	// Show Yahoo mail
	mi.pszService = YAHOO_YAHOO_MAIL;
	CreateProtoService(mi.pszService, &CYahooProto::OnGotoMailboxCommand);
	mi.position = 290010;
	mi.hIcolibItem = GetIconHandle(IDI_INBOX);
	mi.name.a = LPGEN("&Yahoo Mail");
	menuItemsAll[3] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	// Show Address Book
	mi.pszService = YAHOO_AB;
	CreateProtoService(mi.pszService, &CYahooProto::OnABCommand);
	mi.position = 290015;
	mi.hIcolibItem = GetIconHandle(IDI_YAB);
	mi.name.a = LPGEN("&Address Book");
	menuItemsAll[4] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	// Show Calendar
	mi.pszService = YAHOO_CALENDAR;
	CreateProtoService(mi.pszService, &CYahooProto::OnCalendarCommand);
	mi.position = 290017;
	mi.hIcolibItem = GetIconHandle(IDI_CALENDAR);
	mi.name.a = LPGEN("&Calendar");
	menuItemsAll[5] = Menu_AddProtoMenuItem(&mi, m_szModuleName);

	// Join chatroom
	mi.pszService = "/JoinChatRoom";
	CreateProtoService(mi.pszService, &CYahooProto::CreateConference);
	mi.position = 290018;
	mi.hIcolibItem = GetIconHandle(IDI_YAHOO);
	mi.name.a = LPGEN("Create Conference");
	menuItemsAll[6] = Menu_AddProtoMenuItem(&mi, m_szModuleName);
}
Ejemplo n.º 15
0
int FacebookProto::OnBuildStatusMenu(WPARAM, LPARAM)
{
	char text[200];
	mir_strncpy(text, m_szModuleName, 100);
	char *tDest = text + strlen(text);

	CLISTMENUITEM mi = { sizeof(mi) };
	mi.pszService = text;

	HGENMENU hRoot = MO_GetProtoRootMenu(m_szModuleName);
	if (hRoot == NULL) {
		CLISTMENUITEM miRoot = { sizeof(miRoot) };
		miRoot.popupPosition = 500085000;
		miRoot.hParentMenu = HGENMENU_ROOT;
		miRoot.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED | (this->isOnline() ? 0 : CMIF_GRAYED);
		miRoot.icolibItem = GetIconHandle("facebook");
		miRoot.ptszName = m_tszUserName;
		hRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&miRoot);
	}
	else {
		if (m_hMenuRoot)
			CallService(MO_REMOVEMENUITEM, (WPARAM)m_hMenuRoot, 0);
		m_hMenuRoot = NULL;
	}

	mi.flags = CMIF_CHILDPOPUP | (this->isOnline() ? 0 : CMIF_GRAYED);
	mi.position = 201001;
	mi.hParentMenu = hRoot;

	//CreateProtoService(m_szModuleName,"/Mind",&FacebookProto::OnMind,this);
	strcpy(tDest, "/Mind");
	mi.pszName = LPGEN("Share status...");
	mi.icolibItem = GetIconHandle("mind");
	m_hStatusMind = Menu_AddProtoMenuItem(&mi);

	//CreateProtoService("/VisitProfile",&FacebookProto::VisitProfile);
	strcpy(tDest, "/VisitProfile");
	mi.flags = CMIF_CHILDPOPUP;
	mi.pszName = LPGEN("Visit profile");
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
	// TODO RM: remember and properly free in destructor?
	/*m_hStatusMind = */Menu_AddProtoMenuItem(&mi);

	//CreateProtoService("/VisitNotifications", &FacebookProto::VisitNotifications);
	strcpy(tDest, "/VisitNotifications");
	mi.pszName = LPGEN("Visit notifications");
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_EVENT_URL);
	Menu_AddProtoMenuItem(&mi);

	// Services...
	mi.pszName = LPGEN("Services...");
	strcpy(tDest, "/Services");
	mi.flags = CMIF_CHILDPOPUP | (this->isOnline() ? 0 : CMIF_GRAYED);
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_HELP);
	m_hMenuServicesRoot = Menu_AddProtoMenuItem(&mi);

	CreateProtoService("/RefreshBuddyList", &FacebookProto::RefreshBuddyList);
	strcpy(tDest, "/RefreshBuddyList");
	mi.flags = CMIF_ROOTHANDLE;
	mi.pszName = LPGEN("Refresh Buddy List");
	mi.pszPopupName = LPGEN("Services");
	mi.icolibItem = GetIconHandle("friendship");
	mi.hParentMenu = m_hMenuServicesRoot;
	Menu_AddProtoMenuItem(&mi);

	CreateProtoService("/CheckFriendRequests", &FacebookProto::CheckFriendRequests);
	strcpy(tDest, "/CheckFriendRequests");
	mi.flags = CMIF_ROOTHANDLE;
	mi.pszName = LPGEN("Check Friends Requests");
	mi.icolibItem = LoadSkinnedIconHandle(SKINICON_AUTH_REQUEST);
	mi.hParentMenu = m_hMenuServicesRoot;
	Menu_AddProtoMenuItem(&mi);

	CreateProtoService("/CheckNewsfeeds", &FacebookProto::CheckNewsfeeds);
	strcpy(tDest, "/CheckNewsfeeds");
	mi.flags = CMIF_ROOTHANDLE;
	mi.pszName = LPGEN("Check Newsfeeds");
	mi.pszPopupName = LPGEN("Services");
	mi.icolibItem = GetIconHandle("newsfeed");
	mi.hParentMenu = m_hMenuServicesRoot;
	Menu_AddProtoMenuItem(&mi);

	return 0;
}
Ejemplo n.º 16
0
void CJabberProto::MenuInit()
{
    CMenuItem mi;
    mi.root = m_hMenuRoot = Menu_GetProtocolRoot(this);
    mi.flags = CMIF_UNMOVABLE;

    // "Bookmarks..."
    mi.pszService = "/Bookmarks";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleBookmarks);
    mi.name.a = LPGEN("Bookmarks");
    mi.position = 200001;
    mi.hIcolibItem = GetIconHandle(IDI_BOOKMARKS);
    m_hMenuBookmarks = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    // "Services..."
    mi.pszService = NULL;
    mi.name.a = LPGEN("Services...");
    mi.position = 200003;
    mi.hIcolibItem = GetIconHandle(IDI_SERVICE_DISCOVERY);
    HGENMENU hMenuServicesRoot = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    // "Service Discovery..."
    mi.root = hMenuServicesRoot;
    mi.pszService = "/ServiceDiscovery";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleServiceDiscovery);
    mi.name.a = LPGEN("Service Discovery");
    mi.position = 2000050001;
    mi.hIcolibItem = GetIconHandle(IDI_SERVICE_DISCOVERY);
    m_hMenuServiceDiscovery = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    mi.pszService = "/SD/MyTransports";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleServiceDiscoveryMyTransports);
    mi.name.a = LPGEN("Registered Transports");
    mi.position = 2000050003;
    mi.hIcolibItem = GetIconHandle(IDI_TRANSPORTL);
    m_hMenuSDMyTransports = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    mi.pszService = "/SD/Transports";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleServiceDiscoveryTransports);
    mi.name.a = LPGEN("Local Server Transports");
    mi.position = 2000050004;
    mi.hIcolibItem = GetIconHandle(IDI_TRANSPORT);
    m_hMenuSDTransports = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    mi.pszService = "/SD/Conferences";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleServiceDiscoveryConferences);
    mi.name.a = LPGEN("Browse chatrooms");
    mi.position = 2000050005;
    mi.hIcolibItem = GetIconHandle(IDI_GROUP);
    m_hMenuSDConferences = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    mi.pszService = "/Groupchat";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleJoinGroupchat);
    mi.name.a = LPGEN("Create/Join group chat");
    mi.position = 2000050006;
    mi.hIcolibItem = GetIconHandle(IDI_GROUP);
    m_hMenuGroupchat = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    // "Change Password..."
    mi.pszService = "/ChangePassword";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleChangePassword);
    mi.name.a = LPGEN("Change Password");
    mi.position = 2000050007;
    mi.hIcolibItem = GetIconHandle(IDI_KEYS);
    m_hMenuChangePassword = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    // "Roster editor"
    mi.pszService = "/RosterEditor";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleRosterControl);
    mi.name.a = LPGEN("Roster editor");
    mi.position = 2000050009;
    mi.hIcolibItem = GetIconHandle(IDI_AGENTS);
    m_hMenuRosterControl = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    // "XML Console"
    mi.pszService = "/XMLConsole";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleConsole);
    mi.name.a = LPGEN("XML Console");
    mi.position = 2000050010;
    mi.hIcolibItem = GetIconHandle(IDI_CONSOLE);
    Menu_AddProtoMenuItem(&mi, m_szModuleName);

    mi.pszService = "/Notes";
    CreateProtoService(mi.pszService, &CJabberProto::OnMenuHandleNotes);
    mi.name.a = LPGEN("Notes");
    mi.position = 2000050011;
    mi.hIcolibItem = GetIconHandle(IDI_NOTES);
    m_hMenuNotes = Menu_AddProtoMenuItem(&mi, m_szModuleName);

    BuildPrivacyMenu();
    if (m_menuItemsStatus)
        BuildPrivacyListsMenu(false);

    //////////////////////////////////////////////////////////////////////////////////////
    // build priority menu

    m_priorityMenuVal = 0;
    m_priorityMenuValSet = false;

    mi.pszService = NULL;
    mi.position = 200006;
    mi.root = m_hMenuRoot;
    mi.name.a = LPGEN("Resource priority");
    mi.flags = CMIF_UNMOVABLE | CMIF_HIDDEN;
    m_hMenuPriorityRoot = Menu_AddProtoMenuItem(&mi);

    TCHAR szName[128];
    char srvFce[MAX_PATH + 64];
    mi.pszService = srvFce;
    mi.name.t = szName;
    mi.position = 2000040000;
    mi.flags = CMIF_UNMOVABLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
    mi.root = m_hMenuPriorityRoot;

    mir_snprintf(srvFce, "/menuSetPriority/%d", 0);
    bool needServices = !ProtoServiceExists(m_szModuleName, srvFce);
    if (needServices)
        CreateProtoServiceParam(srvFce, &CJabberProto::OnMenuSetPriority, 0);

    int steps[] = { 10, 5, 1, 0, -1, -5, -10 };
    for (int i = 0; i < _countof(steps); i++) {
        if (!steps[i]) {
            mi.position += 100000;
            continue;
        }

        mir_snprintf(srvFce, "/menuSetPriority/%d", steps[i]);
        if (steps[i] > 0) {
            mir_sntprintf(szName, TranslateT("Increase priority by %d"), steps[i]);
            mi.hIcolibItem = GetIconHandle(IDI_ARROW_UP);
        }
        else {
            mir_sntprintf(szName, TranslateT("Decrease priority by %d"), -steps[i]);
            mi.hIcolibItem = GetIconHandle(IDI_ARROW_DOWN);
        }

        if (needServices)
            CreateProtoServiceParam(srvFce, &CJabberProto::OnMenuSetPriority, (LPARAM)steps[i]);

        mi.position++;
        Menu_AddProtoMenuItem(&mi, m_szModuleName);
    }

    UpdatePriorityMenu((short)getWord("Priority", 0));

    //////////////////////////////////////////////////////////////////////////////////////
    // finalize status menu

    m_pepServices.RebuildMenu();
    CheckMenuItems();

    NotifyFastHook(hStatusMenuInit, (WPARAM)m_hMenuRoot, (LPARAM)(IJabberInterface*)this);
}