diff --git a/c_gui/CasaMain.cs b/c_gui/CasaMain.cs
index 5e9abef0..0a09cbcf 100644
--- a/c_gui/CasaMain.cs
+++ b/c_gui/CasaMain.cs
@@ -57,13 +57,17 @@ public class CasaMain
dialogConfirmRefresh,
dialogSingleInstance,
dialogLoginReprompt,
- dialogShortPassword;
+ dialogShortPassword,
+ dialogResetMP;
[Glade.Widget]
Gtk.Entry entryMasterPassword1,
entryMasterPassword2,
entryMasterPassword3,
- entryMasterPassword4;
+ entryMasterPassword4,
+ entryOldMP,
+ entryNewMP1,
+ entryNewMP2;
[Glade.Widget]
Gtk.CheckButton checkbuttonFirefox,
@@ -172,6 +176,7 @@ public class CasaMain
{
MasterPasswordAuthentication();
+
if (Common.IsTrayAvailable()) // && Common.IsArgSet(args, Common.ARG_SHOW_TRAY_ICON))
{
try
@@ -180,7 +185,8 @@ public class CasaMain
mCasaTray = new CasaTray();
}
catch{}
- }
+ }
+
}
else
{
@@ -950,6 +956,87 @@ public class CasaMain
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;
+ }
+
+ // 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.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");
+
+ Logger.DbgLog("GUI:CasaMain.okbuttonResetMasterPWD_clicked() - END");
+ }
+
+ 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);
+
+ md.Response +=new ResponseHandler(md_Response);
+ //md_ResponseCloseWindow
+ md.Show();
+
+ }
+
///#######################################################################
diff --git a/c_gui/Logger.cs b/c_gui/Logger.cs
index ad7df952..769034ae 100644
--- a/c_gui/Logger.cs
+++ b/c_gui/Logger.cs
@@ -99,8 +99,8 @@ namespace Novell.CASA.GUI
+ ": Exception encountered - ");
tsLog.AppendValues(message);
- StackTrace st = new StackTrace();
- tsLog.AppendValues(st.ToString());
+ StackTrace st1 = new StackTrace();
+ tsLog.AppendValues(st1.ToString());
}
#if DEBUG
diff --git a/c_gui/images/casa-1.5.glade b/c_gui/images/casa-1.5.glade
index 9f6c2499..25462add 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
@@ -351,14 +351,14 @@