Example #1
0
void Daemon::CheckTrayIcon() {
	vnclog.Print(8, _T("Checking tray icon\n"));
	if (!SendTrayMsg(NIM_MODIFY)) {
		vnclog.Print(4, _T("Tray icon not there - reinstalling\n"));
		AddTrayIcon();
	};
}
Example #2
0
void Daemon::CheckTrayIcon() {
	Log::info(_T("Checking tray icon\n"));
	if (!SendTrayMsg(NIM_MODIFY)) {
		Log::message(_T("Tray icon not there - reinstalling\n"));
		AddTrayIcon();
	};
}
Example #3
0
void
vncMenu::AddTrayIcon()
{
	//vnclog.Print(LL_INTERR, VNCLOG("########### vncMenu::AddTrayIcon \n"));
	vnclog.Print(LL_INTERR, VNCLOG("########### vncMenu::AddTrayIcon - UserName = %s\n"), m_username);

	// If the user name is non-null then we have a user!
	if (strcmp(m_username, "") != 0 && strcmp(m_username, "SYSTEM") != 0)
	{
		//vnclog.Print(LL_INTERR, VNCLOG("########### vncMenu::AddTrayIcon - User exists\n"));
		// Make sure the server has not been configured to
		// suppress the tray icon.
		HWND tray = FindWindow(("Shell_TrayWnd"), 0);
		if (!tray)
		{
			IsIconSet=false;
			vnclog.Print(LL_INTERR, VNCLOG("########### vncMenu::AddTrayIcon - User exists, traywnd is not found reset when counter reach %i=20\n"),IconFaultCounter);
			IconFaultCounter++;
			m_server->TriggerUpdate();
			return;
		}
		else
		{
			vnclog.Print(LL_INTERR, VNCLOG("########### vncMenu::AddTrayIcon - ADD Tray Icon call\n"));
		}

		if (osvi.dwPlatformId==VER_PLATFORM_WIN32_NT && osvi.dwMinorVersion==0 && osvi.dwMajorVersion==5)
		{
			if ( ! m_server->GetDisableTrayIcon())
				{
					vnclog.Print(LL_INTERR, VNCLOG("########### Shell_TrayWnd found %i\n"),IsIconSet);
					SendTrayMsg(NIM_ADD, FALSE);
				}
		}
		else
		{
			vnclog.Print(LL_INTERR, VNCLOG("########### Shell_TrayWnd found %i\n"),IsIconSet);
			SendTrayMsg(NIM_ADD, FALSE);
		}
		if (m_server->AuthClientCount() != 0) { //PGM @ Advantig
			if (m_server->RemoveWallpaperEnabled()) //PGM @ Advantig
				KillWallpaper(); //PGM @ Advantig
			if (m_server->RemoveAeroEnabled()) //PGM @ Advantig
				DisableAero(); //PGM @ Advantig
		} //PGM @ Advantig
	}
}
void
vncMenu::AddTrayIcon()
{
	// If the user name is non-null then we have a user!
	if (strcmp(m_username, "") != 0)
	{
		// Make sure the server has not been configured to
		// suppress the tray icon.
		if ( ! m_server->GetDisableTrayIcon())
		{
			SendTrayMsg(NIM_ADD, FALSE);
		}
	}
}
void
vncMenu::FlashTrayIcon(BOOL flash)
{
	SendTrayMsg(NIM_MODIFY, flash);
}
void
vncMenu::DelTrayIcon()
{
	SendTrayMsg(NIM_DELETE, FALSE);
}
Example #7
0
void upsMenu::UpdateTrayIcon()
{
   SendTrayMsg(NIM_MODIFY);
}
Example #8
0
void upsMenu::DelTrayIcon()
{
   SendTrayMsg(NIM_DELETE);
}
Example #9
0
void upsMenu::AddTrayIcon()
{
   SendTrayMsg(NIM_ADD);
}
Example #10
0
void Daemon::RemoveTrayIcon() {
	vnclog.Print(4, _T("Deleting tray icon\n"));
	SendTrayMsg(NIM_DELETE);
}
Example #11
0
void Daemon::AddTrayIcon() {
	vnclog.Print(4, _T("Adding tray icon\n"));
	SendTrayMsg(NIM_ADD);
}
Example #12
0
void
vncMenu::FlashTrayIcon(BOOL flash)
{
	//vnclog.Print(LL_INTERR, VNCLOG("########### vncMenu::FlashTrayIcon - FLASH Tray Icon call\n"));
	SendTrayMsg(NIM_MODIFY, flash);
}
Example #13
0
void
vncMenu::DelTrayIcon()
{
	//vnclog.Print(LL_INTERR, VNCLOG("########### vncMenu::DelTrayIcon - DEL Tray Icon call\n"));
	SendTrayMsg(NIM_DELETE, FALSE);
}
Example #14
0
void Daemon::RemoveTrayIcon() {
	Log::message(_T("Deleting tray icon\n"));
	SendTrayMsg(NIM_DELETE);
}
Example #15
0
void Daemon::AddTrayIcon() {
	Log::message(_T("Adding tray icon\n"));
	SendTrayMsg(NIM_ADD);
}