Esempio n. 1
0
LRESULT RecentHubsFrame::onClickedConnect(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	int i = -1;
	while ((i = ctrlHubs.GetNextItem(i, LVNI_SELECTED)) != -1)
	{
		RecentHubEntry* entry = (RecentHubEntry*)ctrlHubs.GetItemData(i);
		HubFrame::openWindow(Text::toT(entry->getServer()));
	}
	return 0;
}
Esempio n. 2
0
LRESULT RecentHubsFrame::onDoubleClickHublist(int /*idCtrl*/, LPNMHDR pnmh, BOOL& /*bHandled*/)
{
	NMITEMACTIVATE* item = (NMITEMACTIVATE*) pnmh;
	
	if (item->iItem != -1)
	{
		RecentHubEntry* entry = (RecentHubEntry*)ctrlHubs.GetItemData(item->iItem);
		HubFrame::openWindow(Text::toT(entry->getServer()));
	}
	return 0;
}
Esempio n. 3
0
LRESULT RecentHubsFrame::onEnter(int /*idCtrl*/, LPNMHDR /* pnmh */, BOOL& /*bHandled*/)
{
	int item = ctrlHubs.GetNextItem(-1, LVNI_FOCUSED);
	
	if (item != -1)
	{
		RecentHubEntry* entry = (RecentHubEntry*)ctrlHubs.GetItemData(item);
		HubFrame::openWindow(Text::toT(entry->getServer()));
	}
	
	return 0;
}
Esempio n. 4
0
LRESULT RecentHubsFrame::onEdit(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/)
{
	int i = -1;
	if ((i = ctrlHubs.GetNextItem(i, LVNI_SELECTED)) != -1)
	{
		RecentHubEntry* r = (RecentHubEntry*)ctrlHubs.GetItemData(i);
		dcassert(r != NULL);
		LineDlg dlg;
		dlg.description = TSTRING(DESCRIPTION);
		dlg.title = Text::toT(r->getName());
		dlg.line = Text::toT(r->getDescription());
		if (dlg.DoModal(m_hWnd) == IDOK)
		{
			r->setDescription(Text::fromT(dlg.line));
			ctrlHubs.SetItemText(i, COLUMN_DESCRIPTION, Text::toT(r->getDescription()).c_str());
		}
	}
	return 0;
}
Esempio n. 5
0
void FavoriteHubsFrame::openSelected()
{
	if (!checkNick())
		return;
		
	int i = -1;
	while ((i = ctrlHubs.GetNextItem(i, LVNI_SELECTED)) != -1)
	{
		FavoriteHubEntry* entry = (FavoriteHubEntry*)ctrlHubs.GetItemData(i);
		RecentHubEntry r;
		r.setName(entry->getName());
		r.setDescription(entry->getDescription());
		r.setUsers("*");
		r.setShared("*");
		r.setServer(entry->getServer());
		FavoriteManager::getInstance()->addRecent(r);
		HubFrame::openWindow(true,
		                     entry->getServer(),
		                     entry->getName(),
		                     entry->getRawOne(),
		                     entry->getRawTwo(),
		                     entry->getRawThree(),
		                     entry->getRawFour(),
		                     entry->getRawFive(),
		                     entry->getWindowPosX(),
		                     entry->getWindowPosY(),
		                     entry->getWindowSizeX(),
		                     entry->getWindowSizeY(),
		                     entry->getWindowType(),
		                     entry->getChatUserSplit(),
		                     entry->getUserListState(),
		                     entry->getSuppressChatAndPM());
	}
	return;
}
Esempio n. 6
0
void PublicHubsFrame::openHub(int ind) // [+] IRainman fix.
{
	RecentHubEntry r;
	r.setName(m_ctrlHubs.ExGetItemText(ind, COLUMN_NAME));
	r.setDescription(m_ctrlHubs.ExGetItemText(ind, COLUMN_DESCRIPTION));
	r.setUsers(m_ctrlHubs.ExGetItemText(ind, COLUMN_USERS));
	r.setShared(m_ctrlHubs.ExGetItemText(ind, COLUMN_SHARED));
	const string l_server = Util::formatDchubUrl(m_ctrlHubs.ExGetItemText(ind, COLUMN_SERVER));
	r.setServer(l_server);
	FavoriteManager::getInstance()->addRecent(r);
	
	HubFrame::openWindow(false, l_server);
}
void FavoriteHubsFrame::openSelected() {
	if(!checkNick())
		return;
	
	int i = -1;
	while( (i = ctrlHubs.GetNextItem(i, LVNI_SELECTED)) != -1) {
		FavoriteHubEntry* entry = (FavoriteHubEntry*)ctrlHubs.GetItemData(i);
		RecentHubEntry r;
		r.setName(entry->getName());
		r.setDescription(entry->getDescription());
		r.setUsers("*");
		r.setShared("*");
		r.setServer(entry->getServer());
		FavoriteManager::getInstance()->addRecent(r);
		HubFrame::openWindow(Text::toT(entry->getServer())
			, entry->getChatUserSplit(), entry->getUserListState());
	}
	return;
}