<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>I am having trouble understanding the following code about mVBox.SetExtraData  to "0". How does this check whether tray icon died? shouldn't <FONT color=#0000ff>if</FONT><FONT size=2> (mVBox.isOk()) be <FONT color=#0000ff>if</FONT><FONT size=2> ( ! mVBox.isOk()) ? </FONT></FONT></DIV>
<DIV> </DIV>
<DIV>This cleans up the tray winid, and will make TrayIcon not singleton.</DIV>
<DIV> </DIV><FONT color=#0000ff size=2><FONT color=#0000ff size=2>
<DIV>bool</FONT></FONT><FONT size=2> VBoxGlobal::trayIconInstall()</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>int</FONT></FONT><FONT size=2> rc = 0;</DIV>
<DIV>QString strTrayWinID = mVBox.GetExtraData (VBoxDefs::GUI_TrayIconWinID);</DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>false</FONT></FONT><FONT size=2> == strTrayWinID.isEmpty())</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>/* Check if current tray icon is alive by writing some bogus value. */</DIV></FONT></FONT><FONT size=2>
<DIV>mVBox.SetExtraData (VBoxDefs::GUI_TrayIconWinID, </FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>"0"</FONT></FONT><FONT size=2>);</DIV>
<DIV></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>if</FONT></FONT><FONT size=2> (mVBox.isOk())</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>/* Current tray icon died - clean up. */</DIV></FONT></FONT><FONT size=2>
<DIV>mVBox.SetExtraData (VBoxDefs::GUI_TrayIconWinID, NULL);</DIV>
<DIV>strTrayWinID.clear();</DIV>
<DIV>}</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV> </DIV></FONT></td></tr></table>