Esempio n. 1
0
void skypetab::SkypeTab::onSetContextMenu(QMenu *menu)
{
	stage2Init();
	if(_instance->_trayMenu!=0)
		return;
	_instance->_trayMenu=menu;
	connect(menu, SIGNAL(aboutToShow()),_instance, SLOT(onMenuShow()));
	_instance->onMenuShow();
}
Esempio n. 2
0
void SkypeTab::onTrayMenuActivated(QSystemTrayIcon::ActivationReason reason)
{
	stage2Init();
	if(reason!=QSystemTrayIcon::Context)
	{
		onTrayIcon();
	}
	else
	{
		raiseTrayMenuActivated(reason);
		if(_trayMenu==0)
		{
			if (_trayIcon==0)
				_trayIcon=qobject_cast<QSystemTrayIcon*>(sender());

			_trayMenu=_trayIcon->contextMenu();
			connect(_trayMenu, SIGNAL(aboutToShow()),this, SLOT(onMenuShow()));
			onMenuShow();
		}
	}
}