コード例 #1
0
ファイル: msgs.cpp プロジェクト: kmdtukl/miranda-ng
static int TSAPI LoadFromIconLib()
{
	for (int n = 0; n < _countof(ICONBLOCKS); n++)
		for (int i = 0; i < ICONBLOCKS[n].nItems; i++)
			*(ICONBLOCKS[n].idesc[i].phIcon) = IcoLib_GetIcon(ICONBLOCKS[n].idesc[i].szName);

	PluginConfig.g_buttonBarIcons[0] = Skin_LoadIcon(SKINICON_OTHER_ADDCONTACT);
	PluginConfig.g_buttonBarIcons[1] = Skin_LoadIcon(SKINICON_OTHER_HISTORY);
	PluginConfig.g_buttonBarIconHandles[0] = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
	PluginConfig.g_buttonBarIconHandles[1] = Skin_GetIconHandle(SKINICON_OTHER_ADDCONTACT);
	PluginConfig.g_buttonBarIconHandles[20] = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);

	PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING] =
		PluginConfig.g_buttonBarIcons[12] = Skin_LoadIcon(SKINICON_OTHER_TYPING);
	PluginConfig.g_IconChecked = Skin_LoadIcon(SKINICON_OTHER_TICK);
	PluginConfig.g_IconUnchecked = Skin_LoadIcon(SKINICON_OTHER_NOTICK);
	PluginConfig.g_IconGroupOpen = Skin_LoadIcon(SKINICON_OTHER_GROUPOPEN);
	PluginConfig.g_IconGroupClose = Skin_LoadIcon(SKINICON_OTHER_GROUPSHUT);

	PluginConfig.g_iconOverlayEnabled = IcoLib_GetIcon("tabSRMM_overlay_enabled");
	PluginConfig.g_iconOverlayDisabled = IcoLib_GetIcon("tabSRMM_overlay_disabled");

	PluginConfig.g_iconClock = IcoLib_GetIcon("tabSRMM_clock_symbol");

	CacheMsgLogIcons();
	M.BroadcastMessage(DM_LOADBUTTONBARICONS, 0, 0);
	return 0;
}
コード例 #2
0
ファイル: chat_svc.cpp プロジェクト: Seldom/miranda-ng
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;
}
コード例 #3
0
void InitInternalButtons()
{
	hwndContactTree = pcli->hwndContactTree;

	CreateServiceFunction(TTBI_GROUPSHOWHIDE, TTBInternalGroupShowHide);
	CreateServiceFunction(TTBI_SOUNDSONOFF, TTBInternalSoundsOnOff);
	CreateServiceFunction(TTBI_MAINMENUBUTT, TTBInternalMainMenuButt);
	CreateServiceFunction(TTBI_STATUSMENUBUTT, TTBInternalStatusMenuButt);
	CreateServiceFunction(TTBI_SHOWHIDEOFFLINE, TTBInternalShowHideOffline);

	for (int i = 0; i < _countof(stdButtons); i++) {
		TTBButton ttb = { 0 };
		ttb.name = stdButtons[i].name;
		ttb.pszService = stdButtons[i].pszService;
		ttb.dwFlags = TTBBF_INTERNAL;
		if (stdButtons[i].bDefVisible == TRUE)
			ttb.dwFlags |= TTBBF_VISIBLE;
		if ((ttb.pszTooltipDn = stdButtons[i].tooltipDn) != NULL)
			ttb.dwFlags |= TTBBF_SHOWTOOLTIP;
		ttb.pszTooltipUp = stdButtons[i].tooltipUp;
		if (stdButtons[i].bCustomIcon) {
			ttb.hIconUp = (HICON)LoadImage(hInst, MAKEINTRESOURCE(stdButtons[i].iconidUp), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
			if (stdButtons[i].iconidDn) {
				ttb.dwFlags |= TTBBF_ASPUSHBUTTON;
				ttb.hIconDn = (HICON)LoadImage(hInst, MAKEINTRESOURCE(stdButtons[i].iconidDn), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
			}
			else
				ttb.hIconDn = NULL;
		}
		else {
			ttb.hIconHandleUp = Skin_GetIconHandle(stdButtons[i].iconidUp);
			if (stdButtons[i].iconidDn) {
				ttb.dwFlags |= TTBBF_ASPUSHBUTTON;
				ttb.hIconHandleDn = Skin_GetIconHandle(stdButtons[i].iconidDn);
			}
			else
				ttb.hIconHandleDn = ttb.hIconDn = NULL;
		}

		if (i == 0)
			ttb.wParamUp = 1;

		stdButtons[i].hButton = (HANDLE)TTBAddButton((WPARAM)&ttb, 0);
	}

	CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_OFFLINE].hButton,
		db_get_b(NULL, "CList", "HideOffline", 0) ? 0 : TTBST_PUSHED);

	CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_GROUPS].hButton,
		db_get_b(NULL, "CList", "UseGroups", 1) ? TTBST_PUSHED : 0);

	CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_SOUNDS].hButton,
		db_get_b(NULL, "Skin", "UseSound", 1) ? TTBST_PUSHED : 0);

	CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_META].hButton,
		db_get_b(NULL, "MetaContacts", "Enabled", 1) ? TTBST_PUSHED : 0);

	HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnSettingChanging);
}
コード例 #4
0
ファイル: msgs.cpp プロジェクト: kxepal/miranda-ng
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;
}
コード例 #5
0
ファイル: steam_xstatus.cpp プロジェクト: martok/miranda-ng
void SetContactExtraIcon(MCONTACT hContact, int status)
{
	char iconName[100];
	mir_snprintf(iconName, SIZEOF(iconName), "%s_%s", MODULE, "gaming");

	ExtraIcon_SetIcon(hExtraXStatus, hContact, (status > 0) ? Skin_GetIconHandle(iconName) : NULL);
}
コード例 #6
0
ファイル: main.cpp プロジェクト: slotwin/miranda-ng
static int TTBLoaded(WPARAM, LPARAM)
{
	TTBButton ttb = { sizeof(ttb) };
	ttb.pszService = MENUCOMMAND_SVC;
	ttb.lParamUp = 1;
	ttb.dwFlags = TTBBF_VISIBLE | TTBBF_SHOWTOOLTIP | TTBBF_ASPUSHBUTTON;
	if (PopupOptions.ModuleIsEnabled)
		ttb.dwFlags |= TTBBF_PUSHED;
	ttb.name = LPGEN("Toggle Popups");
	ttb.hIconHandleUp = Skin_GetIconHandle(ICO_TB_POPUP_OFF);
	ttb.hIconHandleDn = Skin_GetIconHandle(ICO_TB_POPUP_ON);
	ttb.pszTooltipUp = LPGEN("Enable Popups");
	ttb.pszTooltipDn = LPGEN("Disable Popups");
	hTTButton = TopToolbar_AddButton(&ttb);
	return 0;
}
コード例 #7
0
static void SetVisibility(MCONTACT hContact, int apparentMode, bool clear)
{
	if (hContact == NULL)
		return;

	char *proto = GetContactProto(hContact);
	if (IsEmpty(proto))
		return;

	if (apparentMode <= 0)
		apparentMode = db_get_w(hContact, proto, "ApparentMode", 0);

	HANDLE hExtraIcon, hIcolib = NULL;

	if (db_get_b(hContact, proto, "ChatRoom", 0)) {
		// Is chat
		hExtraIcon = hExtraChat;
		if (apparentMode == ID_STATUS_OFFLINE)
			hIcolib = Skin_GetIconHandle("ChatActivity");
	}
	else {
		// Not chat
		hExtraIcon = hExtraVisibility;
		if (apparentMode == ID_STATUS_OFFLINE)
			hIcolib = LoadSkinnedIconHandle(SKINICON_OTHER_INVISIBLE_ALL);
		else if (apparentMode == ID_STATUS_ONLINE)
			hIcolib = LoadSkinnedIconHandle(SKINICON_OTHER_VISIBLE_ALL);
	}

	if (hIcolib != NULL || clear) {
		ExtraIcon *extra = GetExtraIcon(hExtraIcon);
		if (extra)
			extra->setIcon((int)hExtraIcon, hContact, hIcolib);
	}
}
コード例 #8
0
ファイル: help.cpp プロジェクト: kxepal/miranda-ng
int LoadHelpModule(void)
{
	HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownHelpModule);

	CreateServiceFunction("Help/AboutCommand", AboutCommand);
	CreateServiceFunction("Help/IndexCommand", IndexCommand);
	CreateServiceFunction("Help/WebsiteCommand", WebsiteCommand);
	CreateServiceFunction("Help/BugCommand", BugCommand);

	CMenuItem mi;
	mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("&Help"), 2000090000);
	Menu_ConfigureItem(mi.root, MCI_OPT_UID, "8824ECA5-6942-46D7-9D07-1BA600E0D02E");

	SET_UID(mi, 0xf3ebf1fa, 0x587c, 0x494d, 0xbd, 0x33, 0x7f, 0x88, 0xb3, 0x61, 0x1e, 0xd3);
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
	mi.position = 2000090000;
	mi.name.a = LPGEN("&About...");
	mi.pszService = "Help/AboutCommand";
	Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x495df66f, 0x844e, 0x479a, 0xaf, 0x21, 0x3e, 0x42, 0xc5, 0x14, 0x7c, 0x7e);
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
	mi.position = -500050000;
	mi.name.a = LPGEN("&Support");
	mi.pszService = "Help/IndexCommand";
	Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x15e18b58, 0xec73, 0x45c2, 0xb9, 0xf4, 0x2a, 0xfe, 0xc2, 0xb7, 0xd3, 0x25);
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDAWEB);
	mi.position = 2000050000;
	mi.name.a = LPGEN("&Miranda NG homepage");
	mi.pszService = "Help/WebsiteCommand";
	Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xe7d0fe8b, 0xfdeb, 0x45b3, 0xba, 0x83, 0x3, 0x1e, 0x15, 0xda, 0x7e, 0x52);
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
	mi.position = 2000040000;
	mi.name.a = LPGEN("&Report bug");
	mi.pszService = "Help/BugCommand";
	Menu_AddMainMenuItem(&mi);
	return 0;
}
コード例 #9
0
ファイル: movetogroup.cpp プロジェクト: kxepal/miranda-ng
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);
}
コード例 #10
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;
}
コード例 #11
0
ファイル: skinicons.cpp プロジェクト: ybznek/miranda-ng
MIR_APP_DLL(HICON) Skin_LoadIcon(int idx, bool big)
{
	// Query for global status icons
	if (idx < SKINICON_EVENT_MESSAGE) {
		if (idx >= _countof(statusIcons))
			return NULL;

		return Skin_LoadProtoIcon(NULL, statusIcons[idx].id, big);
	}

	return IcoLib_GetIconByHandle(Skin_GetIconHandle(idx), big);
}
コード例 #12
0
ファイル: email.cpp プロジェクト: Seldom/miranda-ng
int LoadSendRecvEMailModule(void)
{
	CMenuItem mi;
	SET_UID(mi, 0x61d8e25a, 0x92e, 0x4470, 0x84, 0x57, 0x5e, 0x52, 0x17, 0x7f, 0xfa, 0x3);
	mi.position = -2000010000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
	mi.name.a = LPGEN("&E-mail");
	mi.pszService = MS_EMAIL_SENDEMAIL;
	hEMailMenuItem = Menu_AddContactMenuItem(&mi);

	CreateServiceFunction(MS_EMAIL_SENDEMAIL, SendEMailCommand);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, EMailPreBuildMenu);
	return 0;
}
コード例 #13
0
ファイル: testplug.cpp プロジェクト: Seldom/miranda-ng
extern "C" __declspec(dllexport) int Load()
{
	mir_getLP(&pluginInfo);

	CMenuItem mi;
	CreateServiceFunction("TestPlug/MenuCommand", PluginMenuCommand);
	mi.position = -0x7FFFFFFF;
	mi.flags = CMIF_TCHAR;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
	mi.name.t = LPGENT("&Test Plugin...");
	mi.pszService = "TestPlug/MenuCommand";
	Menu_AddMainMenuItem(&mi);
	return 0;
}
コード例 #14
0
ファイル: movetogroup.cpp プロジェクト: Seldom/miranda-ng
static int OnContactMenuBuild(WPARAM wParam, LPARAM)
{
	int i;
	OBJLIST<GroupItemSort> groups(10, GroupItemSort::compare);

	if (!hMoveToGroupItem) {
		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);
	}

	for (i=0; i < lphGroupsItems.getCount(); i++)
		Menu_RemoveItem((HGENMENU)lphGroupsItems[i]);
	lphGroupsItems.destroy();

	ptrT szContactGroup(db_get_tsa(wParam, "CList", "Group"));

	int pos = 1000;

	AddGroupItem(hMoveToGroupItem, TranslateT("<Root group>"), pos, -1, !szContactGroup);

	pos += 100000; // Separator

	for (i=0; ; i++) {
		char intname[20];
		_itoa(i, intname, 10);

		DBVARIANT dbv;
		if (db_get_ts(NULL, "CListGroups", intname, &dbv))
			break;

		if (dbv.ptszVal[0])
			groups.insert(new GroupItemSort(dbv.ptszVal + 1, i + 1));

		mir_free(dbv.ptszVal);
	}

	for (i=0; i < groups.getCount(); i++) {
		bool checked = szContactGroup && !mir_tstrcmp(szContactGroup, groups[i].name);
		AddGroupItem(hMoveToGroupItem, groups[i].name, ++pos, groups[i].position, checked);
	}

	return 0;
}
コード例 #15
0
ファイル: msn_menu.cpp プロジェクト: kxepal/miranda-ng
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);
}
コード例 #16
0
ファイル: history.cpp プロジェクト: Seldom/miranda-ng
int LoadHistoryModule(void)
{
	CMenuItem mi;
	SET_UID(mi, 0x28848d7a, 0x6995, 0x4799, 0x82, 0xd7, 0x18, 0x40, 0x3d, 0xe3, 0x71, 0xc4);
	mi.position = 1000090000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
	mi.name.a = LPGEN("View &history");
	mi.pszService = MS_HISTORY_SHOWCONTACTHISTORY;
	hContactMenu = Menu_AddContactMenuItem(&mi);

	CreateServiceFunction(MS_HISTORY_SHOWCONTACTHISTORY, UserHistoryCommand);
	hWindowList = WindowList_Create();
	HookEvent(ME_DB_CONTACT_DELETED, HistoryContactDelete);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdownHistoryModule);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
	return 0;
}
コード例 #17
0
static int SplitmsgModulesLoaded(WPARAM, LPARAM)
{
	RegisterSRMMFonts();
	LoadMsgLogIcons();

	CMenuItem mi;
	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);

	HookEvent(ME_FONT_RELOAD, FontsChanged);

	RestoreUnreadMessageAlerts();
	return 0;
}
コード例 #18
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);
}
コード例 #19
0
ファイル: groupmenu.cpp プロジェクト: kxepal/miranda-ng
void InitGroupMenus(void)
{
	CreateServiceFunction("CLISTMENUSGroup/GroupMenuOnAddService", GroupMenuOnAddService);

	InitSubGroupMenus();

	CMenuItem mi;

	SET_UID(mi, 0xe386678a, 0x5aee, 0x4bfa, 0xa8, 0x23, 0xd, 0xa0, 0x11, 0x99, 0xb1, 0x98);
	mi.position = 500;
	mi.pszService = MS_CLIST_SHOWHIDE;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
	mi.name.a = LPGEN("&Hide/show");
	Menu_AddGroupMenuItem(&mi);

	SET_UID(mi, 0xb0f29663, 0x68b6, 0x494c, 0xaf, 0xab, 0xf6, 0x86, 0x45, 0xb8, 0xdb, 0xde);
	mi.position = 200000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
	mi.pszService = "FindAdd/FindAddCommand";
	mi.name.a = LPGEN("&Find/add contacts...");
	Menu_AddGroupMenuItem(&mi);

	SET_UID(mi, 0xff6855b4, 0x8c50, 0x43b7, 0x97, 0x51, 0xc1, 0x28, 0xa3, 0x10, 0x2b, 0x86);
	mi.position = 300000;
	mi.pszService = "";
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU);
	mi.name.a = LPGEN("&Main menu");
	hGroupMainMenuItemProxy = Menu_AddGroupMenuItem(&mi);

	SET_UID(mi, 0xba91af46, 0x34e5, 0x4f3a, 0x88, 0x1c, 0xe7, 0xa3, 0x53, 0x58, 0x19, 0xde);
	mi.position = 300100;
	mi.pszService = "";
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS);
	mi.name.a = LPGEN("&Status");
	hGroupStatusMenuItemProxy = Menu_AddGroupMenuItem(&mi);

	SET_UID(mi, 0xc2895531, 0x98e9, 0x40bc, 0x9b, 0x8e, 0xfb, 0x33, 0xe8, 0xab, 0xcc, 0xef);
	mi.position = 400000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
	mi.pszService = "Options/OptionsCommand";
	mi.name.a = LPGEN("&Options...");
	Menu_AddGroupMenuItem(&mi);

	SET_UID(mi, 0x2221068a, 0x285d, 0x490c, 0xb1, 0x95, 0xff, 0x49, 0x75, 0xbc, 0xe4, 0x59);
	mi.position = 1000000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
	mi.pszService = "Help/AboutCommand";
	mi.name.a = LPGEN("&About");
	Menu_AddGroupMenuItem(&mi);
}
コード例 #20
0
ファイル: jabber_frame.cpp プロジェクト: ybznek/miranda-ng
CJabberInfoFrame::CJabberInfoFrame(CJabberProto *proto):
    m_pItems(3, CJabberInfoFrameItem::cmp), m_compact(false)
{
    m_proto = proto;
    m_clickedItem = -1;

    InitClass();

    CLISTFrame frame = { sizeof(frame) };
    HWND hwndClist = pcli->hwndContactList;
    frame.hWnd = CreateWindowEx(0, _T("JabberInfoFrameClass"), NULL, WS_CHILD|WS_VISIBLE, 0, 0, 100, 100, hwndClist, NULL, hInst, this);
    frame.align = alBottom;
    frame.height = 2 * SZ_FRAMEPADDING + GetSystemMetrics(SM_CYSMICON) + SZ_LINEPADDING; // compact height by default
    frame.Flags = F_VISIBLE|F_LOCKED|F_NOBORDER|F_TCHAR;
    frame.tname = mir_a2t(proto->m_szModuleName);
    frame.TBtname = proto->m_tszUserName;
    m_frameId = CallService(MS_CLIST_FRAMES_ADDFRAME, (WPARAM)&frame, 0);
    mir_free(frame.tname);
    if (m_frameId == -1) {
        DestroyWindow(frame.hWnd);
        return;
    }

    m_hhkFontsChanged = HookEventMessage(ME_FONT_RELOAD, m_hwnd, WM_APP);
    ReloadFonts();

    m_hwndToolTip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL,
                                   WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP,
                                   CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
                                   m_hwnd, NULL, hInst, NULL);
    SetWindowPos(m_hwndToolTip, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE);

    CreateInfoItem("$", true);
    UpdateInfoItem("$", proto->GetIconHandle(IDI_JABBER), proto->m_tszUserName);

    CreateInfoItem("$/JID", true);
    UpdateInfoItem("$/JID", Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS), _T("Offline"));
    SetInfoItemCallback("$/JID", &CJabberProto::InfoFrame_OnSetup);
}
コード例 #21
0
ファイル: menu_groups.cpp プロジェクト: Seldom/miranda-ng
void InitGroupMenus(void)
{
	GroupMenuParam gmp = {};

	// Group menu
	CreateServiceFunction("CLISTMENUSGroup/ExecService", GroupMenuExecService);
	CreateServiceFunction("CLISTMENUSGroup/FreeOwnerDataGroupMenu", FreeOwnerDataGroupMenu);

	hEventPreBuildGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDGROUPMENU);
	HookEvent(ME_CLIST_PREBUILDGROUPMENU, OnBuildGroupMenu);

	hGroupMenuObject = Menu_AddObject("GroupMenu", LPGEN("Group menu"), 0, "CLISTMENUSGroup/ExecService");
	Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
	Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
	Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuOnAddService");
	{
		CMenuItem mi;

		SET_UID(mi, 0x2f75bc72, 0xd836, 0x4922, 0x9f, 0xe, 0xed, 0x9e, 0xe7, 0x2b, 0x84, 0xf0);
		mi.position = 100000;
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_GROUPADD);
		mi.pszService = "CLISTMENUSGroup/CreateGroupHelper";
		mi.name.a = LPGEN("&New group");
		Menu_AddGroupMenuItem(&mi);
		CreateServiceFunction(mi.pszService, CreateGroupHelper);

		SET_UID(mi, 0xe6269658, 0x69, 0x4094, 0x9b, 0x35, 0x4e, 0x80, 0x29, 0x26, 0xf, 0x8e);
		mi.position = 500001;
		mi.hIcolibItem = NULL;
		mi.pszService = MS_CLIST_SETHIDEOFFLINE;
		mi.name.a = LPGEN("&Hide offline users");
		gmp.wParam = -1;
		hHideOfflineUsersMenuItem = Menu_AddGroupMenuItem(&mi, &gmp);

		SET_UID(mi, 0xeded7371, 0xf6e6, 0x48c3, 0x8c, 0x9e, 0x62, 0xc1, 0xd5, 0xcb, 0x51, 0xbc);
		mi.position = 500002;
		mi.pszService = "CLISTMENUSGroup/HideOfflineRootHelper";
		mi.name.a = LPGEN("Hide &offline users out here");
		hHideOfflineUsersOutHereMenuItem = Menu_AddGroupMenuItem(&mi);
		CreateServiceFunction(mi.pszService, HideOfflineRootHelper);

		SET_UID(mi, 0x4c17b9cf, 0x513a, 0x41d8, 0x8d, 0x2b, 0x89, 0x44, 0x81, 0x14, 0x0, 0x91);
		mi.position = 500003;
		mi.pszService = "CLISTMENUSGroup/HideGroupsHelper";
		mi.name.a = LPGEN("Hide &empty groups");
		hHideEmptyGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
		CreateServiceFunction(mi.pszService, HideGroupsHelper);

		SET_UID(mi, 0xfcbdbbb1, 0xa553, 0x49ac, 0xa5, 0xdf, 0xb4, 0x81, 0x38, 0xf, 0xa0, 0xc7);
		mi.position = 500004;
		mi.pszService = "CLISTMENUSGroup/UseGroupsHelper";
		mi.name.a = LPGEN("Disable &groups");
		hDisableGroupsMenuItem = Menu_AddGroupMenuItem(&mi);
		CreateServiceFunction(mi.pszService, UseGroupsHelper);

		SET_UID(mi, 0xfffb8733, 0xa3e4, 0x4566, 0xa6, 0x6e, 0x4c, 0x4c, 0x7c, 0xe9, 0x56, 0x99);
		mi.position = 1900000;
		mi.pszService = "CloseAction";
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
		mi.name.a = LPGEN("E&xit");
		Menu_AddGroupMenuItem(&mi);
	}

	// SubGroup menu
	CreateServiceFunction("CLISTMENUSSubGroup/ExecService", SubGroupMenuExecService);
	CreateServiceFunction("CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu", FreeOwnerDataSubGroupMenu);
	CreateServiceFunction("CLISTMENUSSubGroup/SubGroupMenuCheckService", SubGroupMenuCheckService);
	CreateServiceFunction("CLISTMENUSSubGroup/GroupMenuExecProxy", GroupMenuExecProxy);

	hEventPreBuildSubGroupMenu = CreateHookableEvent(ME_CLIST_PREBUILDSUBGROUPMENU);
	HookEvent(ME_CLIST_PREBUILDSUBGROUPMENU, OnBuildSubGroupMenu);

	hSubGroupMenuObject = Menu_AddObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
	Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
	Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
	Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_CHECK_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuCheckService");
	{
		CMenuItem mi;

		SET_UID(mi, 0xd208f1d2, 0x7220, 0x4d37, 0xb6, 0xe4, 0xd5, 0x4a, 0xe8, 0xa3, 0xf4, 0x53);
		mi.position = 1000;
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
		mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
		mi.name.a = LPGEN("&New subgroup");
		gmp.wParam = POPUP_NEWSUBGROUP;
		Menu_AddSubGroupMenuItem(&mi, &gmp);

		SET_UID(mi, 0xd85f5ff0, 0x12ca, 0x464d, 0x86, 0x51, 0x53, 0x36, 0x9f, 0x1d, 0x80, 0x45);
		mi.position = 1001;
		mi.hIcolibItem = 0;
		mi.name.a = LPGEN("&Hide offline users in here");
		gmp.wParam = POPUP_GROUPHIDEOFFLINE;
		hHideOfflineUsersHereMenuItem = Menu_AddSubGroupMenuItem(&mi, &gmp);

		SET_UID(mi, 0xf0953dd, 0x5c31, 0x48a4, 0xb4, 0x16, 0x89, 0x5, 0x97, 0xd0, 0x75, 0x3e);
		mi.position = 900001;
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_RENAME);
		mi.name.a = LPGEN("&Rename group");
		gmp.wParam = POPUP_RENAMEGROUP;
		Menu_AddSubGroupMenuItem(&mi, &gmp);

		SET_UID(mi, 0xb0d63cda, 0xa743, 0x4cfa, 0xa6, 0x2d, 0x50, 0xc0, 0x90, 0xe7, 0x6a, 0xc4);
		mi.position = 900002;
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
		mi.name.a = LPGEN("&Delete group");
		gmp.wParam = POPUP_DELETEGROUP;
		Menu_AddSubGroupMenuItem(&mi, &gmp);
	}
}
コード例 #22
0
ファイル: menu_tray.cpp プロジェクト: Seldom/miranda-ng
void InitTrayMenus(void)
{
	CreateServiceFunction("CLISTMENUSTRAY/ExecService", TrayMenuExecService);
	CreateServiceFunction("CLISTMENUSTRAY/FreeOwnerDataTrayMenu", FreeOwnerDataTrayMenu);
	CreateServiceFunction("CLISTMENUSTRAY/TrayMenuOnAddService", TrayMenuOnAddService);

	hEventPreBuildTrayMenu = CreateHookableEvent(ME_CLIST_PREBUILDTRAYMENU);

	// Tray menu
	hTrayMenuObject = Menu_AddObject("TrayMenu", LPGEN("Tray menu"), 0, "CLISTMENUSTRAY/ExecService");
	Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
	Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSTRAY/FreeOwnerDataTrayMenu");
	Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSTRAY/TrayMenuOnAddService");

	// add exit command to menu
	CMenuItem mi;

	SET_UID(mi, 0x6c202553, 0xb4d5, 0x403c, 0xa6, 0x82, 0x2, 0xd8, 0x2b, 0x42, 0xba, 0x9e);
	mi.flags = CMIF_DEFAULT;
	mi.position = 100000;
	mi.pszService = MS_CLIST_SHOWHIDE;
	mi.name.a = LPGEN("&Hide/show");
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SHOWHIDE);
	Menu_AddTrayMenuItem(&mi);

	SET_UID(mi, 0x10e9b2f0, 0xeef2, 0x4684, 0xa7, 0xa7, 0xde, 0x7f, 0x2a, 0xb3, 0x5b, 0x30);
	mi.flags = 0;
	mi.position = 200000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER);
	mi.pszService = "FindAdd/FindAddCommand";
	mi.name.a = LPGEN("&Find/add contacts...");
	Menu_AddTrayMenuItem(&mi);

	SET_UID(mi, 0xb6d861bc, 0x9c3f, 0x40d9, 0xaf, 0x58, 0x53, 0x9f, 0x22, 0xe4, 0x77, 0x98);
	mi.position = 300000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MAINMENU); // eternity #004
	mi.pszService = "MainMenu/Command";
	mi.name.a = LPGEN("&Main menu");
	hTrayMainMenuItemProxy = Menu_AddTrayMenuItem(&mi);

	SET_UID(mi, 0xbafb2db6, 0x8994, 0x40f5, 0x8f, 0x34, 0x4, 0xde, 0x67, 0x8e, 0x6e, 0x70);
	mi.position = 300100;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_STATUS); // eternity #004
	mi.pszService = "GlobalStatus/Command";
	mi.name.a = LPGEN("&Status");
	hTrayStatusMenuItemProxy = Menu_AddTrayMenuItem(&mi);

	SET_UID(mi, 0x75107441, 0xa2ef, 0x420d, 0x85, 0xd5, 0xf7, 0x40, 0x69, 0xf0, 0xa1, 0x42);
	mi.position = 400000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
	mi.pszService = "Options/OptionsCommand";
	mi.name.a = LPGEN("&Options...");
	Menu_AddTrayMenuItem(&mi);

	SET_UID(mi, 0x8cecc833, 0x81ad, 0x499f, 0xb0, 0x44, 0x1, 0x5, 0xf7, 0xe1, 0xe6, 0x7);
	mi.position = 500000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
	mi.pszService = "Help/AboutCommand";
	mi.name.a = LPGEN("&About");
	Menu_AddTrayMenuItem(&mi);

	SET_UID(mi, 0xdfde6fc7, 0xaef7, 0x40db, 0xb4, 0x15, 0xf4, 0x6d, 0xa8, 0xc4, 0x41, 0x71);
	mi.position = 900000;
	mi.pszService = "CloseAction";
	mi.name.a = LPGEN("E&xit");
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_EXIT);
	Menu_AddTrayMenuItem(&mi);
}
コード例 #23
0
ファイル: jabber_menu.cpp プロジェクト: Seldom/miranda-ng
void g_MenuInit(void)
{
    hStatusMenuInit = CreateHookableEvent(ME_JABBER_MENUINIT);

    HookEvent(ME_CLIST_PREBUILDCONTACTMENU, JabberPrebuildContactMenu);

    CreateServiceFunction("Jabber/MenuChoose", JabberMenuChooseService);

    hChooserMenu = Menu_AddObject("JabberAccountChooser", LPGEN("Jabber account chooser"), 0, "Jabber/MenuChoose");
    {
        CMenuItem mi;
        mi.name.a = "Cancel";
        mi.position = 9999999;
        mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_DELETE);
        Menu_AddItem(hChooserMenu, &mi, NULL);
    }

    //////////////////////////////////////////////////////////////////////////////////////
    // Contact menu initialization

    CMenuItem mi;
    mi.flags = CMIF_UNMOVABLE;

    // "Request authorization"
    SET_UID(mi, 0x36375a1f, 0xc142, 0x4d6e, 0xa6, 0x57, 0xe4, 0x76, 0x5d, 0xbc, 0x59, 0x8e);
    mi.name.a = LPGEN("Request authorization");
    mi.position = -2000001000;
    mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
    mi.pszService = "Jabber/ReqAuth";
    g_hMenuRequestAuth = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuHandleRequestAuth);

    // "Grant authorization"
    SET_UID(mi, 0x4c90452a, 0x869a, 0x4a81, 0xaf, 0xa8, 0x28, 0x34, 0xaf, 0x2b, 0x6b, 0x30);
    mi.pszService = "Jabber/GrantAuth";
    mi.name.a = LPGEN("Grant authorization");
    mi.position = -2000001001;
    mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
    g_hMenuGrantAuth = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuHandleGrantAuth);

    // Revoke auth
    SET_UID(mi, 0x619efdcb, 0x99c0, 0x44a8, 0xbf, 0x28, 0xc3, 0xe0, 0x2f, 0xb3, 0x7e, 0x77);
    mi.pszService = "Jabber/RevokeAuth";
    mi.name.a = LPGEN("Revoke authorization");
    mi.position = -2000001002;
    mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_REVOKE);
    g_hMenuRevokeAuth = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuRevokeAuth);

    // "Convert Chat/Contact"
    SET_UID(mi, 0xa98894ec, 0xbaa6, 0x4e1e, 0x8d, 0x75, 0x72, 0xc, 0xae, 0x25, 0xd8, 0x87);
    mi.pszService = "Jabber/ConvertChatContact";
    mi.name.a = LPGEN("Convert");
    mi.position = -1999901004;
    mi.hIcolibItem = g_GetIconHandle(IDI_USER2ROOM);
    g_hMenuConvert = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuConvertChatContact);

    // "Add to roster"
    SET_UID(mi, 0x3928ba10, 0x69bc, 0x4ec9, 0x96, 0x48, 0xa4, 0x1b, 0xbe, 0x58, 0x4a, 0x7e);
    mi.pszService = "Jabber/AddToRoster";
    mi.name.a = LPGEN("Add to roster");
    mi.position = -1999901005;
    mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_ADD);
    g_hMenuRosterAdd = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuRosterAdd);

    // "Add to Bookmarks"
    SET_UID(mi, 0x7d06d00b, 0x3a3e, 0x4d65, 0xac, 0xc5, 0x63, 0xe2, 0x60, 0xbe, 0xc6, 0x6);
    mi.pszService = "Jabber/AddToBookmarks";
    mi.name.a = LPGEN("Add to Bookmarks");
    mi.position = -1999901006;
    mi.hIcolibItem = g_GetIconHandle(IDI_BOOKMARKS);
    g_hMenuAddBookmark = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuBookmarkAdd);

    // Login/logout
    SET_UID(mi, 0x7674d540, 0x2638, 0x4958, 0x99, 0xda, 0x8, 0x3f, 0xad, 0x66, 0x8f, 0xed);
    mi.pszService = "Jabber/TransportLogin";
    mi.name.a = LPGEN("Login/logout");
    mi.position = -1999901007;
    mi.hIcolibItem = g_GetIconHandle(IDI_LOGIN);
    g_hMenuLogin = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuTransportLogin);

    // Retrieve nicks
    SET_UID(mi, 0x6adf70d9, 0x6e92, 0x4a4f, 0x90, 0x71, 0x67, 0xa7, 0xaa, 0x1a, 0x19, 0x7a);
    mi.pszService = "Jabber/TransportGetNicks";
    mi.name.a = LPGEN("Resolve nicks");
    mi.position = -1999901008;
    mi.hIcolibItem = g_GetIconHandle(IDI_REFRESH);
    g_hMenuRefresh = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuTransportResolve);

    // Run Commands
    SET_UID(mi, 0x25546e26, 0xc82, 0x4715, 0xb8, 0xca, 0xe5, 0xf7, 0x2a, 0x58, 0x9, 0x2);
    mi.pszService = "Jabber/RunCommands";
    mi.name.a = LPGEN("Commands");
    mi.position = -1999901009;
    mi.hIcolibItem = g_GetIconHandle(IDI_COMMAND);
    g_hMenuCommands = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberContactMenuRunCommands);

    // Send Note
    SET_UID(mi, 0xf4b0cc51, 0xab9, 0x4cf0, 0x96, 0xaa, 0x22, 0xa0, 0x33, 0x9b, 0x56, 0xc5);
    mi.pszService = "Jabber/SendNote";
    mi.name.a = LPGEN("Send Note");
    mi.position = -1999901010;
    mi.hIcolibItem = g_GetIconHandle(IDI_SEND_NOTE);
    g_hMenuSendNote = Menu_AddContactMenuItem(&mi);
    CreateServiceFunction(mi.pszService, JabberMenuSendNote);

    // Direct Presence
    SET_UID(mi,  0x89803943, 0xa87e, 0x4ae9, 0xbf, 0x79, 0xe3, 0xf3, 0xd6, 0x86, 0xf8, 0x3d);
    mi.pszService = "Jabber/DirectPresenceDummySvc";
    mi.name.a = LPGEN("Send Presence");
    mi.position = -1999901011;
    mi.hIcolibItem = g_GetIconHandle(IDI_NOTES);
    g_hMenuDirectPresence[0] = Menu_AddContactMenuItem(&mi);

    UNSET_UID(mi);
    mi.flags |= CMIF_TCHAR;
    mi.root = g_hMenuDirectPresence[0];
    for (int i = 0; i < _countof(PresenceModeArray); i++) {
        char buf[] = "Jabber/DirectPresenceX";
        buf[_countof(buf) - 2] = '0' + i;
        mi.pszService = buf;
        mi.name.t = pcli->pfnGetStatusModeDescription(PresenceModeArray[i].mode, 0);
        mi.position = -1999901000;
        mi.hIcolibItem = Skin_LoadIcon(PresenceModeArray[i].icon);
        g_hMenuDirectPresence[i + 1] = Menu_AddContactMenuItem(&mi);
        CreateServiceFunctionParam(mi.pszService, JabberMenuHandleDirectPresence, PresenceModeArray[i].mode);
    }

    mi.flags &= ~(CMIF_TCHAR);
    mi.root = NULL;

    // Resource selector
    SET_UID(mi, 0x32a7bb9d, 0x4d9, 0x49b3, 0xac, 0x8f, 0x83, 0xb5, 0x6b, 0xff, 0x4f, 0x5);
    mi.pszService = "Jabber/ResourceSelectorDummySvc";
    mi.name.a = LPGEN("Jabber Resource");
    mi.position = -1999901011;
    mi.hIcolibItem = g_GetIconHandle(IDI_JABBER);
    g_hMenuResourcesRoot = Menu_AddContactMenuItem(&mi);

    SET_UID(mi, 0xb8059d69, 0xa927, 0x4d68, 0xb4, 0x88, 0xf7, 0x32, 0x85, 0x50, 0xde, 0x6f);
    mi.pszService = "Jabber/UseResource_last";
    mi.name.a = LPGEN("Last Active");
    mi.position = -1999901000;
    mi.root = g_hMenuResourcesRoot;
    mi.hIcolibItem = g_GetIconHandle(IDI_JABBER);
    g_hMenuResourcesActive = Menu_AddContactMenuItem(&mi);
    CreateServiceFunctionParam(mi.pszService, JabberMenuHandleResource, MENUITEM_LASTSEEN);

    SET_UID(mi,0xf44812ea, 0x4f37, 0x4a57, 0x86, 0xa8, 0x40, 0x51, 0x22, 0x9f, 0xd5, 0xa8);
    mi.pszService = "Jabber/UseResource_server";
    mi.name.a = LPGEN("Server's Choice");
    mi.position = -1999901000;
    mi.hIcolibItem = g_GetIconHandle(IDI_NODE_SERVER);
    g_hMenuResourcesServer = Menu_AddContactMenuItem(&mi);
    CreateServiceFunctionParam(mi.pszService, JabberMenuHandleResource, MENUITEM_SERVER);
}
コード例 #24
0
ファイル: PluginUpdater.cpp プロジェクト: 0xmono/miranda-ng
extern "C" __declspec(dllexport) int Load(PLUGINLINK *link)
{
	pluginLink = link;
	mir_getMMI(&mmi);
	mir_getLI(&li);
	mir_getMD5I(&md5i);
	mir_getUTFI(&utfi);
#else
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfoEx);

	InitServices();
#endif

	db_set_b(NULL, MODNAME, "NeedRestart", 0);

	DWORD dwLen = GetTempPath( SIZEOF(tszTempPath), tszTempPath);
	if (tszTempPath[dwLen-1] == '\\')
		tszTempPath[dwLen-1] = 0;

	LoadOptions();
	InitPopupList();
	InitNetlib();
	InitIcoLib();

	// Add cheking update menu item
	InitCheck();
	CLISTMENUITEM mi = { sizeof(mi) };
	mi.position = 400010000;
	mi.icolibItem = Skin_GetIconHandle("check_update");
	mi.pszName = LPGEN("Check for updates");
	mi.pszService = MODNAME"/CheckUpdates";
	Menu_AddMainMenuItem(&mi);

#if MIRANDA_VER >= 0x0A00
	InitListNew();

	mi.position++;
	mi.icolibItem = Skin_GetIconHandle("plg_list");
	mi.pszName = LPGEN("Available components list");
	mi.pszService = MODNAME"/ShowList";
	Menu_AddMainMenuItem(&mi);

	InitOptions();
#endif

	// Add hotkey
	HOTKEYDESC hkd = { sizeof(hkd) };
	hkd.pszName = "Check for updates";
	hkd.pszDescription = "Check for updates";
	hkd.pszSection = "Plugin Updater";
	hkd.pszService = MODNAME"/CheckUpdates";
	hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
	hkd.lParam = FALSE;
	Hotkey_Register(&hkd);

	InitEvents();

	//add sounds
	SkinAddNewSoundEx("updatecompleted",LPGEN("Plugin Updater"),LPGEN("Update completed"));
	SkinAddNewSoundEx("updatefailed",LPGEN("Plugin Updater"),LPGEN("Update failed"));
	return 0;
}
コード例 #25
0
ファイル: crshdmp.cpp プロジェクト: truefriend-cz/miranda-ng
static int ModulesLoaded(WPARAM, LPARAM)
{
	char temp[MAX_PATH];
	CallService(MS_SYSTEM_GETVERSIONTEXT, (WPARAM)_countof(temp), (LPARAM)temp);
	crs_a2t(vertxt, temp);

	if (ServiceExists(MS_FOLDERS_REGISTER_PATH)) {
		replaceStrT(profpath, _T("%miranda_userdata%"));

		// Removed because it isn't available on Load()
		//		hCrashLogFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Crash Reports"), CrashLogFolder);
		hVerInfoFolder = FoldersRegisterCustomPathT(PluginName, LPGEN("Version Information"), VersionInfoFolder);

		HookEvent(ME_FOLDERS_PATH_CHANGED, FoldersPathChanged);
		FoldersPathChanged(0, 0);
	}

	CMenuItem mi;
	mi.root = Menu_CreateRoot(MO_MAIN, LPGENT("Version Information"), 2000089999, GetIconHandle(IDI_VI));

	SET_UID(mi, 0x52930e40, 0xb2ee, 0x4433, 0xad, 0x77, 0xf5, 0x42, 0xe, 0xf6, 0x57, 0xc1);
	mi.position = 2000089995;
	mi.name.a = LPGEN("Copy to clipboard");
	mi.hIcolibItem = GetIconHandle(IDI_VITOCLIP);
	mi.pszService = MS_CRASHDUMPER_STORETOCLIP;
	Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x54109094, 0x494e, 0x4535, 0x9c, 0x3a, 0xf6, 0x9e, 0x9a, 0xf7, 0xcd, 0xbe);
	mi.position = 2000089996;
	mi.name.a = LPGEN("Store to file");
	mi.hIcolibItem = GetIconHandle(IDI_VITOFILE);
	mi.pszService = MS_CRASHDUMPER_STORETOFILE;
	Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x4004f9ee, 0x2c5a, 0x420a, 0xb1, 0x54, 0x3e, 0x47, 0xc1, 0xde, 0x46, 0xec);
	mi.position = 2000089997;
	mi.name.a = LPGEN("Show");
	mi.hIcolibItem = GetIconHandle(IDI_VISHOW);
	mi.pszService = MS_CRASHDUMPER_VIEWINFO;
	Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x8526469a, 0x8ab4, 0x4dd4, 0xad, 0xbf, 0x51, 0xfd, 0x71, 0x10, 0xd3, 0x3c);
	mi.position = 2000089998;
	mi.name.a = LPGEN("Show with DLLs");
	mi.hIcolibItem = GetIconHandle(IDI_VIUPLOAD);
	mi.pszService = MS_CRASHDUMPER_VIEWINFO;
	Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);

	SET_UID(mi, 0xc6e3b558, 0xe1e8, 0x4cce, 0x96, 0x8, 0xc6, 0x89, 0x1b, 0x79, 0xf3, 0x7e);
	mi.position = 2000089999;
	mi.name.a = LPGEN("Upload");
	mi.hIcolibItem = GetIconHandle(IDI_VIUPLOAD);
	mi.pszService = MS_CRASHDUMPER_UPLOAD;
	Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0xa23da95a, 0x7624, 0x4343, 0x8c, 0xc0, 0xa6, 0x16, 0xbc, 0x30, 0x13, 0x8c);
	mi.position = 2000089999;
	mi.name.a = LPGEN("Copy link to clipboard");
	mi.hIcolibItem = GetIconHandle(IDI_LINKTOCLIP);//need icon
	mi.pszService = MS_CRASHDUMPER_URLTOCLIP;
	Menu_AddMainMenuItem(&mi);

	if (catchcrashes && !needrestart) {
		SET_UID(mi, 0xecae52f2, 0xd601, 0x4f85, 0x87, 0x9, 0xec, 0x8e, 0x84, 0xfe, 0x1b, 0x3c);
		mi.position = 2000099990;
		mi.name.a = LPGEN("Open crash report directory");
		mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
		mi.pszService = MS_CRASHDUMPER_URL;
		Menu_AddMainMenuItem(&mi);
	}

	SET_UID(mi, 0x6b19be3, 0xfb7d, 0x457d, 0x85, 0xde, 0xe0, 0x26, 0x4c, 0x87, 0x35, 0xf4);
	mi.position = 2000099991;
	mi.name.a = LPGEN("Open online Version Info");
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
	mi.pszService = MS_CRASHDUMPER_URL;
	Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);

	HOTKEYDESC hk = { 0 };
	hk.cbSize = sizeof(hk);
	hk.pszSection = PluginName;

	hk.pszDescription = LPGEN("Copy Version Info to clipboard");
	hk.pszName = "CopyVerInfo";
	hk.pszService = MS_CRASHDUMPER_STORETOCLIP;
	Hotkey_Register(&hk);

	hk.pszDescription = LPGEN("Show Version Info");
	hk.pszName = "ShowVerInfo";
	hk.pszService = MS_CRASHDUMPER_VIEWINFO;
	Hotkey_Register(&hk);

	UploadInit();

	if (catchcrashes && !needrestart)
		SetExceptionHandler();

	HookEvent(ME_TTB_MODULELOADED, ToolbarModulesLoaded);

	if (servicemode)
		ViewVersionInfo(0, 0);
	else if (db_get_b(NULL, PluginName, "UploadChanged", 0) && !ProcessVIHash(false))
		UploadVersionInfo(0, 0xa1);

	return 0;
}
コード例 #26
0
ファイル: tlen.cpp プロジェクト: Seldom/miranda-ng
void TlenProtocol::initMenuItems()
{
	char text[MAX_PATH];
	strncpy_s(text, m_szModuleName, _TRUNCATE);
	char *pSvcName = text + mir_strlen(text);

	CMenuItem mi;
	mi.root = hMenuRoot = Menu_CreateRoot(MO_MAIN, m_tszUserName, -1999901009, GetIconHandle(IDI_TLEN));
	mi.pszService = text;

	hMenuChats = NULL;

	// "Multi-User Conference"
	SET_UID(mi,0x4984828, 0x2066, 0x43da, 0x87, 0x9e, 0x71, 0x23, 0xc6, 0xe2, 0x46, 0xd5);
	mir_strcpy(pSvcName, "/MainMenuMUC");
	CreateProtoService(pSvcName, &TlenProtocol::MUCMenuHandleMUC);
	mi.name.a = LPGEN("Multi-User Conference");
	mi.position = 2000050002;
	mi.hIcolibItem = GetIconHandle(IDI_MUC);
	mi.pszService = text;
	hMenuMUC = Menu_AddMainMenuItem(&mi);

	SET_UID(mi, 0x594133f1, 0xc5b1, 0x4825, 0xa3, 0x8d, 0x33, 0x0, 0x33, 0x74, 0x3a, 0x29);
	mir_strcpy(pSvcName, "/MainMenuInbox");
	CreateProtoService(pSvcName, &TlenProtocol::MenuHandleInbox);
	mi.name.a = LPGEN("Tlen Mail");
	mi.position = 2000050003;
	mi.hIcolibItem = GetIconHandle(IDI_MAIL);
	mi.pszService = text;
	hMenuInbox = Menu_AddMainMenuItem(&mi);

	// contact menu items
	mi.root = NULL;

	// "Send picture"
	SET_UID(mi, 0x12c66fb1, 0x6e57, 0x4acd, 0x90, 0x16, 0xc, 0x83, 0xae, 0x16, 0xe3, 0x12);
	mi.pszService = "/SendPicture";
	CreateProtoService(mi.pszService, &TlenProtocol::ContactMenuHandleSendPicture);
	mi.name.a = LPGEN("Send picture");
	mi.position = -2000019030;
	mi.hIcolibItem = GetIconHandle(IDI_IMAGE);
	hMenuPicture = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// "Invite to MUC"
	SET_UID(mi, 0x4728c863, 0xe95f, 0x4203, 0x9b, 0xe8, 0x1, 0xbf, 0x5e, 0x57, 0x88, 0x43);
	mi.pszService = "/ContactMenuMUC";
	CreateProtoService(mi.pszService, &TlenProtocol::MUCContactMenuHandleMUC);
	mi.name.a = LPGEN("Multi-User Conference");
	mi.position = -2000019020;
	mi.hIcolibItem = GetIconHandle(IDI_MUC);
	hMenuContactMUC = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// "Invite to voice chat"
	SET_UID(mi, 0x53f919b6, 0x313c, 0x4ed4, 0x96, 0xbc, 0xf6, 0xa2, 0x67, 0x10, 0x7b, 0xa2);
	mi.pszService = "/ContactMenuVoice";
	CreateProtoService(mi.pszService, &TlenProtocol::VoiceContactMenuHandleVoice);
	mi.name.a = LPGEN("Voice Chat");
	mi.position = -2000019010;
	mi.hIcolibItem = GetIconHandle(IDI_VOICE);
	hMenuContactVoice = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// "Request authorization"
	SET_UID(mi, 0x36375a1f, 0xc142, 0x4d6e, 0xa6, 0x57, 0xe4, 0x76, 0x5d, 0xbc, 0x59, 0x8e);
	mi.pszService = "/RequestAuth";
	CreateProtoService(mi.pszService, &TlenProtocol::ContactMenuHandleRequestAuth);
	mi.name.a = LPGEN("Request authorization");
	mi.position = -2000001001;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
	hMenuContactRequestAuth = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// "Grant authorization"
	SET_UID(mi, 0x4c90452a, 0x869a, 0x4a81, 0xaf, 0xa8, 0x28, 0x34, 0xaf, 0x2b, 0x6b, 0x30);
	mi.pszService = "/GrantAuth";
	CreateProtoService(mi.pszService, &TlenProtocol::ContactMenuHandleGrantAuth);
	mi.name.a = LPGEN("Grant authorization");
	mi.position = -2000001000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
	hMenuContactGrantAuth = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
コード例 #27
0
ファイル: main.cpp プロジェクト: slotwin/miranda-ng
HANDLE GetIconHandle(char *szIcon)
{
	char szSettingName[64];
	mir_snprintf(szSettingName, sizeof(szSettingName), "%s_%s", MENU_NAME, szIcon);
	return Skin_GetIconHandle(szSettingName);
}
コード例 #28
0
void TlenProtocol::initMenuItems()
{
	char text[MAX_PATH];
	strncpy_s(text, m_szModuleName, _TRUNCATE);
	char *pSvcName = text + mir_strlen(text);

	CMenuItem mi;
	mi.root = hMenuRoot = Menu_CreateRoot(MO_MAIN, m_tszUserName, -1999901009, GetIconHandle(IDI_TLEN));
	mi.pszService = text;

	hMenuChats = NULL;

	// "Multi-User Conference"
	mir_strcpy(pSvcName, "/MainMenuMUC");
	CreateProtoService(pSvcName, &TlenProtocol::MUCMenuHandleMUC);
	mi.name.a = LPGEN("Multi-User Conference");
	mi.position = 2000050002;
	mi.hIcolibItem = GetIconHandle(IDI_MUC);
	mi.pszService = text;
	hMenuMUC = Menu_AddMainMenuItem(&mi);

	mir_strcpy(pSvcName, "/MainMenuInbox");
	CreateProtoService(pSvcName, &TlenProtocol::MenuHandleInbox);
	mi.name.a = LPGEN("Tlen Mail");
	mi.position = 2000050003;
	mi.hIcolibItem = GetIconHandle(IDI_MAIL);
	mi.pszService = text;
	hMenuInbox = Menu_AddMainMenuItem(&mi);

	// contact menu items
	mi.root = NULL;

	// "Send picture"
	mi.pszService = "/SendPicture";
	CreateProtoService(mi.pszService, &TlenProtocol::ContactMenuHandleSendPicture);
	mi.name.a = LPGEN("Send picture");
	mi.position = -2000019030;
	mi.hIcolibItem = GetIconHandle(IDI_IMAGE);
	hMenuPicture = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// "Invite to MUC"
	mi.pszService = "/ContactMenuMUC";
	CreateProtoService(mi.pszService, &TlenProtocol::MUCContactMenuHandleMUC);
	mi.name.a = LPGEN("Multi-User Conference");
	mi.position = -2000019020;
	mi.hIcolibItem = GetIconHandle(IDI_MUC);
	hMenuContactMUC = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// "Invite to voice chat"
	mi.pszService = "/ContactMenuVoice";
	CreateProtoService(mi.pszService, &TlenProtocol::VoiceContactMenuHandleVoice);
	mi.name.a = LPGEN("Voice Chat");
	mi.position = -2000019010;
	mi.hIcolibItem = GetIconHandle(IDI_VOICE);
	hMenuContactVoice = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// "Request authorization"
	mi.pszService = "/RequestAuth";
	CreateProtoService(mi.pszService, &TlenProtocol::ContactMenuHandleRequestAuth);
	mi.name.a = LPGEN("Request authorization");
	mi.position = -2000001001;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_REQUEST);
	hMenuContactRequestAuth = Menu_AddContactMenuItem(&mi, m_szModuleName);

	// "Grant authorization"
	mi.pszService = "/GrantAuth";
	CreateProtoService(mi.pszService, &TlenProtocol::ContactMenuHandleGrantAuth);
	mi.name.a = LPGEN("Grant authorization");
	mi.position = -2000001000;
	mi.hIcolibItem = Skin_GetIconHandle(SKINICON_AUTH_GRANT);
	hMenuContactGrantAuth = Menu_AddContactMenuItem(&mi, m_szModuleName);
}
コード例 #29
0
ファイル: icons.cpp プロジェクト: 0xmono/miranda-ng
HANDLE GetIconHandle(const char* name)
{
	return Skin_GetIconHandle(name);
}
コード例 #30
0
ファイル: vk_proto.cpp プロジェクト: truefriend-cz/miranda-ng
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);
}