diff --git a/CASA.changes b/CASA.changes index 16bb6d38..fc2920f0 100644 --- a/CASA.changes +++ b/CASA.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Nov 11 08:26:50 MST 2005 - jnorman@novell.com + +- Added help files, and code to launch help files to GUI + ------------------------------------------------------------------- Thu Nov 10 12:32:38 MST 2005 - jnorman@novell.com diff --git a/c_gui/CasaMain.cs b/c_gui/CasaMain.cs index 0a09cbcf..c1a3ce88 100644 --- a/c_gui/CasaMain.cs +++ b/c_gui/CasaMain.cs @@ -7,567 +7,574 @@ ///################################################################# -namespace Novell.CASA.GUI { +namespace Novell.CASA.GUI +{ -using System; -using System.IO; -using System.Diagnostics; -using Gtk; -using Glade; -using Novell.CASA; -using Novell.CASA.MiCasa.Common; -using Novell.CASA.MiCasa.Communication; + using System; + using System.IO; + using System.Diagnostics; + using Gtk; + using Glade; + using Novell.CASA; + using Novell.CASA.MiCasa.Common; + using Novell.CASA.MiCasa.Communication; #if W32 -using Microsoft.Win32; + using Microsoft.Win32; #endif -public class CasaMain -{ - public MiCasa objMiCasa = null; - public Firefox objFirefox = null; - public Mozilla objMozilla = null; - public KdeWallet objKdeWallet = null; - public GnomeKeyring objGnomeKeyring = null; + public class CasaMain + { + public MiCasa objMiCasa = null; + public Firefox objFirefox = null; + public Mozilla objMozilla = null; + public KdeWallet objKdeWallet = null; + public GnomeKeyring objGnomeKeyring = null; - public static Glade.XML gxml; + public static Glade.XML gxml; - int loginPromptCount = 3; + int loginPromptCount = 3; - #region Glade Widgets + #region Glade Widgets - [Glade.Widget] - Gtk.Window windowMain, - windowLog; + [Glade.Widget] + Gtk.Window windowMain, + windowLog; - [Glade.Widget] - Gtk.TreeView tvLog; + [Glade.Widget] + Gtk.TreeView tvLog; - [Glade.Widget] - Gtk.Notebook notebookStores; + [Glade.Widget] + Gtk.Notebook notebookStores; - [Glade.Widget] - Gtk.Dialog dialogPersistentStorage, - dialogPreferences, - dialogAbout, - dialogLogin, - dialogLoginContinue, - dialogConfirmRefresh, - dialogSingleInstance, - dialogLoginReprompt, - dialogShortPassword, - dialogResetMP; + [Glade.Widget] + Gtk.Dialog dialogPersistentStorage, + dialogPreferences, + dialogAbout, + dialogLogin, + dialogLoginContinue, + dialogConfirmRefresh, + dialogSingleInstance, + dialogLoginReprompt, + dialogShortPassword, + dialogResetMP; - [Glade.Widget] - Gtk.Entry entryMasterPassword1, - entryMasterPassword2, - entryMasterPassword3, - entryMasterPassword4, - entryOldMP, - entryNewMP1, - entryNewMP2; + [Glade.Widget] + Gtk.Entry entryMasterPassword1, + entryMasterPassword2, + entryMasterPassword3, + entryMasterPassword4, + entryOldMP, + entryNewMP1, + entryNewMP2; - [Glade.Widget] - Gtk.CheckButton checkbuttonFirefox, - checkbuttonMozilla, - checkbuttonGnomeKeyring, - checkbuttonKdeWallet; + [Glade.Widget] + Gtk.CheckButton checkbuttonFirefox, + checkbuttonMozilla, + checkbuttonGnomeKeyring, + checkbuttonKdeWallet; - [Glade.Widget] - Gtk.Label label88, - labelLoginContinue1, - labelLoginContinue2; + [Glade.Widget] + Gtk.Label label88, + labelLoginContinue1, + labelLoginContinue2; - [Glade.Widget] - Gtk.Button okbuttonPersistentStorage; + [Glade.Widget] + Gtk.Button okbuttonPersistentStorage, + buttonNovell; - [Glade.Widget] - Gtk.MenuItem mmiNew, - mmiNewKey, - mmiView, - mmiLink, - mmiCopy, - mmiDelete, - mmiRefresh, - mmiLockSecrets, - mmiUnlockSecrets, - mmiDestroySecrets, - mmiEdit, - mmiOptions, - mmiDebug; - [Glade.Widget] - Gtk.CheckMenuItem mmiShowTaskIcon; + [Glade.Widget] + Gtk.MenuItem mmiNew, + mmiNewKey, + mmiView, + mmiLink, + mmiCopy, + mmiDelete, + mmiRefresh, + mmiLockSecrets, + mmiUnlockSecrets, + mmiDestroySecrets, + mmiEdit, + mmiOptions, + mmiDebug; + [Glade.Widget] + Gtk.CheckMenuItem mmiShowTaskIcon; - #endregion + #endregion - public static CasaTray mCasaTray = null; - public static bool m_bShowDebug = false; - public static bool m_bNotifyUser = true; + public static CasaTray mCasaTray = null; + public static bool m_bShowDebug = false; + public static bool m_bNotifyUser = true; - ///####################################################################### - /// MAIN + ///####################################################################### + /// MAIN - /// - /// The main entry point for the CASA application. - /// - [STAThread] - public static void Main(string[] args) - { - Logger.DbgLog("GUI:CasaMain.Main() - BEGIN"); - - Common.ReadPlatform(); - - Application.Init(); - - try + /// + /// The main entry point for the CASA application. + /// + [STAThread] + public static void Main(string[] args) { - if (Common.IsArgSet(args, Common.ARG_DEBUG)) - m_bShowDebug = true; + Logger.DbgLog("GUI:CasaMain.Main() - BEGIN"); - // ping micasad - Ping ping = new Ping(); - ping.clientmessage = "Hello micasad"; - MiCasaRequestReply.Send(MiCasaRequestReply.VERB_PING_MICASAD,ping); + Common.ReadPlatform(); + + Application.Init(); + + try + { + if (Common.IsArgSet(args, Common.ARG_DEBUG)) + m_bShowDebug = true; + + // ping micasad + Ping ping = new Ping(); + ping.clientmessage = "Hello micasad"; + MiCasaRequestReply.Send(MiCasaRequestReply.VERB_PING_MICASAD,ping); - new CasaMain(args); - Application.Run(); + new CasaMain(args); + Application.Run(); - } - catch (Exception e) - { - string message = "miCASA services are not available"; + } + catch (Exception e) + { + string message = "miCASA services are not available"; - if (m_bShowDebug) - message = e.ToString(); + if (m_bShowDebug) + message = e.ToString(); - MessageDialog md=new MessageDialog(null,Gtk.DialogFlags.Modal, - Gtk.MessageType.Error, - Gtk.ButtonsType.Close, - message); + MessageDialog md=new MessageDialog(null,Gtk.DialogFlags.Modal, + Gtk.MessageType.Error, + Gtk.ButtonsType.Close, + message); - md.Response+=new ResponseHandler(md_ResponseCloseWindow); - md.SetPosition(Gtk.WindowPosition.CenterAlways); - md.Show(); - Application.Run(); - } + md.Response+=new ResponseHandler(md_ResponseCloseWindow); + md.SetPosition(Gtk.WindowPosition.CenterAlways); + md.Show(); + Application.Run(); + } - Logger.DbgLog("GUI:CasaMain.Main() - END"); - } + Logger.DbgLog("GUI:CasaMain.Main() - END"); + } - ///####################################################################### - /// CONSTRUCTOR + ///####################################################################### + /// CONSTRUCTOR - /// - /// CasaMain constructor funtion. - /// - public CasaMain(string[] args) - { - Logger.DbgLog("GUI:CasaMain.CasaMain() - BEGIN"); + /// + /// CasaMain constructor funtion. + /// + public CasaMain(string[] args) + { + Logger.DbgLog("GUI:CasaMain.CasaMain() - BEGIN"); - if( false == Common.CheckForSingleInstance() ) - { - MasterPasswordAuthentication(); + if( false == Common.CheckForSingleInstance() ) + { + MasterPasswordAuthentication(); - if (Common.IsTrayAvailable()) // && Common.IsArgSet(args, Common.ARG_SHOW_TRAY_ICON)) - { - try + if (Common.IsTrayAvailable()) // && Common.IsArgSet(args, Common.ARG_SHOW_TRAY_ICON)) { - if (mCasaTray == null) - mCasaTray = new CasaTray(); + try + { + if (mCasaTray == null) + mCasaTray = new CasaTray(); + } + catch{} } - catch{} - } - } - else - { - Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogSingleInstance", null); - gxmlTemp.Autoconnect(this); - } - - Logger.DbgLog("GUI:CasaMain.CasaMain() - END"); - } - - - - ///####################################################################### - /// INITIALIZE MAIN GUI - - /// - /// Main GUI initializing routine. This routine builds the Main window of CASA. - /// - public void InitializeGUI() - { - Logger.DbgLog("GUI:CasaMain.InitializeGUI() - BEGIN"); - - gxml = new Glade.XML(Common.GladeFile, "windowMain", null); - gxml.Autoconnect(this); - - if (!m_bShowDebug) - mmiDebug.Hide(); - - - windowMain.DeleteEvent += new DeleteEventHandler(OnWindowMainDeleted); - - /// PLATFORM SPECIFIC GUI CHANGES - //ConfigureGUI(); - - /// POLICY INIT - StorePolicyInterface.Init(); - - Logger.DbgLog("GUI:CasaMain.InitializeGUI() - miCASA policy = " + Common.IS_MICASA); - Logger.DbgLog("GUI:CasaMain.InitializeGUI() - Firefox policy = " + Common.IS_FIREFOX); - Logger.DbgLog("GUI:CasaMain.InitializeGUI() - Mozilla policy = " + Common.IS_MOZILLA); - Logger.DbgLog("GUI:CasaMain.InitializeGUI() - KdeWallet policy = " + Common.IS_KDEWALLET); - Logger.DbgLog("GUI:CasaMain.InitializeGUI() - GNOME Keyring policy = " + Common.IS_GNOMEKEYRING); - - /// STOREDATA INIT - StoreDataInterface.Init(); - - if( Common.IS_MICASA ) - { - Logger.DbgLog("GUI:CasaMain.new MiCasa()."); - objMiCasa = new MiCasa(); - } - else - (notebookStores.GetNthPage(Common.STORE_MICASA)).Visible = Common.IS_MICASA; - - if( Common.IS_FIREFOX ) - { - Logger.DbgLog("GUI:CasaMain.new Firefox()."); - objFirefox = new Firefox(); - } - else - (notebookStores.GetNthPage(Common.STORE_FIREFOX)).Visible = Common.IS_FIREFOX; - - if( Common.IS_MOZILLA ) - { - Logger.DbgLog("GUI:CasaMain.new Mozilla()."); - objMozilla = new Mozilla(); - } - else - (notebookStores.GetNthPage(Common.STORE_MOZILLA)).Visible = Common.IS_MOZILLA; - - if( Common.IS_KDEWALLET ) - { - Logger.DbgLog("GUI:CasaMain.new KdeWallet()."); - objKdeWallet = new KdeWallet(); - } - else - (notebookStores.GetNthPage(Common.STORE_KDEWALLET)).Visible = Common.IS_KDEWALLET; - - if( Common.IS_GNOMEKEYRING ) - { - Logger.DbgLog("GUI:CasaMain.new GnomeKeyring()."); - objGnomeKeyring = new GnomeKeyring(); - } - else - (notebookStores.GetNthPage(Common.STORE_GNOMEKEYRING)).Visible = Common.IS_GNOMEKEYRING; - - notebookStores.CurrentPage = Common.STORE_MICASA; - - if (MiCASAStore.IsLocked()) - LockGUI(); - else - UnlockGUI(); - - windowMain.Show(); - - Logger.DbgLog("GUI:CasaMain.InitializeGUI() - END"); - } - - - - ///####################################################################### - /// MASTER PASSWORD AUTHENTICATION - - /// - /// This routine implements the MasterPassword authentication. - /// - public void MasterPasswordAuthentication() - { - Logger.DbgLog("GUI:CasaMain.Login() - BEGIN"); - - if( true == IsMasterPasswordSet() ) - { - Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned true"); - - if( false == miCASA.IsSecretPersistent(1,"") ) - { - Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned false"); - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLogin", null); - gxmlTemp.Autoconnect (this); - dialogLogin.TransientFor = windowMain; - entryMasterPassword3.Text=""; - label88.Hide(); - entryMasterPassword4.Hide(); - } - else - { - Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned true"); - InitializeGUI(); - } - } - else - { - Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned false"); - - Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null); - gxmlTemp.Autoconnect(this); - entryMasterPassword3.Text=""; - entryMasterPassword4.Text=""; - } - - Logger.DbgLog("GUI:CasaMain.Login() - END"); - } - - - - public void okbuttonLogin_clicked(object abj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - BEGIN"); - - if( true == entryMasterPassword4.Visible ) - { - if( entryMasterPassword3.Text.Length < 8 ) - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogShortPassword", null); - gxmlTemp.Autoconnect (this); - - } - else if(entryMasterPassword3.Text != "" && (entryMasterPassword3.Text == entryMasterPassword4.Text) && entryMasterPassword3.Text.Length >= 8) - { - miCASA.SetMasterPassword(0, entryMasterPassword3.Text); - MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text); - dialogLogin.Destroy(); - InitializeGUI(); - } - else - { - entryMasterPassword3.Text=""; - entryMasterPassword4.Text=""; - entryMasterPassword3.HasFocus=true; - } - } - else - { - if( 0 == miCASA.SetMasterPassword(0, entryMasterPassword3.Text) ) - { - MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text); - dialogLogin.Destroy(); - InitializeGUI(); - } - else - { - Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - MasterPassword verification failed."); - //dialogLogin.Destroy(); - //LoginContinue("Master Password verfication failed", "The store will not be persistent"); - loginPromptCount--; - dialogLogin.Hide(); - - if( loginPromptCount > 0 ) - { - dialogLogin.Show(); - entryMasterPassword3.Text=""; } else - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLoginReprompt", null); - gxmlTemp.Autoconnect (this); - } - } - } - - Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - END"); - } - - internal void on_buttonRetryRepropmt_clicked(object obj, EventArgs args) - { - dialogLoginReprompt.Destroy(); - dialogLogin.Show(); - entryMasterPassword3.Text=""; - loginPromptCount = 3; - } - - internal void on_buttonRetryShortPassword_clicked(object obj, EventArgs args) - { - dialogShortPassword.Destroy(); - entryMasterPassword3.Text = ""; - entryMasterPassword4.Text = ""; - entryMasterPassword3.HasFocus = true; - } - - internal void on_buttonCloseReprompt_clicked(object obj, EventArgs args) - { - dialogLoginReprompt.Destroy(); - dialogLogin.Destroy(); - HandleQuit(); - } - - public void closebuttonLogin_clicked(object abj, EventArgs args) - { - dialogLogin.Destroy(); - HandleQuit(); - } - - - public void OnDialogLoginDeleted(object obj, DeleteEventArgs args) - { - Logger.DbgLog("GUI:CasaMain.OnDialogLoginDeleted() - BEGIN"); - - HandleQuit(); - args.RetVal = true; - - Logger.DbgLog("GUI:CasaMain.OnDialogLoginDeleted() - END"); - } - - public void on_entryMasterPassword3_activate(object obj, EventArgs args) - { - if( true == entryMasterPassword4.Visible ) - entryMasterPassword4.HasFocus = true; - else if( "" != entryMasterPassword3.Text ) - okbuttonLogin_clicked(obj, args); - } - - public void on_entryMasterPassword4_activate(object obj, EventArgs args) - { - okbuttonLogin_clicked(obj, args); - } - - public bool IsMasterPasswordSet() - { - Logger.DbgLog("GUI:CasaMain.IsMasterPasswordSet() - BEGIN"); - - string MICASA_PASSCODE_BY_MASTER_PASSWD_FILE = "/.miCASAPCByMPasswd"; - string fileName = GetUserHomeDir() + MICASA_PASSCODE_BY_MASTER_PASSWD_FILE; - - Logger.DbgLog("GUI:CasaMain.IsMasterPasswordSet() - END"); - return (File.Exists(fileName)); - } - - private string GetUserHomeDir() - { - if (Common.IS_LINUX) - return Environment.GetEnvironmentVariable("HOME"); - else - return Environment.GetEnvironmentVariable("USERPROFILE"); + { + Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogSingleInstance", null); + gxmlTemp.Autoconnect(this); + } - } + Logger.DbgLog("GUI:CasaMain.CasaMain() - END"); + } - ///####################################################################### - /// LOGIN WARNING DIALOG - /// - /// Error dialog prompt for MasterPassword authentication - /// - public void LoginContinue(string LabelMain, string LabelTips) - { - Logger.DbgLog("GUI:CasaMain.LoginContinue() - BEGIN"); + + ///####################################################################### + /// INITIALIZE MAIN GUI + + /// + /// Main GUI initializing routine. This routine builds the Main window of CASA. + /// + public void InitializeGUI() + { + Logger.DbgLog("GUI:CasaMain.InitializeGUI() - BEGIN"); + + gxml = new Glade.XML(Common.GladeFile, "windowMain", null); + gxml.Autoconnect(this); + + if (!m_bShowDebug) + mmiDebug.Hide(); + + + windowMain.DeleteEvent += new DeleteEventHandler(OnWindowMainDeleted); + + /// PLATFORM SPECIFIC GUI CHANGES + //ConfigureGUI(); + + /// POLICY INIT + StorePolicyInterface.Init(); + + Logger.DbgLog("GUI:CasaMain.InitializeGUI() - miCASA policy = " + Common.IS_MICASA); + Logger.DbgLog("GUI:CasaMain.InitializeGUI() - Firefox policy = " + Common.IS_FIREFOX); + Logger.DbgLog("GUI:CasaMain.InitializeGUI() - Mozilla policy = " + Common.IS_MOZILLA); + Logger.DbgLog("GUI:CasaMain.InitializeGUI() - KdeWallet policy = " + Common.IS_KDEWALLET); + Logger.DbgLog("GUI:CasaMain.InitializeGUI() - GNOME Keyring policy = " + Common.IS_GNOMEKEYRING); + + /// STOREDATA INIT + StoreDataInterface.Init(); + + if( Common.IS_MICASA ) + { + Logger.DbgLog("GUI:CasaMain.new MiCasa()."); + objMiCasa = new MiCasa(); + } + else + (notebookStores.GetNthPage(Common.STORE_MICASA)).Visible = Common.IS_MICASA; + + if( Common.IS_FIREFOX ) + { + Logger.DbgLog("GUI:CasaMain.new Firefox()."); + objFirefox = new Firefox(); + } + else + (notebookStores.GetNthPage(Common.STORE_FIREFOX)).Visible = Common.IS_FIREFOX; + + if( Common.IS_MOZILLA ) + { + Logger.DbgLog("GUI:CasaMain.new Mozilla()."); + objMozilla = new Mozilla(); + } + else + (notebookStores.GetNthPage(Common.STORE_MOZILLA)).Visible = Common.IS_MOZILLA; + + if( Common.IS_KDEWALLET ) + { + Logger.DbgLog("GUI:CasaMain.new KdeWallet()."); + objKdeWallet = new KdeWallet(); + } + else + (notebookStores.GetNthPage(Common.STORE_KDEWALLET)).Visible = Common.IS_KDEWALLET; + + if( Common.IS_GNOMEKEYRING ) + { + Logger.DbgLog("GUI:CasaMain.new GnomeKeyring()."); + objGnomeKeyring = new GnomeKeyring(); + } + else + (notebookStores.GetNthPage(Common.STORE_GNOMEKEYRING)).Visible = Common.IS_GNOMEKEYRING; + + notebookStores.CurrentPage = Common.STORE_MICASA; + + if (MiCASAStore.IsLocked()) + LockGUI(); + else + UnlockGUI(); + + windowMain.Show(); + + Logger.DbgLog("GUI:CasaMain.InitializeGUI() - END"); + } + + + + ///####################################################################### + /// MASTER PASSWORD AUTHENTICATION + + /// + /// This routine implements the MasterPassword authentication. + /// + public void MasterPasswordAuthentication() + { + Logger.DbgLog("GUI:CasaMain.Login() - BEGIN"); + + if( true == IsMasterPasswordSet() ) + { + Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned true"); + + if( false == miCASA.IsSecretPersistent(1,"") ) + { + Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned false"); + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLogin", null); + gxmlTemp.Autoconnect (this); + dialogLogin.TransientFor = windowMain; + entryMasterPassword3.Text=""; + label88.Hide(); + entryMasterPassword4.Hide(); + } + else + { + Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned true"); + InitializeGUI(); + } + } + else + { + Logger.DbgLog("GUI:CasaMain.Login() - IsMasterPasswordSet returned false"); + + Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLogin", null); + gxmlTemp.Autoconnect(this); + entryMasterPassword3.Text=""; + entryMasterPassword4.Text=""; + } + + Logger.DbgLog("GUI:CasaMain.Login() - END"); + } + + + + public void okbuttonLogin_clicked(object abj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - BEGIN"); + + if( true == entryMasterPassword4.Visible ) + { + if( entryMasterPassword3.Text.Length < 8 ) + { + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogShortPassword", null); + gxmlTemp.Autoconnect (this); + + } + else if(entryMasterPassword3.Text != "" && (entryMasterPassword3.Text == entryMasterPassword4.Text) && entryMasterPassword3.Text.Length >= 8) + { + miCASA.SetMasterPassword(0, entryMasterPassword3.Text); + MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text); + dialogLogin.Destroy(); + InitializeGUI(); + } + else + { + entryMasterPassword3.Text=""; + entryMasterPassword4.Text=""; + entryMasterPassword3.HasFocus=true; + } + } + else + { + if( 0 == miCASA.SetMasterPassword(0, entryMasterPassword3.Text) ) + { + MiCasaRequestReply.Send(MiCasaRequestReply.VERB_UNLOCK_STORE, entryMasterPassword3.Text); + dialogLogin.Destroy(); + InitializeGUI(); + } + else + { + Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - MasterPassword verification failed."); + //dialogLogin.Destroy(); + //LoginContinue("Master Password verfication failed", "The store will not be persistent"); + loginPromptCount--; + dialogLogin.Hide(); + + if( loginPromptCount > 0 ) + { + dialogLogin.Show(); + entryMasterPassword3.Text=""; + } + else + { + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLoginReprompt", null); + gxmlTemp.Autoconnect (this); + } + } + } + + Logger.DbgLog("GUI:CasaMain.okbuttonLogin_clicked() - END"); + } + + public void on_helpbuttonAuthentication_clicked(object obj, EventArgs args) + { + Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm"); + } + + internal void on_buttonRetryRepropmt_clicked(object obj, EventArgs args) + { + dialogLoginReprompt.Destroy(); + dialogLogin.Show(); + entryMasterPassword3.Text=""; + loginPromptCount = 3; + } + + internal void on_buttonRetryShortPassword_clicked(object obj, EventArgs args) + { + dialogShortPassword.Destroy(); + entryMasterPassword3.Text = ""; + entryMasterPassword4.Text = ""; + entryMasterPassword3.HasFocus = true; + } + + internal void on_buttonCloseReprompt_clicked(object obj, EventArgs args) + { + dialogLoginReprompt.Destroy(); + dialogLogin.Destroy(); + HandleQuit(); + } + + public void closebuttonLogin_clicked(object abj, EventArgs args) + { + dialogLogin.Destroy(); + HandleQuit(); + } + + + public void OnDialogLoginDeleted(object obj, DeleteEventArgs args) + { + Logger.DbgLog("GUI:CasaMain.OnDialogLoginDeleted() - BEGIN"); - Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLoginContinue", null); - gxmlTemp.Autoconnect(this); - dialogLoginContinue.TransientFor = windowMain; - labelLoginContinue1.LabelProp = LabelMain; - labelLoginContinue2.LabelProp = LabelTips; - - Logger.DbgLog("GUI:CasaMain.LoginContinue() - END"); - } + HandleQuit(); + args.RetVal = true; + + Logger.DbgLog("GUI:CasaMain.OnDialogLoginDeleted() - END"); + } - public void on_buttonLoginContinue_clicked(object abj, EventArgs args) - { - dialogLoginContinue.Destroy(); - InitializeGUI(); - } + public void on_entryMasterPassword3_activate(object obj, EventArgs args) + { + if( true == entryMasterPassword4.Visible ) + entryMasterPassword4.HasFocus = true; + else if( "" != entryMasterPassword3.Text ) + okbuttonLogin_clicked(obj, args); + } + + public void on_entryMasterPassword4_activate(object obj, EventArgs args) + { + okbuttonLogin_clicked(obj, args); + } + + public bool IsMasterPasswordSet() + { + Logger.DbgLog("GUI:CasaMain.IsMasterPasswordSet() - BEGIN"); + + string MICASA_PASSCODE_BY_MASTER_PASSWD_FILE = "/.miCASAPCByMPasswd"; + string fileName = GetUserHomeDir() + MICASA_PASSCODE_BY_MASTER_PASSWD_FILE; + + Logger.DbgLog("GUI:CasaMain.IsMasterPasswordSet() - END"); + return (File.Exists(fileName)); + } + + private string GetUserHomeDir() + { + if (Common.IS_LINUX) + return Environment.GetEnvironmentVariable("HOME"); + else + return Environment.GetEnvironmentVariable("USERPROFILE"); + + } + + ///####################################################################### + /// LOGIN WARNING DIALOG + + /// + /// Error dialog prompt for MasterPassword authentication + /// + public void LoginContinue(string LabelMain, string LabelTips) + { + Logger.DbgLog("GUI:CasaMain.LoginContinue() - BEGIN"); + + Glade.XML gxmlTemp = new Glade.XML(Common.GladeFile, "dialogLoginContinue", null); + gxmlTemp.Autoconnect(this); + dialogLoginContinue.TransientFor = windowMain; + labelLoginContinue1.LabelProp = LabelMain; + labelLoginContinue2.LabelProp = LabelTips; + + Logger.DbgLog("GUI:CasaMain.LoginContinue() - END"); + } + + public void on_buttonLoginContinue_clicked(object abj, EventArgs args) + { + dialogLoginContinue.Destroy(); + InitializeGUI(); + } - ///####################################################################### - /// ON MAIN MENU ACTIVATED HANDLERS + ///####################################################################### + /// ON MAIN MENU ACTIVATED HANDLERS - internal void on_notebookStores_switch_page(object obj, SwitchPageArgs args) - { - switch(args.PageNum) - { - case Common.STORE_MICASA: - break; + internal void on_notebookStores_switch_page(object obj, SwitchPageArgs args) + { + switch(args.PageNum) + { + case Common.STORE_MICASA: + break; - case Common.STORE_FIREFOX: - break; + case Common.STORE_FIREFOX: + break; - case Common.STORE_MOZILLA: - break; + case Common.STORE_MOZILLA: + break; - case Common.STORE_KDEWALLET: - if( false == objKdeWallet.IS_STORE_AGGREGATED ) + case Common.STORE_KDEWALLET: + if( false == objKdeWallet.IS_STORE_AGGREGATED ) { objKdeWallet.AggregateStore(); objKdeWallet.IS_STORE_AGGREGATED = true; } - break; + break; - case Common.STORE_GNOMEKEYRING: - if( false == objGnomeKeyring.IS_STORE_AGGREGATED ) + case Common.STORE_GNOMEKEYRING: + if( false == objGnomeKeyring.IS_STORE_AGGREGATED ) { objGnomeKeyring.AggregateStore(); objGnomeKeyring.IS_STORE_AGGREGATED = true; } - break; - } + break; + } - } + } - /// - /// - /// - internal void FileMenuActivated(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.FileMenuActivated() - BEGIN"); + /// + /// + /// + internal void FileMenuActivated(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.FileMenuActivated() - BEGIN"); - if (MiCASAStore.IsLocked()) - { - LockGUI(); - Logger.DbgLog("GUI:CasaMain.FileMenuActivated() Store is locked - END"); - return; - } - else - { - UnlockGUI(); - } + if (MiCASAStore.IsLocked()) + { + LockGUI(); + Logger.DbgLog("GUI:CasaMain.FileMenuActivated() Store is locked - END"); + return; + } + else + { + UnlockGUI(); + } - switch(notebookStores.CurrentPage) - { - case Common.STORE_MICASA: - if( 0 != objMiCasa.tvSecretIDMiCasa.Selection.CountSelectedRows() ) - { - mmiNew.Sensitive = mmiNewKey.Sensitive = true; - } - else - { - mmiNew.Sensitive = true; - mmiNewKey.Sensitive = false; - } - break; + switch(notebookStores.CurrentPage) + { + case Common.STORE_MICASA: + if( 0 != objMiCasa.tvSecretIDMiCasa.Selection.CountSelectedRows() ) + { + mmiNew.Sensitive = mmiNewKey.Sensitive = true; + } + else + { + mmiNew.Sensitive = true; + mmiNewKey.Sensitive = false; + } + break; - case Common.STORE_FIREFOX: - break; + case Common.STORE_FIREFOX: + break; - case Common.STORE_MOZILLA: - break; + case Common.STORE_MOZILLA: + break; - case Common.STORE_KDEWALLET: - if( 0 != objKdeWallet.tvSecretIDKdeWallet.Selection.CountSelectedRows() ) + case Common.STORE_KDEWALLET: + if( 0 != objKdeWallet.tvSecretIDKdeWallet.Selection.CountSelectedRows() ) { mmiNew.Sensitive = false; } @@ -575,35 +582,35 @@ public class CasaMain { mmiNew.Sensitive = false; } - break; + break; - case Common.STORE_GNOMEKEYRING: - if( 0 != objGnomeKeyring.tvSecretIDGnomeKeyring.Selection.CountSelectedRows() ) - { - mmiNew.Sensitive = false; - } - else - { - mmiNew.Sensitive = false; - } - break; - } + case Common.STORE_GNOMEKEYRING: + if( 0 != objGnomeKeyring.tvSecretIDGnomeKeyring.Selection.CountSelectedRows() ) + { + mmiNew.Sensitive = false; + } + else + { + mmiNew.Sensitive = false; + } + break; + } - Logger.DbgLog("GUI:CasaMain.FileMenuActivated() - END"); - } + Logger.DbgLog("GUI:CasaMain.FileMenuActivated() - END"); + } - /// - /// - /// - internal void EditMenuActivated(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.EditMenuActivated() - BEGIN"); + /// + /// + /// + internal void EditMenuActivated(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.EditMenuActivated() - BEGIN"); - switch(notebookStores.CurrentPage) - { - case Common.STORE_MICASA: + switch(notebookStores.CurrentPage) + { + case Common.STORE_MICASA: if( 0 != objMiCasa.tvSecretIDMiCasa.Selection.CountSelectedRows() ) { mmiView.Sensitive = mmiDelete.Sensitive = true; @@ -613,15 +620,15 @@ public class CasaMain { mmiView.Sensitive = mmiLink.Sensitive = mmiCopy.Sensitive = mmiDelete.Sensitive = false; } - break; + break; - case Common.STORE_FIREFOX: + case Common.STORE_FIREFOX: break; - case Common.STORE_MOZILLA: + case Common.STORE_MOZILLA: break; - case Common.STORE_KDEWALLET: + case Common.STORE_KDEWALLET: if( 0 != objKdeWallet.tvSecretIDKdeWallet.Selection.CountSelectedRows() ) { mmiView.Sensitive = true; @@ -631,776 +638,808 @@ public class CasaMain { mmiView.Sensitive = mmiLink.Sensitive = mmiCopy.Sensitive = mmiDelete.Sensitive = false; } - break; + break; - case Common.STORE_GNOMEKEYRING: if( 0 != objGnomeKeyring.tvSecretIDGnomeKeyring.Selection.CountSelectedRows() ) - { - mmiView.Sensitive = true; - mmiLink.Sensitive = mmiCopy.Sensitive = mmiDelete.Sensitive = false; - } - else - { - mmiView.Sensitive = mmiLink.Sensitive = mmiCopy.Sensitive = mmiDelete.Sensitive = false; - } - break; - } + case Common.STORE_GNOMEKEYRING: if( 0 != objGnomeKeyring.tvSecretIDGnomeKeyring.Selection.CountSelectedRows() ) + { + mmiView.Sensitive = true; + mmiLink.Sensitive = mmiCopy.Sensitive = mmiDelete.Sensitive = false; + } + else + { + mmiView.Sensitive = mmiLink.Sensitive = mmiCopy.Sensitive = mmiDelete.Sensitive = false; + } + break; + } - Logger.DbgLog("GUI:CasaMain.EditMenuActivated() - END"); - } + Logger.DbgLog("GUI:CasaMain.EditMenuActivated() - END"); + } - ///####################################################################### - /// REFRESH ALL STORES + ///####################################################################### + /// REFRESH ALL STORES - /// - /// - /// - public void RefreshAllStores(object obj, EventArgs args) - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmRefresh", null); - gxmlTemp.Autoconnect (this); - dialogConfirmRefresh.TransientFor = windowMain; - } + /// + /// + /// + public void RefreshAllStores(object obj, EventArgs args) + { + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmRefresh", null); + gxmlTemp.Autoconnect (this); + dialogConfirmRefresh.TransientFor = windowMain; + } - public void on_buttonRefreshYes_clicked(object abj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.on_buttonRefreshYes_clicked() - BEGIN"); + public void on_buttonRefreshYes_clicked(object abj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.on_buttonRefreshYes_clicked() - BEGIN"); - if( Common.IS_MICASA ) - objMiCasa.AggregateStore(); + if( Common.IS_MICASA ) + objMiCasa.AggregateStore(); - if( Common.IS_FIREFOX ) - objFirefox.AggregateStore(); + if( Common.IS_FIREFOX ) + objFirefox.AggregateStore(); - if( Common.IS_MOZILLA ) - objMozilla.AggregateStore(); + if( Common.IS_MOZILLA ) + objMozilla.AggregateStore(); - if( Common.IS_KDEWALLET ) - objKdeWallet.AggregateStore(); + if( Common.IS_KDEWALLET ) + objKdeWallet.AggregateStore(); - if( Common.IS_GNOMEKEYRING ) - objGnomeKeyring.AggregateStore(); + if( Common.IS_GNOMEKEYRING ) + objGnomeKeyring.AggregateStore(); - dialogConfirmRefresh.Destroy(); + dialogConfirmRefresh.Destroy(); - Logger.DbgLog("GUI:CasaMain.on_buttonRefreshYes_clicked() - END"); - } + Logger.DbgLog("GUI:CasaMain.on_buttonRefreshYes_clicked() - END"); + } - public void on_buttonRefreshNo_clicked(object abj, EventArgs args) - { - dialogConfirmRefresh.Destroy(); - } + public void on_buttonRefreshNo_clicked(object abj, EventArgs args) + { + dialogConfirmRefresh.Destroy(); + } + + public void on_helpbuttonRefresh_clicked(object obj, EventArgs Args) + { + Common.ShowHelpUrl("RefreshStore.htm"); + } + + ///####################################################################### + /// QUIT APPLICATION - - ///####################################################################### - /// QUIT APPLICATION - - /// - /// - /// - public void QuitApplication(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.QuitApplication() - BEGIN"); + /// + /// + /// + public void QuitApplication(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.QuitApplication() - BEGIN"); - windowMain.Destroy(); - HandleQuit(); + windowMain.Destroy(); + HandleQuit(); - Logger.DbgLog("GUI:CasaMain.QuitApplication() - END"); - } + Logger.DbgLog("GUI:CasaMain.QuitApplication() - END"); + } - ///####################################################################### - /// ADD NEW SECRET + ///####################################################################### + /// ADD NEW SECRET - /// - /// - /// - public void OnNewSecretActivated(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.NewSecret() - BEGIN"); + /// + /// + /// + public void OnNewSecretActivated(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.NewSecret() - BEGIN"); - switch(notebookStores.CurrentPage) - { - case Common.STORE_MICASA: + switch(notebookStores.CurrentPage) + { + case Common.STORE_MICASA: objMiCasa.OnNewSecretActivated(obj, args); - break; + break; - case Common.STORE_FIREFOX: + case Common.STORE_FIREFOX: break; - case Common.STORE_MOZILLA: + case Common.STORE_MOZILLA: break; - case Common.STORE_KDEWALLET: + case Common.STORE_KDEWALLET: break; - case Common.STORE_GNOMEKEYRING: + case Common.STORE_GNOMEKEYRING: break; - } + } - Logger.DbgLog("GUI:CasaMain.NewSecret() - END"); - } + Logger.DbgLog("GUI:CasaMain.NewSecret() - END"); + } - ///####################################################################### - /// ADD NEW KEY + ///####################################################################### + /// ADD NEW KEY - /// - /// - /// - public void OnNewKeyActivated(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.NewKeyValue() - BEGIN"); + /// + /// + /// + public void OnNewKeyActivated(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.NewKeyValue() - BEGIN"); - switch(notebookStores.CurrentPage) - { - case Common.STORE_MICASA: + switch(notebookStores.CurrentPage) + { + case Common.STORE_MICASA: objMiCasa.OnNewKeyActivated(obj, args); - break; + break; - case Common.STORE_FIREFOX: + case Common.STORE_FIREFOX: break; - case Common.STORE_MOZILLA: + case Common.STORE_MOZILLA: break; - case Common.STORE_KDEWALLET: + case Common.STORE_KDEWALLET: break; - case Common.STORE_GNOMEKEYRING: + case Common.STORE_GNOMEKEYRING: break; - } + } - Logger.DbgLog("GUI:CasaMain.NewKeyValue() - END"); - } + Logger.DbgLog("GUI:CasaMain.NewKeyValue() - END"); + } - ///####################################################################### - /// UI handling + ///####################################################################### + /// UI handling - public void OnLockMiCASASecrets(object sender, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.OnLockMiCASASecrets() - START"); - MiCasaRequestReply.Send(MiCasaRequestReply.VERB_LOCK_STORE); - LockGUI(); - if (mCasaTray != null) - mCasaTray.UpdateTrayIcon(true); - Logger.DbgLog("GUI:CasaMain.OnLockMiCASASecrets() - END"); - } - - public void OnUnLockMiCASASecrets(object sender, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.OnUnLockMiCASASecrets() - START"); - CommonGUI cg = new CommonGUI(); - cg.HandleUnlock(this, mCasaTray); - Logger.DbgLog("GUI:CasaMain.OnUnLockMiCASASecrets() - END"); - } - - public void OnDestroyMiCASASecrets(object sender, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.OnDestroyMiCASASecrets() - START"); - CommonGUI temp = new CommonGUI(); - temp.menuDestroyMiCasa_Activated(this, mCasaTray); - Logger.DbgLog("GUI:CasaMain.OnDestroyMiCASASecrets() - END"); - } - - - internal void LockGUI() - { - mmiLockSecrets.Sensitive = false; - mmiUnlockSecrets.Sensitive = true; - mmiDestroySecrets.Sensitive = false; - notebookStores.Sensitive = false; - mmiNew.Sensitive = false; - mmiRefresh.Sensitive = false; - mmiDebug.Sensitive = false; - mmiOptions.Sensitive = false; - mmiEdit.Sensitive = false; - } - - internal void UnlockGUI() - { - mmiLockSecrets.Sensitive = true; - mmiUnlockSecrets.Sensitive = false; - mmiDestroySecrets.Sensitive = true; - notebookStores.Sensitive = true; - mmiRefresh.Sensitive = true; - mmiDebug.Sensitive = true; - mmiOptions.Sensitive = true; - mmiEdit.Sensitive = true; - } - - - ///####################################################################### - /// VIEW KEY-VALUES - - /// - /// VIEW Key-Values - /// - public void ViewKeyValue(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.ViewKeyValue() - BEGIN"); - - switch(notebookStores.CurrentPage) - { - case Common.STORE_MICASA: - objMiCasa.ViewKeyValues(); - break; - - case Common.STORE_FIREFOX: - objFirefox.ViewKeyValues(); - break; - - case Common.STORE_MOZILLA: - objMozilla.ViewKeyValues(); - break; - - case Common.STORE_KDEWALLET: - objKdeWallet.ViewKeyValues(); - break; - - case Common.STORE_GNOMEKEYRING: - objGnomeKeyring.ViewKeyValues(); - break; - } - - Logger.DbgLog("GUI:CasaMain.ViewKeyValue() - END"); - } - - - - ///####################################################################### - /// LINK KEY-VALUE - - /// - /// LINK Key-Values - /// - public void LinkKeyValue(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.LinkKeyValue() - BEGIN"); - - switch(notebookStores.CurrentPage) - { - case Common.STORE_MICASA: - objMiCasa.ViewKeyValues(); - break; - - case Common.STORE_FIREFOX: - break; - - case Common.STORE_MOZILLA: - break; - - case Common.STORE_KDEWALLET: - break; - - case Common.STORE_GNOMEKEYRING: - break; - } - - Logger.DbgLog("GUI:CasaMain.LinkKeyValue() - END"); - } - - - - ///####################################################################### - /// COPY KEY-VALUE - - /// - /// COPY Key-Values - /// - public void CopyKeyValue(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.CopyKeyValue() - BEGIN"); - - //Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogCopyKeyValue", null); - //gxmlTemp.Autoconnect (this); - - Logger.DbgLog("GUI:CasaMain.CopyKeyValue() - END"); - } - - - - ///####################################################################### - /// DELETE SECRET - - /// - /// DELETE Secret - /// - public void DeleteSecret(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.DeleteSecret() - BEGIN"); - - switch(notebookStores.CurrentPage) - { - case Common.STORE_MICASA: - objMiCasa.OnDeleteActivated(obj, args); - break; - - case Common.STORE_FIREFOX: - break; - - case Common.STORE_MOZILLA: - break; - - case Common.STORE_KDEWALLET: - break; - - case Common.STORE_GNOMEKEYRING: - break; - } - - Logger.DbgLog("GUI:CasaMain.DeleteSecret() - END"); - } - - - ///####################################################################### - /// Reset Master Password CALLED VIA MAIN MENU - - /// - /// - /// - public void ResetMasterPassword(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.ResetMasterPassword() - BEGIN"); - - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogResetMP", null); - gxmlTemp.Autoconnect (this); - dialogResetMP.TransientFor = windowMain; - entryOldMP.Text=""; - entryNewMP1.Text=""; - entryNewMP2.Text=""; - Logger.DbgLog("GUI:CasaMain.ResetMasterPassword() - END"); - } - - public void okbuttonResetMasterPWD_clicked(object abj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.okbuttonResetMasterPWD_clicked() - BEGIN"); - - if (entryOldMP.Text == "") + public void OnLockMiCASASecrets(object sender, EventArgs args) { - DisplayError("You must enter you current Master Password"); - return; + Logger.DbgLog("GUI:CasaMain.OnLockMiCASASecrets() - START"); + MiCasaRequestReply.Send(MiCasaRequestReply.VERB_LOCK_STORE); + LockGUI(); + if (mCasaTray != null) + mCasaTray.UpdateTrayIcon(true); + Logger.DbgLog("GUI:CasaMain.OnLockMiCASASecrets() - END"); } - // check Current MP - if (entryOldMP.Text != "") + public void OnUnLockMiCASASecrets(object sender, EventArgs args) { - int rcode = miCASA.SetMasterPassword(1, entryOldMP.Text); - if (rcode != 0) + Logger.DbgLog("GUI:CasaMain.OnUnLockMiCASASecrets() - START"); + CommonGUI cg = new CommonGUI(); + cg.HandleUnlock(this, mCasaTray); + Logger.DbgLog("GUI:CasaMain.OnUnLockMiCASASecrets() - END"); + } + + public void OnDestroyMiCASASecrets(object sender, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.OnDestroyMiCASASecrets() - START"); + CommonGUI temp = new CommonGUI(); + temp.menuDestroyMiCasa_Activated(this, mCasaTray); + Logger.DbgLog("GUI:CasaMain.OnDestroyMiCASASecrets() - END"); + } + + + internal void LockGUI() + { + mmiLockSecrets.Sensitive = false; + mmiUnlockSecrets.Sensitive = true; + mmiDestroySecrets.Sensitive = false; + notebookStores.Sensitive = false; + mmiNew.Sensitive = false; + mmiRefresh.Sensitive = false; + mmiDebug.Sensitive = false; + mmiOptions.Sensitive = false; + mmiEdit.Sensitive = false; + } + + internal void UnlockGUI() + { + mmiLockSecrets.Sensitive = true; + mmiUnlockSecrets.Sensitive = false; + mmiDestroySecrets.Sensitive = true; + notebookStores.Sensitive = true; + mmiRefresh.Sensitive = true; + mmiDebug.Sensitive = true; + mmiOptions.Sensitive = true; + mmiEdit.Sensitive = true; + } + + + ///####################################################################### + /// VIEW KEY-VALUES + + /// + /// VIEW Key-Values + /// + public void ViewKeyValue(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.ViewKeyValue() - BEGIN"); + + switch(notebookStores.CurrentPage) { - DisplayError("Current Master Password is not correct"); + case Common.STORE_MICASA: + objMiCasa.ViewKeyValues(); + break; + + case Common.STORE_FIREFOX: + objFirefox.ViewKeyValues(); + break; + + case Common.STORE_MOZILLA: + objMozilla.ViewKeyValues(); + break; + + case Common.STORE_KDEWALLET: + objKdeWallet.ViewKeyValues(); + break; + + case Common.STORE_GNOMEKEYRING: + objGnomeKeyring.ViewKeyValues(); + break; + } + + Logger.DbgLog("GUI:CasaMain.ViewKeyValue() - END"); + } + + + + ///####################################################################### + /// LINK KEY-VALUE + + /// + /// LINK Key-Values + /// + public void LinkKeyValue(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.LinkKeyValue() - BEGIN"); + + switch(notebookStores.CurrentPage) + { + case Common.STORE_MICASA: + objMiCasa.ViewKeyValues(); + break; + + case Common.STORE_FIREFOX: + break; + + case Common.STORE_MOZILLA: + break; + + case Common.STORE_KDEWALLET: + break; + + case Common.STORE_GNOMEKEYRING: + break; + } + + Logger.DbgLog("GUI:CasaMain.LinkKeyValue() - END"); + } + + + + ///####################################################################### + /// COPY KEY-VALUE + + /// + /// COPY Key-Values + /// + public void CopyKeyValue(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.CopyKeyValue() - BEGIN"); + + //Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogCopyKeyValue", null); + //gxmlTemp.Autoconnect (this); + + Logger.DbgLog("GUI:CasaMain.CopyKeyValue() - END"); + } + + + + ///####################################################################### + /// DELETE SECRET + + /// + /// DELETE Secret + /// + public void DeleteSecret(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.DeleteSecret() - BEGIN"); + + switch(notebookStores.CurrentPage) + { + case Common.STORE_MICASA: + objMiCasa.OnDeleteActivated(obj, args); + break; + + case Common.STORE_FIREFOX: + break; + + case Common.STORE_MOZILLA: + break; + + case Common.STORE_KDEWALLET: + break; + + case Common.STORE_GNOMEKEYRING: + break; + } + + Logger.DbgLog("GUI:CasaMain.DeleteSecret() - END"); + } + + + ///####################################################################### + /// Reset Master Password CALLED VIA MAIN MENU + + /// + /// + /// + public void ResetMasterPassword(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.ResetMasterPassword() - BEGIN"); + + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogResetMP", null); + gxmlTemp.Autoconnect (this); + dialogResetMP.TransientFor = windowMain; + entryOldMP.Text=""; + entryNewMP1.Text=""; + entryNewMP2.Text=""; + Logger.DbgLog("GUI:CasaMain.ResetMasterPassword() - END"); + } + + public void okbuttonResetMasterPWD_clicked(object abj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.okbuttonResetMasterPWD_clicked() - BEGIN"); + + if (entryOldMP.Text == "") + { + DisplayError("You must enter you current Master Password"); return; } - } - if (entryNewMP1.Text.Length < 8) - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogShortPassword", null); - gxmlTemp.Autoconnect (this); - return; - } + // check Current MP + if (entryOldMP.Text != "") + { + int rcode = miCASA.SetMasterPassword(1, entryOldMP.Text); + if (rcode != 0) + { + DisplayError("Current Master Password is not correct"); + return; + } + } - if (entryNewMP1.Text != entryNewMP2.Text) - { - DisplayError("New Master Passwords do not match"); - return; - } + if (entryNewMP1.Text.Length < 8) + { + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogShortPassword", null); + gxmlTemp.Autoconnect (this); + return; + } + + if (entryNewMP1.Text != entryNewMP2.Text) + { + DisplayError("New Master Passwords do not match"); + return; + } - if (miCASA.ChangeMasterPassword(entryOldMP.Text, entryNewMP1.Text)) - dialogResetMP.Destroy(); - else - DisplayError("Change failed"); + if (miCASA.ChangeMasterPassword(entryOldMP.Text, entryNewMP1.Text)) + dialogResetMP.Destroy(); + else + DisplayError("Change failed"); - Logger.DbgLog("GUI:CasaMain.okbuttonResetMasterPWD_clicked() - END"); - } + Logger.DbgLog("GUI:CasaMain.okbuttonResetMasterPWD_clicked() - END"); + } - public void cancelbuttonResetMasterPWD_clicked(object abj, EventArgs args) - { - dialogResetMP.Destroy(); - } + public void cancelbuttonResetMasterPWD_clicked(object abj, EventArgs args) + { + dialogResetMP.Destroy(); + } - private void DisplayError(String sErrorMessage) - { - MessageDialog md = new MessageDialog(windowMain, - Gtk.DialogFlags.Modal, - Gtk.MessageType.Warning, - Gtk.ButtonsType.Close, - sErrorMessage); + public void on_helpbuttonResetMP_clicked(object obj, EventArgs args) + { + Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm"); + } - md.Response +=new ResponseHandler(md_Response); - //md_ResponseCloseWindow - md.Show(); + private void DisplayError(String sErrorMessage) + { + MessageDialog md = new MessageDialog(windowMain, + Gtk.DialogFlags.Modal, + Gtk.MessageType.Warning, + Gtk.ButtonsType.Close, + sErrorMessage); - } + md.Response +=new ResponseHandler(md_Response); + //md_ResponseCloseWindow + md.Show(); + + } - ///####################################################################### - /// PERSISTENT STORAGE CALLED VIA MAIN MENU + ///####################################################################### + /// PERSISTENT STORAGE CALLED VIA MAIN MENU - /// - /// - /// - public void PersistentStorage(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.PersistentStorage() - BEGIN"); + /// + /// + /// + public void PersistentStorage(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.PersistentStorage() - BEGIN"); - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogPersistentStorage", null); - gxmlTemp.Autoconnect (this); - dialogPersistentStorage.TransientFor = windowMain; - entryMasterPassword1.Text=""; - entryMasterPassword2.Text=""; + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogPersistentStorage", null); + gxmlTemp.Autoconnect (this); + dialogPersistentStorage.TransientFor = windowMain; + entryMasterPassword1.Text=""; + entryMasterPassword2.Text=""; - if(IsMasterPasswordSet() == true) - { - entryMasterPassword1.Sensitive=false; - entryMasterPassword2.Sensitive=false; - okbuttonPersistentStorage.Sensitive=false; - } + if(IsMasterPasswordSet() == true) + { + entryMasterPassword1.Sensitive=false; + entryMasterPassword2.Sensitive=false; + okbuttonPersistentStorage.Sensitive=false; + } - Logger.DbgLog("GUI:CasaMain.PersistentStorage() - END"); - } + Logger.DbgLog("GUI:CasaMain.PersistentStorage() - END"); + } - public void okbuttonPersistentStorage_clicked(object abj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.okbuttonPersistentStorage_clicked() - BEGIN"); - - if((entryMasterPassword1.Text != "" && entryMasterPassword2.Text != "") && (entryMasterPassword1.Text == entryMasterPassword2.Text)) - { - //StorePolicyInterface.SetMasterPassword(entryMasterPassword1.Text); - miCASA.SetMasterPassword(0, entryMasterPassword1.Text); - dialogPersistentStorage.Destroy(); - } - - Logger.DbgLog("GUI:CasaMain.okbuttonPersistentStorage_clicked() - END"); - } - - public void cancelbuttonPersistentStorage_clicked(object abj, EventArgs args) - { - dialogPersistentStorage.Destroy(); - } - - - - ///####################################################################### - /// PREFERENCES - - /// - /// - /// - public void Preferences(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.Preferences() - BEGIN"); - - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogPreferences", null); - gxmlTemp.Autoconnect (this); - dialogPreferences.SetPosition(Gtk.WindowPosition.CenterOnParent); - dialogPreferences.TransientFor = windowMain; - checkbuttonFirefox.Active=Common.IS_FIREFOX; - checkbuttonMozilla.Active=Common.IS_MOZILLA; - checkbuttonGnomeKeyring.Active=Common.IS_GNOMEKEYRING; - checkbuttonKdeWallet.Active=Common.IS_KDEWALLET; - - if (Common.IS_WINDOWS) + public void okbuttonPersistentStorage_clicked(object abj, EventArgs args) { - checkbuttonGnomeKeyring.Sensitive = false; - checkbuttonKdeWallet.Sensitive = false; + Logger.DbgLog("GUI:CasaMain.okbuttonPersistentStorage_clicked() - BEGIN"); + + if((entryMasterPassword1.Text != "" && entryMasterPassword2.Text != "") && (entryMasterPassword1.Text == entryMasterPassword2.Text)) + { + //StorePolicyInterface.SetMasterPassword(entryMasterPassword1.Text); + miCASA.SetMasterPassword(0, entryMasterPassword1.Text); + dialogPersistentStorage.Destroy(); + } + + Logger.DbgLog("GUI:CasaMain.okbuttonPersistentStorage_clicked() - END"); } - - Logger.DbgLog("GUI:CasaMain.Preferences() - END"); - } - public void okbuttonPreferences_clicked(object abj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.okbuttonPreferences_clicked() - BEGIN"); + public void cancelbuttonPersistentStorage_clicked(object abj, EventArgs args) + { + dialogPersistentStorage.Destroy(); + } + + + + ///####################################################################### + /// PREFERENCES + + /// + /// + /// + public void Preferences(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.Preferences() - BEGIN"); + + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogPreferences", null); + gxmlTemp.Autoconnect (this); + dialogPreferences.SetPosition(Gtk.WindowPosition.CenterOnParent); + dialogPreferences.TransientFor = windowMain; + checkbuttonFirefox.Active=Common.IS_FIREFOX; + checkbuttonMozilla.Active=Common.IS_MOZILLA; + checkbuttonGnomeKeyring.Active=Common.IS_GNOMEKEYRING; + checkbuttonKdeWallet.Active=Common.IS_KDEWALLET; + + if (Common.IS_WINDOWS) + { + checkbuttonGnomeKeyring.Sensitive = false; + checkbuttonKdeWallet.Sensitive = false; + } - string[] storeID = new string[]{""}; + Logger.DbgLog("GUI:CasaMain.Preferences() - END"); + } + + public void okbuttonPreferences_clicked(object abj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.okbuttonPreferences_clicked() - BEGIN"); - notebookStores.GetNthPage(Common.STORE_FIREFOX).Visible = Common.IS_FIREFOX = checkbuttonFirefox.Active; - notebookStores.GetNthPage(Common.STORE_MOZILLA).Visible = Common.IS_MOZILLA = checkbuttonMozilla.Active; - notebookStores.GetNthPage(Common.STORE_GNOMEKEYRING).Visible = Common.IS_GNOMEKEYRING = checkbuttonGnomeKeyring.Active; - notebookStores.GetNthPage(Common.STORE_KDEWALLET).Visible = Common.IS_KDEWALLET = checkbuttonKdeWallet.Active; + string[] storeID = new string[]{""}; + + notebookStores.GetNthPage(Common.STORE_FIREFOX).Visible = Common.IS_FIREFOX = checkbuttonFirefox.Active; + notebookStores.GetNthPage(Common.STORE_MOZILLA).Visible = Common.IS_MOZILLA = checkbuttonMozilla.Active; + notebookStores.GetNthPage(Common.STORE_GNOMEKEYRING).Visible = Common.IS_GNOMEKEYRING = checkbuttonGnomeKeyring.Active; + notebookStores.GetNthPage(Common.STORE_KDEWALLET).Visible = Common.IS_KDEWALLET = checkbuttonKdeWallet.Active; - StorePolicyInterface.SetAggregationPolicy(Common.STORE_FIREFOX, Common.IS_FIREFOX, storeID, 1); - StorePolicyInterface.SetAggregationPolicy(Common.STORE_MOZILLA, Common.IS_MOZILLA, storeID, 1); - StorePolicyInterface.SetAggregationPolicy(Common.STORE_KDEWALLET, Common.IS_KDEWALLET, storeID, 1); - StorePolicyInterface.SetAggregationPolicy(Common.STORE_GNOMEKEYRING, Common.IS_GNOMEKEYRING, storeID, 1); + StorePolicyInterface.SetAggregationPolicy(Common.STORE_FIREFOX, Common.IS_FIREFOX, storeID, 1); + StorePolicyInterface.SetAggregationPolicy(Common.STORE_MOZILLA, Common.IS_MOZILLA, storeID, 1); + StorePolicyInterface.SetAggregationPolicy(Common.STORE_KDEWALLET, Common.IS_KDEWALLET, storeID, 1); + StorePolicyInterface.SetAggregationPolicy(Common.STORE_GNOMEKEYRING, Common.IS_GNOMEKEYRING, storeID, 1); - StorePolicyInterface.SaveAggregationPolicy(); + StorePolicyInterface.SaveAggregationPolicy(); - if(Common.IS_FIREFOX) - { - if( null == objFirefox ) - objFirefox = new Firefox(); + if(Common.IS_FIREFOX) + { + if( null == objFirefox ) + objFirefox = new Firefox(); - objFirefox.AggregateStore(); - } - if(Common.IS_MOZILLA) - { - if( null == objMozilla ) - objMozilla = new Mozilla(); + objFirefox.AggregateStore(); + } + if(Common.IS_MOZILLA) + { + if( null == objMozilla ) + objMozilla = new Mozilla(); - objMozilla.AggregateStore(); - } - if(Common.IS_KDEWALLET) - { - if( null == objKdeWallet ) - objKdeWallet = new KdeWallet(); + objMozilla.AggregateStore(); + } + if(Common.IS_KDEWALLET) + { + if( null == objKdeWallet ) + objKdeWallet = new KdeWallet(); - objKdeWallet.AggregateStore(); - } - if(Common.IS_GNOMEKEYRING) - { - if( null == objGnomeKeyring ) - objGnomeKeyring = new GnomeKeyring(); + objKdeWallet.AggregateStore(); + } + if(Common.IS_GNOMEKEYRING) + { + if( null == objGnomeKeyring ) + objGnomeKeyring = new GnomeKeyring(); - objGnomeKeyring.AggregateStore(); - } + objGnomeKeyring.AggregateStore(); + } - dialogPreferences.Destroy(); + dialogPreferences.Destroy(); - Logger.DbgLog("GUI:CasaMain.okbuttonPreferences_clicked() - END"); - } + Logger.DbgLog("GUI:CasaMain.okbuttonPreferences_clicked() - END"); + } - public void cancelbuttonPreferences_clicked(object abj, EventArgs args) - { - dialogPreferences.Destroy(); - } + public void cancelbuttonPreferences_clicked(object abj, EventArgs args) + { + dialogPreferences.Destroy(); + } - private bool IsTraySetForStartup() - { + public void on_helpbuttonPreferences_clicked(object obj, EventArgs args) + { + Common.ShowHelpUrl("Preferences.htm"); + } + + + /* + private bool IsTraySetForStartup() + { #if W32 - string sStartup = CommonGUI.ReadRegKey( - Registry.CurrentUser, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", - "CASA Tray"); + string sStartup = CommonGUI.ReadRegKey( + Registry.CurrentUser, + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", + "CASA Tray"); - if (sStartup == null || sStartup.Length < 1) - return false; - else - return true; + if (sStartup == null || sStartup.Length < 1) + return false; + else + return true; #endif #if LINUX // TODO check startup script for the user. return true; #endif - } - - - private static void md_ResponseCloseWindow(object o, ResponseArgs args) - { - MessageDialog md = (MessageDialog)o; - if (md != null) - { - md.Destroy(); - Application.Quit(); } - } + */ + + + private static void md_ResponseCloseWindow(object o, ResponseArgs args) + { + MessageDialog md = (MessageDialog)o; + if (md != null) + { + md.Destroy(); + Application.Quit(); + } + } - private void PromptUserForStartup() - { - // prompt user - MessageDialog md=new MessageDialog(null,Gtk.DialogFlags.Modal, - Gtk.MessageType.Question, - Gtk.ButtonsType.YesNo, - "Show the Tray Icon at startup?"); - - md.SetPosition(Gtk.WindowPosition.Center); - md.Response +=new ResponseHandler(md_Response); - md.Modal = true; - md.SetIconFromFile(Common.CASAICONS); - md.Show(); - } - - private void md_Response(object o, ResponseArgs args) - { - if (args.ResponseId.Equals(Gtk.ResponseType.Yes)) + private void PromptUserForStartup() { + // prompt user + MessageDialog md=new MessageDialog(null,Gtk.DialogFlags.Modal, + Gtk.MessageType.Question, + Gtk.ButtonsType.YesNo, + "Show the Tray Icon at startup?"); + + md.SetPosition(Gtk.WindowPosition.Center); + md.Response +=new ResponseHandler(md_Response); + md.Modal = true; + md.SetIconFromFile(Common.CASAICONS); + md.Show(); + } + + private void md_Response(object o, ResponseArgs args) + { + if (args.ResponseId.Equals(Gtk.ResponseType.Yes)) + { #if W32 - // get our program path - String sPath = "\"" +Environment.GetEnvironmentVariable("ProgramFiles")+ - "\\Novell\\CASA\\bin\\CASAManager.exe\" -tray"; + // get our program path + String sPath = "\"" +Environment.GetEnvironmentVariable("ProgramFiles")+ + "\\Novell\\CASA\\bin\\CASAManager.exe\" -tray"; - CommonGUI.WriteRegKey(Registry.CurrentUser, - "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", - "CASA Tray", - sPath); + CommonGUI.WriteRegKey(Registry.CurrentUser, + "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", + "CASA Tray", + sPath); #endif - // TODO: Set startup script for the user - } - - MessageDialog md = (MessageDialog)o; - if (md != null) - { - md.Destroy(); - } - } - - ///####################################################################### - /// DEBUG - - /// - /// - /// - public void on_create_sample_secrets1_activate(object obj, EventArgs arg) - { - MiCasaRequestReply.Send(MiCasaRequestReply.VERB_CREATE_TEST_SECRETS, null, null, null, null); - //StoreDataInterface.RefreshAllStores(); - objMiCasa.AggregateStore(); - } - - public void on_remove_test_secrets1_activate(object obj, EventArgs args) - { - MiCasaRequestReply.Send(MiCasaRequestReply.VERB_REMOVE_TEST_SECRETS, null, null, null, null); - //StoreDataInterface.RefreshAllStores(); - objMiCasa.AggregateStore(); - } - - ///####################################################################### - /// ABOUT - - /// - /// - /// - public void About(object obj, EventArgs args) - { - Logger.DbgLog("GUI:CasaMain.About() - BEGIN"); - - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogAbout", null); - gxmlTemp.Autoconnect (this); - dialogAbout.TransientFor = windowMain; - Logger.DbgLog("GUI:CasaMain.About() - END"); - } - - public void closebuttonAbout_clicked(object obj, EventArgs args) - { - dialogAbout.Destroy(); - } - - - ///####################################################################### - /// SINGLE INSTANCE DIALOG CLOSE HANDLER - - /// - /// dislogSingleInstance delete window handler - /// - public void on_dialogSingleInstance_delete_event(object obj, DeleteEventArgs args) - { - dialogSingleInstance.Destroy(); - HandleQuit(); - //Application.Quit(); - } - - public void on_buttonSIClose_clicked(object obj, EventArgs args) - { - dialogSingleInstance.Destroy(); - HandleQuit(); - //Application.Quit(); - } - - ///####################################################################### - /// WINDOW MAIN CLOSE HANDLER - - /// - /// MainWindow delete window handler - /// - public void OnWindowMainDeleted(object obj, DeleteEventArgs args) - { - Logger.DbgLog("GUI:CasaMain.OnWindowMainDeleted() - BEGIN"); - - windowMain.Destroy(); - HandleQuit(); - //Gtk.Application.Quit (); - args.RetVal = true; - - Logger.DbgLog("GUI:CasaMain.OnWindowMainDeleted() - END"); - } - - private void HandleQuit() - { - if (mCasaTray != null) - { - if (m_bNotifyUser) - { - // prompt user - MessageDialog md=new MessageDialog(null,Gtk.DialogFlags.Modal, - Gtk.MessageType.Info, - Gtk.ButtonsType.Close, - "CASA Manager will continue to run in the task bar"); - - md.SetPosition(Gtk.WindowPosition.Center); - md.Response +=new ResponseHandler(md_Response); - md.Modal = true; - md.SetIconFromFile(Common.CASAICONS); - md.Show(); - - m_bNotifyUser = false; + // TODO: Set startup script for the user } - mCasaTray.CasaManagerQuit(); - return; + MessageDialog md = (MessageDialog)o; + if (md != null) + { + md.Destroy(); + } + } + + ///####################################################################### + /// DEBUG + + /// + /// + /// + public void on_create_sample_secrets1_activate(object obj, EventArgs arg) + { + MiCasaRequestReply.Send(MiCasaRequestReply.VERB_CREATE_TEST_SECRETS, null, null, null, null); + //StoreDataInterface.RefreshAllStores(); + objMiCasa.AggregateStore(); + } + + public void on_remove_test_secrets1_activate(object obj, EventArgs args) + { + MiCasaRequestReply.Send(MiCasaRequestReply.VERB_REMOVE_TEST_SECRETS, null, null, null, null); + //StoreDataInterface.RefreshAllStores(); + objMiCasa.AggregateStore(); + } + + ///####################################################################### + /// ABOUT + + /// + /// + /// + public void About(object obj, EventArgs args) + { + Logger.DbgLog("GUI:CasaMain.About() - BEGIN"); + + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogAbout", null); + gxmlTemp.Autoconnect (this); + dialogAbout.TransientFor = windowMain; + Logger.DbgLog("GUI:CasaMain.About() - END"); + } + + public void closebuttonAbout_clicked(object obj, EventArgs args) + { + dialogAbout.Destroy(); + } + + + public void on_buttonNovell_clicked(object obj, EventArgs args) + { + Common.ShowUrl("http://www.novell.com"); + } + + ///####################################################################### + /// SINGLE INSTANCE DIALOG CLOSE HANDLER + + /// + /// dislogSingleInstance delete window handler + /// + public void on_dialogSingleInstance_delete_event(object obj, DeleteEventArgs args) + { + dialogSingleInstance.Destroy(); + HandleQuit(); + //Application.Quit(); + } + + public void on_buttonSIClose_clicked(object obj, EventArgs args) + { + dialogSingleInstance.Destroy(); + HandleQuit(); + //Application.Quit(); + } + + ///####################################################################### + /// WINDOW MAIN CLOSE HANDLER + + /// + /// MainWindow delete window handler + /// + public void OnWindowMainDeleted(object obj, DeleteEventArgs args) + { + Logger.DbgLog("GUI:CasaMain.OnWindowMainDeleted() - BEGIN"); + + windowMain.Destroy(); + HandleQuit(); + //Gtk.Application.Quit (); + args.RetVal = true; + + Logger.DbgLog("GUI:CasaMain.OnWindowMainDeleted() - END"); + } + + private void HandleQuit() + { + if (mCasaTray != null) + { + if (m_bNotifyUser) + { + // prompt user + MessageDialog md=new MessageDialog(null,Gtk.DialogFlags.Modal, + Gtk.MessageType.Info, + Gtk.ButtonsType.Close, + "CASA Manager will continue to run in the task bar"); + + md.SetPosition(Gtk.WindowPosition.Center); + md.Response +=new ResponseHandler(md_Response); + md.Modal = true; + md.SetIconFromFile(Common.CASAICONS); + md.Show(); + + m_bNotifyUser = false; + } + + mCasaTray.CasaManagerQuit(); + return; + } + else + Application.Quit(); } - else - Application.Quit(); - } - ///####################################################################### - /// WINDOW MAIN FOCUS - /// - internal void Focus() - { - windowMain.Present(); - } + ///####################################################################### + /// WINDOW MAIN FOCUS + /// + internal void Focus() + { + windowMain.Present(); + } - ///####################################################################### - /// LOGGING WINDOW operations - /// + ///####################################################################### + /// LOGGING WINDOW operations + /// - public void on_view_log_file1_activate(object obj, EventArgs args) - { + public void on_view_log_file1_activate(object obj, EventArgs args) + { - } + } - public void on_enable_logging1_activate(object obj, EventArgs args) - { - Gtk.CheckMenuItem miLog = (Gtk.CheckMenuItem)obj; - if (miLog.Active) - OpenLogWindow(); - else - CloseLogWindow(); - } + public void on_enable_logging1_activate(object obj, EventArgs args) + { + Gtk.CheckMenuItem miLog = (Gtk.CheckMenuItem)obj; + if (miLog.Active) + OpenLogWindow(); + else + CloseLogWindow(); + } - internal void OpenLogWindow() - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLog", null); - gxmlTemp.Autoconnect (this); + internal void OpenLogWindow() + { + Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLog", null); + gxmlTemp.Autoconnect (this); - Gtk.TreeViewColumn col1 = new Gtk.TreeViewColumn("", new Gtk.CellRendererText(), "text", 0); - tvLog.AppendColumn(col1); - Logger.ActivateLogWindow(tvLog); - } + Gtk.TreeViewColumn col1 = new Gtk.TreeViewColumn("", new Gtk.CellRendererText(), "text", 0); + tvLog.AppendColumn(col1); + Logger.ActivateLogWindow(tvLog); + } + + internal void CloseLogWindow() + { + Logger.StopLogWindow(); + dialogLogin.Dispose(); + dialogLogin.Destroy(); + } + + + ///########################################################################### + /// Help Handlers + ///########################################################################### + public void OnMenuHelpActivate(object sender, EventArgs args) + { + Common.ShowHelpUrl("Contents.htm"); + } - internal void CloseLogWindow() - { - Logger.StopLogWindow(); - dialogLogin.Dispose(); - dialogLogin.Destroy(); } -} } ///########################################################################### /// END OF FILE diff --git a/c_gui/Common.cs b/c_gui/Common.cs index 4c0446fa..8accb36c 100644 --- a/c_gui/Common.cs +++ b/c_gui/Common.cs @@ -81,6 +81,10 @@ public class Common INDEX_NATIVEINFO_SYNC = 2, INDEX_NATIVEINFO_SYNCTYPE = 3, INDEX_NATIVEINFO_MODIFIEDTIME = 4; + + + public static string LINUX_HELP_PATH = "file:///opt/novell/CASA/help/"; + public static string WINDOWS_HELP_PATH = "..\\help\\"; ///############################################################## /// ARG CONSTANTS @@ -267,6 +271,60 @@ public class Common return false; } + private static string GetLocale() + { + if (IS_LINUX) + return "en/"; + else + return "en\\"; + } + + private static string GetHelpPath() + { + if (IS_LINUX) + return LINUX_HELP_PATH; + else + return WINDOWS_HELP_PATH; + } + + public static bool ShowHelpUrl(string sHelpFilename) + { + // get absolute path and locale + string sUrl = GetHelpPath() + GetLocale() + sHelpFilename; + return ShowUrl(sUrl); + } + + + public static bool ShowUrl(string url) + { + + Process urlShowProcess = new Process(); + + if (Common.IS_LINUX) + { + urlShowProcess.StartInfo.FileName = "gnome-open"; + urlShowProcess.StartInfo.Arguments = url; + } + else + urlShowProcess.StartInfo.FileName = url; + + try + { + urlShowProcess.Start(); + urlShowProcess.WaitForExit(); + } + catch (Exception e) + { + Logger.DbgLog(e.Message); + Logger.DbgLog(e.StackTrace); + return false; + } + + if (urlShowProcess.ExitCode == 0) + return true; + else + return false; + } } } diff --git a/c_gui/CommonGUI.cs b/c_gui/CommonGUI.cs index bbf153a0..9cebadab 100644 --- a/c_gui/CommonGUI.cs +++ b/c_gui/CommonGUI.cs @@ -71,6 +71,11 @@ namespace Novell.CASA.GUI dialogLogin.Show(); } + public void on_helpbuttonAuthentication_clicked(object sender, EventArgs args) + { + Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm"); + } + internal void menuDestroyMiCasa_Activated(CasaMain casaMain, CasaTray tray) { mCasaInstance = casaMain; diff --git a/c_gui/MiCasa.cs b/c_gui/MiCasa.cs index fbf64bba..f9e1d378 100644 --- a/c_gui/MiCasa.cs +++ b/c_gui/MiCasa.cs @@ -376,6 +376,11 @@ public class MiCasa : Store Logger.DbgLog("GUI:MiCasa.OnKeyValueEdited() - END"); } + + public void on_buttonhelpEditSecret_clicked(object obj, EventArgs args) + { + Common.ShowHelpUrl("EditingSecrets.html"); + } /// /// ADD BUTTON CLICKED @@ -540,6 +545,11 @@ public class MiCasa : Store entryMasterPassword3.HasFocus = true; } } + + public void on_helpbuttonAuthentication_clicked(object obj, EventArgs args) + { + Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm"); + } /// /// MANAGE SECRET-ID DIALOG OK-BUTTON CLICKED @@ -796,15 +806,18 @@ public class MiCasa : Store Logger.DbgLog("GUI:MiCasa.on_buttonNewOk_clicked() - END"); } - - + public void on_buttonNewCancel_clicked(object obj, EventArgs args) { dialogNewSecret.Destroy(); } + + public void on_helpbuttonNewSecret_clicked(object obj, EventArgs args) + { + Common.ShowHelpUrl("AddNewSecrets.htm"); + } + - - ///####################################################################### /// LINK @@ -830,6 +843,10 @@ public class MiCasa : Store } + public void on_helpbuttonLinkKeys_clicked(object obj, EventArgs args) + { + Common.ShowHelpUrl("LinkingSecrets.htm"); + } ///####################################################################### diff --git a/c_gui/help/en/AddNewSecrets.htm b/c_gui/help/en/AddNewSecrets.htm new file mode 100644 index 00000000..75585426 --- /dev/null +++ b/c_gui/help/en/AddNewSecrets.htm @@ -0,0 +1,63 @@ + + + + Novell® CASA Manager + + + + + +
+
+
+ + + +
Adding New Secrets
+ + +

CASA enables you to manually create new secrets or to + manage secrets that have been previously created by programs that integrate + with CASA. To manually create a new secret, use the following procedure:

+
    +
  1. In CASA Manager, click File > New > New Secret
  2. +
  3. Type the identifying name of the new secret in the Secret ID field, for + example, “Example Secret.”
  4. +
  5. Type the name of the key and its value in the Key and Value fields, + for example, Key: “Password,” and Value: “testpassword.” + The asterisk (*) is the only restricted character in both the Key and Value fields.
  6. +
  7. Click the + button to add the newly formed Key-Value pair for the + new secret.
  8. +
  9. By default, to safe guard secrets, values are shown as asterisks (*). + To show values in clear text, select "Show Values in clear text", and + enter your master password to enable a single instance display + of the value in the Value field.
  10. +
  11. Click OK to add the new secret, with its corresponding Key-Value pair, + to the credential store. The secret will now display in the Secret-ID window, + indicating that it has been added to the miCASA credential store.
  12. +
+

See also Editing Secrets.

+ +
+ + Refreshing Credentials Stores +

Refresh Stores in CASA Manager is used to reload all Secrets from the configured stores. + The miCASA store is supported on Windows* and Linux*. KDE Wallet and GNOME* + Keyring are additional stores supported in Linux*.

+

A trademark symbol (®, TM, etc.) denotes a Novell trademark. + An asterisk (*) denotes a third-party trademark. For information on trademarks, + see Legal Notices. + +

+ +

+
+ + \ No newline at end of file diff --git a/c_gui/help/en/CASAMasterPasswordAuthentication.htm b/c_gui/help/en/CASAMasterPasswordAuthentication.htm new file mode 100644 index 00000000..c3c95170 --- /dev/null +++ b/c_gui/help/en/CASAMasterPasswordAuthentication.htm @@ -0,0 +1,54 @@ + + + + +Novell® CASA Manager + + + + + + +
+
+
+ + + +
Setting Master Password
+ + +

When you start CASA Manager, you are prompted to + enter a master password. You are prompted for your master password when + displaying the values of secrets. The master password must be at least 8 characters + long.

+ Your desktop password and master password are used to encypt your secrets + and store them on your computer. When you login to the computer, CASA will decrypt + the saved secrets using your desktop password and make them available for + applications integrated with CASA. + If your desktop password changes, you must run CASA Manager and enter your master + password before CASA can decrypt your saved secrets. + + You can change the master password by using the following procedure from the main CASA Manager + screen:

+
    +
  1. Click Options > Change Master Password.
  2. +
  3. Enter your current master password, Enter your new master password, re-enter + your new master password, then click OK.
  4. +
+ + +

Important: To prevent unauthorized access to your credential stores, + always create confidential passwords that are not easily discovered.

+ + +
+
+ + \ No newline at end of file diff --git a/c_gui/help/en/Contents.htm b/c_gui/help/en/Contents.htm new file mode 100644 index 00000000..8cfbf66a --- /dev/null +++ b/c_gui/help/en/Contents.htm @@ -0,0 +1,61 @@ + + + + Novell® CASA Manager + + + + + +
+
+
+ +
Contents
+ +

Common Authentication Service Adapter (CASA) is the common + cross-platform foundation for authentication and single sign-on services for + Novell® Linux* Desktop, Microsoft* Windows*, and Macintosh* OS 10 operating + systems. CASA Manageris the graphical user interface that enables you to access + and manage the authentication credentials (secrets) of the programs and services + installed any any of these platforms.

+

This Help file contains the following topics:

+ + + +

Important: Because CASA Manager collects and displays security credentials + from secure applications running on your system, this software should not + be used in any public environment where security might be compromised. In + addition, because CASA is integrated with your workstation login and other + resident applications that require authentication credentials, you should + create confidential passwords that are not easily broken in order to prevent + unauthorized access.

+ +
A trademark symbol (®, TM, etc.) denotes a Novell trademark. + An asterisk (*) denotes a third-party trademark. For information on trademarks, + see Legal Notices.
+

+
+
+ + \ No newline at end of file diff --git a/c_gui/help/en/DestroyingSecrets.htm b/c_gui/help/en/DestroyingSecrets.htm new file mode 100644 index 00000000..3ab1dd99 --- /dev/null +++ b/c_gui/help/en/DestroyingSecrets.htm @@ -0,0 +1,34 @@ + + + + Novell® CASA Manager + + + + + +
+
+
+ + + +
Destroying Secrets
+ +

Use the following procedure to clear your cache and destroy + all credentials that are stored in memory:

+
    +
  • Click File > Destroy Secrets, then click OK.
  • +
+

You can restore your secrets manually by creating new + secrets or automatically by rebooting your system, or by installing new applications + and refreshing credential stores.

+
+ + \ No newline at end of file diff --git a/c_gui/help/en/EditingSecrets.html b/c_gui/help/en/EditingSecrets.html new file mode 100644 index 00000000..cac430d5 --- /dev/null +++ b/c_gui/help/en/EditingSecrets.html @@ -0,0 +1,47 @@ + + + + Novell® CASA Manager + + + + + +
+
+
+ + + +
Editing Secrets
+ + +

You edit a secret by adding new Key-Value pairs or changing + existing Key-Value pairs:
+

+
    +
  1. In the main Secret-ID window, double-click the secret you want to edit.
    +
  2. +
  3. Type a second password key and corresponding password value (for example, + Password2 and testpassword2) in the Key and Value fields, then click the + + button.
    + In this example, from the new Password2 key, the value is encrypted and + displays as asterisks. To show the value in clear text, click Show Values + in Clear Text, then enter your master password.
    +
  4. +
  5. To edit the password value, click the Value field in the Key-Value pairs + window, type your new value, then click OK. The new password value is saved + in the miCASA credential store.
    + After they are created, Secret ID names cannot be edited.
  6. +
+ +

+
+ + \ No newline at end of file diff --git a/c_gui/help/en/LinkA.gif b/c_gui/help/en/LinkA.gif new file mode 100644 index 00000000..4bcdb758 Binary files /dev/null and b/c_gui/help/en/LinkA.gif differ diff --git a/c_gui/help/en/LinkingSecrets.htm b/c_gui/help/en/LinkingSecrets.htm new file mode 100644 index 00000000..8bc22dea --- /dev/null +++ b/c_gui/help/en/LinkingSecrets.htm @@ -0,0 +1,57 @@ + + + + Novell® CASA Manager + + + + + +
+
+
+ + + +
Linking Secrets
+ +

You can link two or more secrets so that their respective + passwords or key values are synchronized simultaneously. For example, you + can link the password of one secret to the password of another secret, all of the + keys with one secret to each other, or any combination to synchronize management + of all your secrets.

+

Currently, CASA provides only the ability to link keys + within the miCASA store. Link secrets by using the Link feature from the + CASA Manager:

+
    +
  1. Press the F2 key or click Edit > Link to open the Manage Secrets and + Key-Value pairs window.
  2. +
  3. Double click on the Key field to open the Link management + window. This utility enables you to link the keys of any secrets contained + in your miCASA store. +
  4. Click the Secret-ID component you want to link.
  5. +
  6. Click the Key you want to link, click the Key value you want to link, + then click the + Button to link the selected Key-Value pair.
  7. +
  8. Repeat Step 4 to add and link as many secrets as you want. The status + of your linked secrets is displayed in the Existing Linked Keys window.
  9. +
  10. To verify if a secret is linked, view its status in the Key-Value pairs + window. The Link field displays either Yes or No. Verify by following any + one of these steps:
    + * Double-click the secret.
    + * Right-click the secret > Click View.
    + * Press F2.
  11. +
  12. To unlink selected secrets, click any of the Secret-ID components listed + in the Existing Linked Keys window, then click the — button. The selected + secret is deleted from the Existing Linked Keys window.
  13. +
+ +

+
+ + \ No newline at end of file diff --git a/c_gui/help/en/Persistent Storage.htm b/c_gui/help/en/Persistent Storage.htm new file mode 100644 index 00000000..4438ad21 --- /dev/null +++ b/c_gui/help/en/Persistent Storage.htm @@ -0,0 +1,37 @@ + + + + Novell® CASA Manager + + + + + +
+
+
+ + + +
Persistent Storage
+ + +

CASA automatically saves your secrets on your computer + and retrieves them the next time you login. Your secrets are encrypted using + the password used for login, as well as the master password required to use + CASA Manager. Should the desktop password change, you will need to enter your + master password to decrypt your saved secrets. + See also Setting + Master Password.

+ + +

+
+ + \ No newline at end of file diff --git a/c_gui/help/en/Preferences.htm b/c_gui/help/en/Preferences.htm new file mode 100644 index 00000000..640448e1 --- /dev/null +++ b/c_gui/help/en/Preferences.htm @@ -0,0 +1,46 @@ + + + + +Novell® CASA Manager + + + + + + +
+
+
+ + + +
Preferences
+ + +

This option is active only when CASA is installed in a + Linux* environment. Linux provides support for miCASA, KDE Wallet, GNOME* + Keyring, or all three credential stores.

+

Use the following procedure to specify which credential + stores you want to use:

+
    +
  1. From the CASA Manager page, Click Options > Preferences
  2. +
  3. Select which credential stores you wish to use (miCASA, KDE Wallet, GNOME + Keyring).
  4. +
+

In Windows*, miCASA is the only credential store available, so references + to KDE Wallet and GNOME Keyring are inactive. +

A trademark symbol (®, TM, etc.) denotes a Novell trademark. An asterisk + (*) denotes a third-party trademark. For information on trademarks, see Legal Notices. + +

+
+ + \ No newline at end of file diff --git a/c_gui/help/en/UnlockSecrets.htm b/c_gui/help/en/UnlockSecrets.htm new file mode 100644 index 00000000..ad8bb2b7 --- /dev/null +++ b/c_gui/help/en/UnlockSecrets.htm @@ -0,0 +1,38 @@ + + + + Novell® CASA Manager + + + + + +
+
+
+ + + +
Locking and Unlocking Secrets
+ +

To prevent individuals and other applications from viewing + or manipulating your secrets, CASA enables you to lock secrets, which temporarily + disables the functionality of CASA.

+
    +
  1. Click File > Lock Secrets. The credential store tab (miCASA) and cached + secrets are dimmed when CASA is locked.
  2. +
  3. To unlock and restore functionality to CASA:
  4. +
  5. Click File > Unlock Secrets.
  6. +
  7. Enter your master password.
  8. +
+ +

+
+ + \ No newline at end of file diff --git a/c_gui/help/en/ViewSecrets.htm b/c_gui/help/en/ViewSecrets.htm new file mode 100644 index 00000000..56fbcbe6 --- /dev/null +++ b/c_gui/help/en/ViewSecrets.htm @@ -0,0 +1,38 @@ + + + + Novell® CASA Manager + + + + + +
+
+
+ + + +
Viewing Secret Values
+ + +

You can view the Key-Value pairs of all secrets cached + in the miCASA credential store.

+
    +
  1. In the main Secret-ID window, click the secret you want to view.
  2. +
  3. Click Edit > View or Press F2.
  4. +
  5. By default, the key values are encrypted and displayed as asterisks. To + show the value in clear text, click Show Values in Clear Text, then enter + your master password.
  6. +
+ +

+
+ + \ No newline at end of file diff --git a/c_gui/help/en/en.zip b/c_gui/help/en/en.zip new file mode 100644 index 00000000..ff33e28d Binary files /dev/null and b/c_gui/help/en/en.zip differ diff --git a/c_gui/help/en/h1_help_zcc.gif b/c_gui/help/en/h1_help_zcc.gif new file mode 100644 index 00000000..1367814e Binary files /dev/null and b/c_gui/help/en/h1_help_zcc.gif differ diff --git a/c_gui/help/en/help_zcc_bg.gif b/c_gui/help/en/help_zcc_bg.gif new file mode 100644 index 00000000..a6496f56 Binary files /dev/null and b/c_gui/help/en/help_zcc_bg.gif differ diff --git a/c_gui/help/en/hf_style.css b/c_gui/help/en/hf_style.css new file mode 100644 index 00000000..4468d5a5 --- /dev/null +++ b/c_gui/help/en/hf_style.css @@ -0,0 +1,157 @@ +a { color: #039; text-decoration: underline } +body { color: black; font-family: "Trebuchet MS", Arial, Helvetica, Geneva, Swiss, SunSans-Regular; background-color: white } +th, tr, td, table { font-family: "Trebuchet MS", Arial, Helvetica, Geneva, Swiss, SunSans-Regular } +p, li, ol, ul, td { font-size: 0.9em } +td label { font-size: 0.85em } +label { font-size: 0.765em; } + +h1 { font-weight: bold; font-size: 1.3em; line-height: 1.3em; margin-bottom: 0.6em } +h2 { font-weight: bold; font-size: 1.2em; line-height: 1.2em; margin-bottom: 0.4em } +h3 { font-weight: bold; font-size: 1em; line-height: 1.1em; margin-bottom: 0.2em } +h4 { font-weight: bold; font-size: 0.85em; line-height: 1em; margin-bottom: 0.1em } + +img.floatright { float: right } +img.margin1 { margin: 1px } +img.margin2 { margin: 2px } +img.margin4 { margin: 4px } +img.margin5r { margin-right: 5px } +img.margin5l { margin-left: 5px } +img.margin6 { margin: 6px } +img.margin8 { margin: 8px } +img.margin10 { margin: 10px } +img.margin10r { margin-right: 10px } +img.margin10l { margin-left: 10px; margin-right: 5px } + +span.tab1u { color: black; } +span.tab2u { text-decoration: underline } +span.tab2s { text-decoration: underline } + +.activitycolor { background-color: #e8e887 } +.allcaps { color: black; font-style: normal; font-weight: 500; font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.2em } +.errorlink { color: #c82727; font-weight: normal; margin-top: 2px } +.linktrialversion { color: #c82727; font-style: normal; font-weight: normal; font-size: 0.85em; text-decoration: underline } +.errorhead { color: #c82727; font-style: normal; font-weight: 800; font-size: 1.2em; line-height: 1.5em; margin-bottom: 0.7em } + +.formcolumnhead1 { color: black; font-weight: bold; font-size: 0.7em; text-align: center } +.formhead1 { color: white; font-weight: bold; font-size: 1em; background-color: #458ab9; text-align: left; text-indent: 0.2em; letter-spacing: 0.05em; vertical-align: middle; padding: 0.2em } +.formhead2 { color: white; font-weight: bold; font-size: 0.8em; line-height: 1.1em; background-color: #458ab9; text-align: left; text-indent: 0.5em; letter-spacing: 0.1em; vertical-align: middle } +.menuhead1 { color: white; font-weight: 600; font-size: 0.7em; line-height: 1em; background-color: #458ab9; text-align: center; text-transform: uppercase; letter-spacing: 0.1em; vertical-align: middle; padding: 0.2em } +.formhead1b { color: white; font-weight: bold; font-size: 1em; line-height: 1.2em; background-color: #458ab9; text-align: left; text-indent: 0.5em; vertical-align: middle } +.formdescriptext { color: #4d6d8b; font-size: 0.8em; margin-left: 1em } +.formdescriptextml0 { color: #4d6d8b; font-size: 0.8em } +.instructions { color: #4d6d8b; font-size: 0.8em } +.head1 { color: black; font-weight: bold; font-size: 1.3em; line-height: 1.3em; margin-bottom: 0.6em } +.head1a { color: #663; font-weight: bold; font-size: 1.3em; line-height: 1.3em; margin-bottom: 0.6em; margin-left: 1em } +.head1b { color: black; font-weight: bold; font-size: 1.3em; line-height: 1.3em } +.head1r { color: #e10000; font-weight: normal; font-size: 1.3em } +.head1w { color: white; font-weight: bold; font-size: 1.3em; line-height: 1.3em } + +.head2 { color: black; font-weight: bold; font-size: 1.2em; margin-top: 0.4em; margin-bottom: 1.2em } +.head2a { color: #663; font-weight: bold; font-size: 1.2em; margin-top: 0.4em } +.head2b { color: black; font-weight: 600; font-size: 1.2em; letter-spacing: 0.1em; margin-top: 0.4em; margin-bottom: 0.4em; border-bottom: 2px solid #458ab9 } +.head2tm6 { color: black; font-weight: bold; font-size: 1.2em; margin-top: 0.6em } +.head2tm8 { color: black; font-weight: bold; font-size: 1.2em; margin-top: 0.8em } +.head2w { color: #fff; font-weight: bold; font-size: 1.2em; } +.head2r { color: #e10000; font-weight: normal; font-size: 1.2em; margin-top: 0.5em } +.head2indent { color: black; font-weight: bold; font-size: 1.2em; margin-top: 0.4em; margin-left: 0.5em } + +.head3 { color: black; font-weight: bold; font-size: 1em; margin-top: 0.3em; margin-bottom: 1em } +.head3a { color: #663; font-weight: bold; font-size: 1em; margin-top: 0.3em } +.head3b { color: black; font-weight: bold; font-size: 1em; letter-spacing: 0.1em; margin-top: 0.4em; margin-bottom: 0.4em; border-bottom: 2px solid #458ab9 } +.head3d { color: black; font-weight: bold; font-size: 1em } +.head3center { color: black; font-weight: bold; font-size: 1em; text-align: center } +.head3indent { color: black; font-weight: bold; font-size: 1em; margin-top: 0.3em; margin-left: 1em } +.head3tm6 { color: black; font-weight: bold; font-size: 1em; margin-top: 0.6em; margin-bottom: 0.1em } +.head3tm8 { color: black; font-weight: bold; font-size: 1em; margin-top: 0.8em; margin-bottom: 0.2em } +.head3w { color: #fff; font-weight: bold; font-size: 1em } +.head3r { color: #e10000; font-weight: bold; font-size: 1em; letter-spacing: 0.05em; margin-top: 0.75em } + +.head4 { color: black; font-weight: bold; font-size: 0.85em; margin-top: 0.5em; margin-bottom: 0.2em; margin-left: 1em;} +.head4center { color: black; font-weight: bold; font-size: 0.85em; text-align: center } +.head4b { color: #663; font-weight: bold; font-size: 0.85em; margin-top: 0.2em } +.head4tm6 { color: black; font-weight: bold; font-size: 0.85em; margin-top: 0.6em; margin-bottom: 0.1em } +.head4tm8 { color: black; font-weight: bold; font-size: 0.85em; margin-top: 0.8em; margin-bottom: 0.2em } +.head4margin4 { color: black; font-weight: bold; font-size: 0.85em; background-color: #dfddd5; margin: 0.4em } + +.head5 { color: black; font-weight: 600; font-size: 0.75em; margin-top: 0.2em; margin-left: 2em; } +.head5a { color: black; font-weight: 600; font-size: 0.75em; margin-top: 0.2em } +.head5b { color: #663; font-weight: 600; font-size: 0.75em; margin-top: 0.2em; margin-left: 1em } +.head5tm6 { color: black; font-weight: 600; font-size: 0.75em; margin-top: 0.6em; margin-left: 1em } +.head5tm8 { color: black; font-weight: 600; font-size: 0.75em; margin-top: 0.8em; margin-left: 1em } +.hint1 { color: #663; font-size: 12px; line-height: 14px } + +.inactive { color: #6c8899 } +.margintop1 { margin-left: 1em; margin-top: 0.3em } +.margintop2 { margin-top: 0.5em } +.margintop3 { margin-top: 1em } +.marginleft1 { margin-left: 1.5em; margin-top: 0.3em } +.marginleft1b { font-size: 0.85em; margin-left: 1em } +.marginleft2 { margin-left: 2em } +.marginleft3 { margin-left: 3em } +.marginleft4 { margin-left: 4em } + +.nonproportional { font-size: 10pt; font-family: "Courier New", Courier, Monaco } +.padding8 { padding: 8px } +.padding2x4 { padding-top: 2px; padding-bottom: 2px; padding-right: 4px; padding-left: 4px } +.padding2 { padding: 2px } +.padding4 { padding: 4px } +.rowaltcolor { background-color: #f4f4f4 } +.scroll1 { background-color: #efeee9; padding: 10px 12px 10px 10px; overflow: auto } +.ruleblue { color: #458ab9 } +.rulebelow { padding-bottom: 5px; border-bottom: 2px solid #458ab9 } +.rulebelow2 { padding-bottom: 3px; border-bottom: 1px solid #babdb6 } +.ruleabove { padding-top: 5px; border-top: 2px solid #458ab9 } + +.breadcrumb { color: #848582; font-size: 0.65em; line-height: 1em; text-decoration: none; margin-bottom: 1em } +.smalltext { color: black; font-size: 0.75em; line-height: 1em } +.smalltext2a { color: #663; font-size: 0.75em; line-height: 1em } +.smalltext2b { color: black; font-weight: bold; font-size: 0.75em; line-height: 1em } +.smalltext2c { color: #355263; font-size: 0.75em; line-height: 1.1em; width: 480px } +.smalltext2d { color: #355263; font-size: 0.75em } +.mediumtext { color: black; font-size: 0.85em; line-height: 1.1em } +.largetext { color: black; font-style: normal; font-weight: normal; font-size: 1em; line-height: 1.1em } +.textblue1 { color: #4d6d8b; font-size: 0.9em; line-height: 1.2em } +.typegold1 { color: #663; font-size: 1em; line-height: 1.1em } +.typegold2 { color: #663; font-size: 0.85em; line-height: 1.1em } + +.tablecolumnhead1 { color: black; font-weight: bold; font-size: 0.75em; background-color: #efeeec; border-bottom: 1px solid black } +.tablecolumnhead1b { color: black; font-weight: bold; font-size: 0.75em; border-bottom: 1px solid black } +.tablecolumnhead2 { color: #663; font-weight: 600; font-size: 0.75em; text-align: center } +.tablehead1 { color: white; font-weight: bold; font-size: 0.95em; background-color: #458ab9; text-align: left; text-indent: 0.2em; padding: 0.2em } +.tablehead2 { color: black; font-weight: 600; font-size: 0.9em; line-height: 1.1em; background-color: #cc9; text-align: left; text-indent: 0.5em; letter-spacing: 0.1em } +.tablehead1b { font-weight: bold; font-size: 1em; line-height: 1.1em; background-color: #cc9; text-align: left; text-indent: 0.5em } +.tablesubhead1 { color: black; font-weight: bold; font-size: 0.85em; background-color: #efeeec; text-align: left; text-indent: 0.2em; padding: 0.2em } +.tablesubhead3 { color: black; font-weight: 600; font-size: 0.75em; background-color: #dfddd5; text-align: left; padding: 0.2em } +.tablesubhead2 { color: black; font-weight: normal; font-size: 0.85em; background-color: #efeeec; text-align: left; padding: 0.2em } +.tabb { font-weight: bold; font-size: 14pt;} +.tabw { color: white; font-weight: bold; font-size: 14pt; } + +.task1 { font-size: 0.7em; margin-top: 0.35em; margin-left: 1.3em } +.grouphead { color: #333; font-weight: 600; font-size: 0.8em; line-height: 0.9em; margin-top: 0.7em; margin-left: 1.2em } +.task1a { font-size: 0.7em; margin-top: 0.35em } +.task2 { font-size: 0.7em; margin-top: 0.35em; margin-left: 2.3em } +.task3 { color: #003399; font-size: 0.6em; line-height: 1em; text-decoration: none; margin-top: 0.5em; margin-bottom: 0.5em; margin-left: 0.5em } +.task3b { color: #003399; font-size: 0.75em; line-height: 1em; text-decoration: none; margin-top: 0.5em; margin-bottom: 0.5em; margin-left: 0.5em } +.navhead { color: black; font-weight: bold; font-size: 0.85em; line-height: 0.9em; background-color: #cfcdc6; vertical-align: middle; padding: 4px } +.role1 { color: black; font-weight: bold; font-size: 0.75em; line-height: 0.85em; text-decoration: none; margin-top: 0.6em } + +.windowheaddgrey { color: #5a5958; font-weight: bold; font-size: 18pt; line-height: 18pt; letter-spacing: 1px } +.windowheadblack { color: #5a5958; font-weight: bold; font-size: 18pt; line-height: 18pt; letter-spacing: 1px } +.windowheadwhite { color: white; font-weight: bold; font-size: 18pt; line-height: 18pt; letter-spacing: 1px } +.width350 { width: 350px } +.width300 { width: 300px } +.width400 { width: 400px } +.width450 { width: 450px } +.width500 { width: 500px } + +.headcapwide { color: #663; font-weight: 600; font-size: 0.6em; letter-spacing: 0.2em } +.subtitle1 { color: black; font-weight: bold; font-size: 14px; line-height: 14px } +.subtitle2 { color: white; font-weight: bold; font-size: 14px; line-height: 14px } + +.headpb { color: black; font-weight: bold; font-size: 15px; text-align: left; vertical-align: top; letter-spacing: 2px } +.tab1s { color: white; font-weight: bold; font-size: 12px; line-height: 17px; text-decoration: none; background-color: #458ab9; text-align: center; white-space: nowrap } +.tab1u { color: black; background-color: #DFDDD5; font-size: 12px; text-decoration: none; font-weight: bold; text-align: center; white-space: nowrap } +.tab2s { color: white; font-weight: bold; font-size: 11px; text-decoration: none; background-color: #458ab9; white-space: nowrap } +.tab2u { color: white; font-weight: normal; font-size: 11px; text-decoration: none; background-color: #458ab9; white-space: nowrap } + +.copyright { color: #cfcdc6; font-size: 0.55em } \ No newline at end of file diff --git a/c_gui/help/en/legal_notices_en.html b/c_gui/help/en/legal_notices_en.html new file mode 100644 index 00000000..d016b5fd --- /dev/null +++ b/c_gui/help/en/legal_notices_en.html @@ -0,0 +1,62 @@ + + + + + Novell ZENworks Control Center + + + + + +
+
+
+ +
Legal Notices
+ +

Disclaimer
+Novell, Inc. makes no representations or warranties with respect to the contents or use of +this documentation and specifically disclaims any express or implied warranties of +merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the +right to revise this publication and to make changes to its content, at any time, without +obligation to notify any person or entity of such revisions or changes.

+ +

Further, Novell, Inc. makes no representations or warranties with respect to any Novell +software, and specifically disclaims any express or implied warranties of merchantability +or fitness for any particular purpose. Further, Novell, Inc. reserves the right to make +changes to any and all parts of Novell software, at any time, without any obligation to +notify any person or entity of such changes.

+ +

Export Notice
+ You may not use, export, or re-export this product in violation of any applicable + laws or regulations including, without limitation, U.S. export regulations + or the laws of the country in which you reside. +

Copyright
+ Copyright © 2005 Novell, Inc. All rights reserved. No part of this publication + may be reproduced, photocopied, stored on a retrieval system, or transmitted + without the express written consent of the publisher.

+ +

Patents
+ Novell, Inc. has intellectual property rights relating to technology embodied + in the product that is described in this document. In particular, and without + limitation, these intellectual property rights may include one or more of + the U.S. patents listed at http://www.novell.com/company/legal/patents/ + and one or more additional patents or pending patent applications in the U.S. + and in other countries.

+ +

Novell Trademarks
+Novell, NetWare, and ZENworks are registered trademarks of Novell, Inc. in the United States and +other countries. +

eDirectory and Red Carpet are trademarks of Novell, Inc.

+ +

Third-Party Trademarks
+All third-party trademarks are the property of their respective owners.

+
+ + \ No newline at end of file diff --git a/c_gui/images/casa-1.5.glade b/c_gui/images/casa-1.5.glade index 25462add..23f68683 100644 --- a/c_gui/images/casa-1.5.glade +++ b/c_gui/images/casa-1.5.glade @@ -52,7 +52,7 @@ True - + True gtk-new 1 @@ -74,7 +74,7 @@ - + True gtk-new 1 @@ -95,7 +95,7 @@ - + True gtk-new 1 @@ -121,7 +121,7 @@ - + True gtk-refresh 1 @@ -148,7 +148,7 @@ - + True gtk-dialog-authentication 1 @@ -169,7 +169,7 @@ - + True gtk-open 1 @@ -190,7 +190,7 @@ - + True gtk-delete 1 @@ -218,7 +218,7 @@ - + True gtk-quit 1 @@ -254,7 +254,7 @@ - + True gtk-zoom-fit 1 @@ -275,7 +275,7 @@ - + True gtk-jump-to 1 @@ -296,7 +296,7 @@ - + True gtk-copy 1 @@ -324,7 +324,7 @@ - + True gtk-delete 1 @@ -358,7 +358,7 @@ - + True gtk-revert-to-saved 1 @@ -379,7 +379,7 @@ - + True gtk-preferences 1 @@ -413,7 +413,7 @@ - + True gtk-file 1 @@ -434,7 +434,7 @@ - + True gtk-missing-image 1 @@ -481,10 +481,11 @@ True _Contents True + - + True gtk-help 1 @@ -511,7 +512,7 @@ - + True gtk-dialog-info 1 @@ -1329,7 +1330,7 @@ GTK_BUTTONBOX_END - + True True True @@ -1338,6 +1339,7 @@ GTK_RELIEF_NONE True -11 + @@ -1511,7 +1513,7 @@ their backend stores. GTK_BUTTONBOX_END - + True True True @@ -1520,6 +1522,7 @@ their backend stores. GTK_RELIEF_NONE True -11 + @@ -1919,7 +1922,7 @@ their backend stores. True True - Show passwords in clear text. + Show Values in clear text. True GTK_RELIEF_NORMAL True @@ -2061,7 +2064,7 @@ their backend stores. GTK_BUTTONBOX_END - + True True True @@ -2070,6 +2073,7 @@ their backend stores. GTK_RELIEF_NONE True -11 + @@ -3161,19 +3165,6 @@ their backend stores. True GTK_BUTTONBOX_END - - - True - True - True - gtk-help - True - GTK_RELIEF_NONE - True - -11 - - - True @@ -3941,7 +3932,7 @@ prompted for the Master Password at startup. GTK_BUTTONBOX_END - + True True True @@ -3950,6 +3941,7 @@ prompted for the Master Password at startup. GTK_RELIEF_NONE True -11 + @@ -4418,13 +4410,14 @@ prompted for the Master Password at startup. GTK_BUTTONBOX_EDGE - + True True True GTK_RELIEF_NONE True -7 + @@ -4762,7 +4755,7 @@ CSL Manojna</b> GTK_BUTTONBOX_END - + True True True @@ -4771,6 +4764,7 @@ CSL Manojna</b> GTK_RELIEF_NONE True -11 + @@ -5202,7 +5196,7 @@ prompted for the Master Password at startup. GTK_BUTTONBOX_END - + True True True @@ -5211,6 +5205,7 @@ prompted for the Master Password at startup. GTK_RELIEF_NONE True -11 + @@ -6421,7 +6416,7 @@ by cilcking the Close button. GTK_BUTTONBOX_END - + True True True @@ -6430,6 +6425,7 @@ by cilcking the Close button. GTK_RELIEF_NORMAL True -11 + diff --git a/c_jwrapper/c_jwrapper.iws b/c_jwrapper/c_jwrapper.iws index 75931b8b..239403bf 100644 --- a/c_jwrapper/c_jwrapper.iws +++ b/c_jwrapper/c_jwrapper.iws @@ -12,27 +12,27 @@ - - - + + + - - - + + + - + - + - - + + @@ -273,17 +273,15 @@ - - - + + + - - - + diff --git a/c_jwrapper/src/com/novell/casa/MiCasaTest.java b/c_jwrapper/src/com/novell/casa/MiCasaTest.java index fc952413..d74b96a1 100644 --- a/c_jwrapper/src/com/novell/casa/MiCasaTest.java +++ b/c_jwrapper/src/com/novell/casa/MiCasaTest.java @@ -18,7 +18,7 @@ public class MiCasaTest { store.setCredential(0, "JavaAppID", "Network", 0, "javaAppID Username", "javaAppID Password"); store.setCredential(0, "Groupwise", null, 0, "groupwise Username", "gw Password"); - NetCredential nc = store.getCredential(0, "Groupwise", null, 0); + NetCredential nc = store.getCredential(0, "JavaAppID", null, 0); System.out.println("Username: "+nc.getUsername()); System.out.println("Password: "+nc.getPassword()); diff --git a/shsrc/lshsrc/CASA.spec b/shsrc/lshsrc/CASA.spec index 0c43d080..ed080cd1 100644 --- a/shsrc/lshsrc/CASA.spec +++ b/shsrc/lshsrc/CASA.spec @@ -18,7 +18,7 @@ License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: Productivity/Other Autoreqprov: on %define bldno 1.1.1 -Version: 1.5.127 +Version: 1.5.128 Release: 0 Summary: Novell Common Authentication Service Adapter (CASA) Source: %{name}-%{version}.tar.bz2 @@ -49,7 +49,7 @@ for credential storage and single sign-on. %package gui Summary: The CASA Console Utility Group: Productivity/Other -Requires: CASA = %{version} gtk-sharp >= 1.0.9 +Requires: CASA = %{version} gtk-sharp >= 1.0.9 gnome-keyring >= 0.2.1 kdelibs3 >= 3.2.1 Provides: CASA-gui %description gui @@ -81,6 +81,8 @@ mkdir %{buildroot}%{prefix}/CASA/%{_lib} mkdir %{buildroot}%{prefix}/CASA/bin mkdir %{buildroot}%{prefix}/CASA/include mkdir %{buildroot}%{prefix}/CASA/images +mkdir %{buildroot}%{prefix}/CASA/help +mkdir %{buildroot}%{prefix}/CASA/help/en mkdir %{buildroot}%{prefix}/CASA/doc mkdir -p %{buildroot}/%{_lib}/security @@ -100,6 +102,7 @@ install -m 755 %{binsource}/lux/ndbg/CASAManager.exe %{buildroot}%{prefix}/CASA/ install -m 755 c_gui/CASAManager.sh %{buildroot}%{prefix}/CASA/bin install -m 755 c_gui/CASAManager.desktop %{buildroot}%{prefix}/CASA/ cp -f c_gui/images/* %{buildroot}%{prefix}/CASA/images +cp -f c_gui/help/en/* %{buildroot}%{prefix}/CASA/help/en install -m 755 c_micasad/startup/micasad %{buildroot}%{prefix}/CASA/bin install -m 755 c_micasad/startup/micasad.sh %{buildroot}%{prefix}/CASA/bin #install -m 755 c_clientlogin/novell-ncl-autologin.sh %{buildroot}%{prefix}/CASA/bin @@ -114,6 +117,7 @@ install -d %{buildroot}%{prefix}/CASA/bin install -d %{buildroot}%{prefix}/CASA/doc install -d %{buildroot}%{prefix}/CASA/include install -d %{buildroot}%{prefix}/CASA/images +install -d %{buildroot}%{prefix}/CASA/help/en install -d %{buildroot}/%{_lib}/security @@ -290,4 +294,7 @@ rm -rf $RPM_BUILD_ROOT %dir %{prefix}/CASA/images %dir %{prefix}/CASA/images/* +%dir %{prefix}/CASA/help/en +%dir %{prefix}/CASA/help/en/* + %changelog -n CASA