From cc583ead26c4086972c124a23a9213dd0af4fdbf Mon Sep 17 00:00:00 2001 From: smanojna Date: Fri, 5 May 2006 14:45:46 +0000 Subject: [PATCH] --- c_gui/Firefox.cs | 9 ++------- c_gui/GnomeKeyring.cs | 11 +++-------- c_gui/KdeWallet.cs | 11 +++-------- c_gui/MiCasa.cs | 10 +++------- 4 files changed, 11 insertions(+), 30 deletions(-) diff --git a/c_gui/Firefox.cs b/c_gui/Firefox.cs index 62436634..e902c39d 100644 --- a/c_gui/Firefox.cs +++ b/c_gui/Firefox.cs @@ -304,7 +304,7 @@ public class Firefox : Store if( false == entrySecretID.Editable ) { - if( ("" != args.NewText) && (Common.MAX_LEN >= args.NewText.Length) && (KeyValue != args.NewText) && true == Common.ValidateString(args.NewText) ) + if( ("" != args.NewText) && (Common.MAX_LEN >= args.NewText.Length) && (KeyValue != args.NewText) ) { if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(Common.STORE_FIREFOX, Common.OPERATION_MODIFY_KEY, KeyName, args.NewText, ref model, ref iter) ) { @@ -329,12 +329,7 @@ public class Firefox : Store } else Logger.DbgLog("GUI:Firefox.OnKeyValueEdited() - ERROR: STATUS_STORE_UPDATEFAILED"); - } - else if( false == Common.ValidateString(args.NewText) ) - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogSpecialCharacter", null); - gxmlTemp.Autoconnect (this); - } + } } else if( (Common.MAX_LEN >= args.NewText.Length) ) { diff --git a/c_gui/GnomeKeyring.cs b/c_gui/GnomeKeyring.cs index 6697f4ac..545e0937 100644 --- a/c_gui/GnomeKeyring.cs +++ b/c_gui/GnomeKeyring.cs @@ -339,7 +339,7 @@ public class GnomeKeyring : Store if( false == entrySecretID.Editable ) { - if( ("" != args.NewText) && (Common.MAX_LEN >= args.NewText.Length) && (KeyValue != args.NewText) && true == Common.ValidateString(args.NewText) ) + if( ("" != args.NewText) && (Common.MAX_LEN >= args.NewText.Length) && (KeyValue != args.NewText) ) { if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(Common.STORE_GNOMEKEYRING, Common.OPERATION_MODIFY_KEY, KeyName, args.NewText, ref model, ref iter) ) { @@ -364,12 +364,7 @@ public class GnomeKeyring : Store } else Logger.DbgLog("GUI:GnomeKeyring.OnKeyValueEdited() - ERROR: STATUS_STORE_UPDATEFAILED"); - } - else if( false == Common.ValidateString(args.NewText) ) - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogSpecialCharacter", null); - gxmlTemp.Autoconnect (this); - } + } } else if( (Common.MAX_LEN >= args.NewText.Length) ) { @@ -417,7 +412,7 @@ public class GnomeKeyring : Store while( tsKeyValue.IterNext(ref iterKey) ); } if( -1 == arrKeys.IndexOf(entryKey.Text) ) - if( true == Common.ValidateString(entryKey.Text) && true == Common.ValidateString(entryValue.Text) ) + if( true == Common.ValidateString(entryKey.Text) ) { iterKey = tsKeyValue.AppendValues(entryKey.Text, entryValue.Text, "********", true, "No"); entryKey.Text = entryValue.Text = ""; diff --git a/c_gui/KdeWallet.cs b/c_gui/KdeWallet.cs index 65f187c8..c4e7e09c 100644 --- a/c_gui/KdeWallet.cs +++ b/c_gui/KdeWallet.cs @@ -339,7 +339,7 @@ public class KdeWallet : Store if( false == entrySecretID.Editable ) { - if( ("" != args.NewText) && (Common.MAX_LEN >= args.NewText.Length) && (KeyValue != args.NewText) && true == Common.ValidateString(args.NewText) ) + if( ("" != args.NewText) && (Common.MAX_LEN >= args.NewText.Length) && (KeyValue != args.NewText) ) { if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(Common.STORE_KDEWALLET, Common.OPERATION_MODIFY_KEY, KeyName, args.NewText, ref model, ref iter) ) { @@ -364,12 +364,7 @@ public class KdeWallet : Store } else Logger.DbgLog("GUI:KdeWallet.OnKeyValueEdited() - ERROR: STATUS_STORE_UPDATEFAILED"); - } - else if( false == Common.ValidateString(args.NewText) ) - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogSpecialCharacter", null); - gxmlTemp.Autoconnect (this); - } + } } else if( (Common.MAX_LEN >= args.NewText.Length) ) { @@ -416,7 +411,7 @@ public class KdeWallet : Store while( tsKeyValue.IterNext(ref iterKey) ); } if( -1 == arrKeys.IndexOf(entryKey.Text) ) - if( true == Common.ValidateString(entryKey.Text) && true == Common.ValidateString(entryValue.Text) ) + if( true == Common.ValidateString(entryKey.Text) ) { iterKey = tsKeyValue.AppendValues(entryKey.Text, entryValue.Text, "********", true, "No"); entryKey.Text = entryValue.Text = ""; diff --git a/c_gui/MiCasa.cs b/c_gui/MiCasa.cs index 959a10e7..e4a51b2d 100644 --- a/c_gui/MiCasa.cs +++ b/c_gui/MiCasa.cs @@ -365,7 +365,7 @@ public class MiCasa : Store if( false == entrySecretID.Editable ) { - if( ("" != args.NewText) && (Common.MAX_LEN >= args.NewText.Length) && (KeyValue != args.NewText) && true == Common.ValidateString(args.NewText) ) + if( ("" != args.NewText) && (Common.MAX_LEN >= args.NewText.Length) && (KeyValue != args.NewText) ) { if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(Common.STORE_MICASA, Common.OPERATION_MODIFY_KEY, KeyName, args.NewText, ref model, ref iter) ) { @@ -391,11 +391,7 @@ public class MiCasa : Store else Logger.DbgLog("GUI:MiCasa.OnKeyValueEdited() - ERROR: STATUS_STORE_UPDATEFAILED"); } - else if( false == Common.ValidateString(args.NewText) ) - { - Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogSpecialCharacter", null); - gxmlTemp.Autoconnect (this); - } + } else if( (Common.MAX_LEN >= args.NewText.Length) ) { @@ -443,7 +439,7 @@ public class MiCasa : Store while( tsKeyValue.IterNext(ref iterKey) ); } if( -1 == arrKeys.IndexOf(entryKey.Text) ) - if( true == Common.ValidateString(entryKey.Text) && true == Common.ValidateString(entryValue.Text) ) + if( true == Common.ValidateString(entryKey.Text) ) { iterKey = tsKeyValue.AppendValues(entryKey.Text, entryValue.Text, "********", true, "No"); entryKey.Text = entryValue.Text = "";