Bug 164949. Enable/Disable menu item when Firefox tab is selected.

This commit is contained in:
Jim Norman 2006-04-13 14:46:10 +00:00
parent e9676d12af
commit 7684bc7aee
3 changed files with 29 additions and 15 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Apr 13 08:43:10 MST 2006 - jnorman@novell.com
- Bug 164949. Fix 'New Secret' menu option when FireFox tab is selected.
Comment out fix for 164181 (see below). SessionId is not implemented
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 13 07:01:10 MST 2006 - jnorman@novell.com Thu Apr 13 07:01:10 MST 2006 - jnorman@novell.com
- Bug 164181. Prevent multiple instances of CASA Manager on windows. - Bug 164181. Prevent multiple instances of CASA Manager on windows.

View File

@ -770,7 +770,10 @@ namespace Novell.CASA.GUI
switch(notebookStores.CurrentPage) switch(notebookStores.CurrentPage)
{ {
case Common.STORE_MICASA: case Common.STORE_MICASA:
mmiNew.Sensitive = true;
if( 0 != objMiCasa.tvSecretIDMiCasa.Selection.CountSelectedRows() ) if( 0 != objMiCasa.tvSecretIDMiCasa.Selection.CountSelectedRows() )
{ {
mmiNew.Sensitive = mmiNewKey.Sensitive = true; mmiNew.Sensitive = mmiNewKey.Sensitive = true;
@ -796,6 +799,9 @@ namespace Novell.CASA.GUI
break; break;
case Common.STORE_KDEWALLET: case Common.STORE_KDEWALLET:
mmiNew.Sensitive = true;
if( 0 != objKdeWallet.tvSecretIDKdeWallet.Selection.CountSelectedRows() ) if( 0 != objKdeWallet.tvSecretIDKdeWallet.Selection.CountSelectedRows() )
{ {
mmiNew.Sensitive = mmiNewKey.Sensitive = true; mmiNew.Sensitive = mmiNewKey.Sensitive = true;
@ -807,6 +813,9 @@ namespace Novell.CASA.GUI
break; break;
case Common.STORE_GNOMEKEYRING: case Common.STORE_GNOMEKEYRING:
mmiNew.Sensitive = true;
if( 0 != objGnomeKeyring.tvSecretIDGnomeKeyring.Selection.CountSelectedRows() ) if( 0 != objGnomeKeyring.tvSecretIDGnomeKeyring.Selection.CountSelectedRows() )
{ {
mmiNew.Sensitive = mmiNewKey.Sensitive = true; mmiNew.Sensitive = mmiNewKey.Sensitive = true;

View File

@ -259,22 +259,22 @@ public class Common
} }
else if( true == IS_WINDOWS ) else if( true == IS_WINDOWS )
{ {
#if DOTNET2
Process current = Process.GetCurrentProcess(); Process current = Process.GetCurrentProcess();
Process[] p = System.Diagnostics.Process.GetProcessesByName("CASAManager"); Process[] p = System.Diagnostics.Process.GetProcessesByName("CASAManager");
int i = 0; int i = 0;
foreach (Process proc in p) foreach (Process proc in p)
{ {
Console.WriteLine(proc.SessionId); if (proc.SessionId == current.SessionId)
if (proc.SessionId == current.SessionId) i++;
i++; }
}
if (i > 1)
if (i > 1)
bRet = true; bRet = true;
else else
bRet = false; bRet = false;
#endif
} }
return bRet; return bRet;
} }