I am having trouble understanding the following code about mVBox.SetExtraData  
to "0". How does this check whether tray icon died? shouldn't if (mVBox.isOk()) 
be if ( ! mVBox.isOk()) ? 
 
This cleans up the tray winid, and will make TrayIcon not singleton.
 
bool VBoxGlobal::trayIconInstall()
{
int rc = 0;
QString strTrayWinID = mVBox.GetExtraData (VBoxDefs::GUI_TrayIconWinID);
if (false == strTrayWinID.isEmpty())
{
/* Check if current tray icon is alive by writing some bogus value. */
mVBox.SetExtraData (VBoxDefs::GUI_TrayIconWinID, "0");
if (mVBox.isOk())
{
/* Current tray icon died - clean up. */
mVBox.SetExtraData (VBoxDefs::GUI_TrayIconWinID, NULL);
strTrayWinID.clear();
}
}
 
 
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev

Reply via email to