Bug 141689. Prevent multiple menus.

This commit is contained in:
Jim Norman 2006-01-06 23:08:58 +00:00
parent ef80fd0ac5
commit 95544542e0
2 changed files with 309 additions and 295 deletions

View File

@ -1,3 +1,7 @@
-------------------------------------------------------------------
Fri Jan 6 16:06:03 MST 2006 - jnorman@novell.com
- Bug 141689. Prevent multiple menus.
-------------------------------------------------------------------
Fri Jan 6 17:44:03 IST 2006 - smanojna@novell.com

View File

@ -29,6 +29,7 @@ namespace Novell.CASA.GUI
#endif
private static CasaMain mCasaMain = null;
private Menu popupMenu = null;
public CasaTray(CasaMain casaInstance)
{
@ -114,7 +115,15 @@ namespace Novell.CASA.GUI
private void ShowContextMenu()
{
Menu popupMenu = new Menu(); // creates the menu
if (popupMenu != null && popupMenu.Visible)
{
popupMenu.Destroy();
}
if (popupMenu == null || !popupMenu.Visible)
{
popupMenu = new Menu(); // creates the menu
MenuItem miSep = new MenuItem();
MenuItem miSep2 = new MenuItem();
@ -184,6 +193,7 @@ namespace Novell.CASA.GUI
popupMenu.Popup();
}
}
private void OnImageClick (object o, ButtonPressEventArgs args) // handler for mouse click
{