- Added Application SSO feature to CASAManager (Linux).
We will be able to add single sign-on information to Konquerer and NetworkManager appilcations from within CASAManager. Main-Menu: Options > Application SSO. - Fixed an expection thrown during GnomeKeyring delete secret operation. - All textboxes in CASAManager have been updated to take not more than 256 characters (just a small check to avoid buffer-overflows).
This commit is contained in:
parent
52f11fa9cd
commit
36e3a1ef20
11
CASA.changes
11
CASA.changes
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 7 19:20:50 IST 2006 - smanojna@novell.com
|
||||
|
||||
- Added Application SSO feature to CASAManager (Linux).
|
||||
We will be able to add single sign-on information to Konquerer and
|
||||
NetworkManager appilcations from within CASAManager.
|
||||
Main-Menu: Options > Application SSO.
|
||||
- Fixed an expection thrown during GnomeKeyring delete secret operation.
|
||||
- All textboxes in CASAManager have been updated to take not more than
|
||||
256 characters (just a small check to avoid buffer-overflows).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 7 15:08:26 IST 2006 - smanojna@novell.com
|
||||
|
||||
|
1060
c_gui/CasaMain.cs
1060
c_gui/CasaMain.cs
File diff suppressed because it is too large
Load Diff
@ -35,11 +35,11 @@ using Glade;
|
||||
public class Common
|
||||
{
|
||||
|
||||
public const int STORE_MICASA = 0,
|
||||
STORE_FIREFOX = 1,
|
||||
STORE_MOZILLA = 2,
|
||||
STORE_KDEWALLET = 3,
|
||||
STORE_GNOMEKEYRING = 4;
|
||||
public const int STORE_MICASA = 0,
|
||||
STORE_FIREFOX = 1,
|
||||
STORE_MOZILLA = 2,
|
||||
STORE_KDEWALLET = 3,
|
||||
STORE_GNOMEKEYRING = 4;
|
||||
|
||||
public static bool IS_MICASA_AVAILABLE = true,
|
||||
IS_FIREFOX_AVAILABLE = false,
|
||||
@ -66,10 +66,10 @@ public class Common
|
||||
|
||||
public static int MAX_STORES = 10;
|
||||
|
||||
public static string STORENAME_MICASA = "miCASA",
|
||||
public static string STORENAME_MICASA = "miCASA",
|
||||
STORENAME_FIREFOX = "Firefox",
|
||||
STORENAME_MOZILLA = "Mozilla",
|
||||
STORENAME_KDEWALLET = "KDE KWallet",
|
||||
STORENAME_KDEWALLET = "KDE Wallet",
|
||||
STORENAME_GNOMEKEYRING = "GNOME Keyring";
|
||||
|
||||
|
||||
@ -90,8 +90,8 @@ public class Common
|
||||
|
||||
public static string NATIVEINFO_FOLDERNAME = "Folder Name";
|
||||
public static string NATIVEINFO_TYPEID = "Type of Secret";
|
||||
public static string NATIVEINFO_SYNC = "Syncronization Status";
|
||||
public static string NATIVEINFO_SYNCTYPE = "Syncronization Type";
|
||||
public static string NATIVEINFO_SYNC = "Syncronization Status";
|
||||
public static string NATIVEINFO_SYNCTYPE = "Syncronization Type";
|
||||
public static string NATIVEINFO_MODIFIEDTIME = "Last Modified Time";
|
||||
|
||||
public static int INDEX_NATIVEINFO_FOLDERNAME = 0,
|
||||
@ -173,7 +173,7 @@ public class Common
|
||||
if ( (128 == platform) || (4 == platform) )
|
||||
{
|
||||
IS_LINUX = true;
|
||||
GladeFile = "/usr/share/doc/packages/CASA/images/casa.glade";
|
||||
GladeFile = "/usr/share/doc/packages/CASA/images/casa.glade";
|
||||
|
||||
if( !File.Exists(GladeFile) )
|
||||
{
|
||||
|
@ -20,52 +20,50 @@
|
||||
*
|
||||
***********************************************************************/
|
||||
|
||||
using System;
|
||||
using System;
|
||||
using Gtk;
|
||||
using Glade;
|
||||
|
||||
using Glade;
|
||||
|
||||
using Novell.CASA;
|
||||
using Novell.CASA.MiCasa.Common;
|
||||
using Novell.CASA.MiCasa.Communication;
|
||||
|
||||
#if W32
|
||||
using Microsoft.Win32;
|
||||
#endif
|
||||
namespace Novell.CASA.GUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for CommonGUI.
|
||||
/// </summary>
|
||||
public class CommonGUI
|
||||
{
|
||||
using Novell.CASA.MiCasa.Communication;
|
||||
|
||||
#if W32
|
||||
using Microsoft.Win32;
|
||||
#endif
|
||||
namespace Novell.CASA.GUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Summary description for CommonGUI.
|
||||
/// </summary>
|
||||
public class CommonGUI
|
||||
{
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Label label86,
|
||||
label88;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Entry entryMasterPassword1,
|
||||
entryMasterPassword2,
|
||||
entryMasterPassword3,
|
||||
Gtk.Entry entryMasterPassword3,
|
||||
entryMasterPassword4;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Dialog dialogLogin;
|
||||
|
||||
Gtk.Window mainWindow = new Window("Test");
|
||||
|
||||
private CasaMain mCasaInstance = null;
|
||||
private CasaTray mTrayInstance = null;
|
||||
|
||||
public CommonGUI()
|
||||
{
|
||||
//
|
||||
// TODO: Add constructor logic here
|
||||
//
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// HandleUnlock dialog
|
||||
Gtk.Dialog dialogLogin;
|
||||
|
||||
Gtk.Window mainWindow = new Window("Test");
|
||||
|
||||
private CasaMain mCasaInstance = null;
|
||||
private CasaTray mTrayInstance = null;
|
||||
|
||||
public CommonGUI()
|
||||
{
|
||||
//
|
||||
// TODO: Add constructor logic here
|
||||
//
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// HandleUnlock dialog
|
||||
/// </summary>
|
||||
public void HandleUnlock(CasaMain managerInstance, CasaTray trayInstance)
|
||||
{
|
||||
@ -79,8 +77,9 @@ namespace Novell.CASA.GUI
|
||||
Glade.XML gxmlTemp = new Glade.XML ("../images/casa.glade", "dialogLogin", null);
|
||||
#endif
|
||||
#if LINUX
|
||||
Glade.XML gxmlTemp = new Glade.XML ("/usr/share/doc/packages/CASA/images/casa.glade", "dialogLogin", null);
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLogin", null);
|
||||
#endif
|
||||
|
||||
gxmlTemp.Autoconnect (this);
|
||||
//dialogLogin.TransientFor = windowMain;
|
||||
|
||||
@ -191,84 +190,84 @@ namespace Novell.CASA.GUI
|
||||
public void on_entryMasterPassword4_activate(object obj, EventArgs args)
|
||||
{
|
||||
okbuttonLogin_clicked(obj, args);
|
||||
}
|
||||
|
||||
private void dialogLogin_Destroyed(object sender, EventArgs e)
|
||||
{
|
||||
bool bStoreLocked = MiCASAStore.IsLocked();
|
||||
if (mCasaInstance != null)
|
||||
{
|
||||
if (bStoreLocked)
|
||||
mCasaInstance.LockGUI();
|
||||
else
|
||||
mCasaInstance.UnlockGUI();
|
||||
}
|
||||
|
||||
if (mTrayInstance != null)
|
||||
{
|
||||
if (bStoreLocked)
|
||||
mTrayInstance.UpdateTrayIcon(true);
|
||||
else
|
||||
mTrayInstance.UpdateTrayIcon(false);
|
||||
}
|
||||
}
|
||||
#if W32
|
||||
internal static string ReadRegKey(RegistryKey rk, string sSubKey, string KeyName)
|
||||
{
|
||||
// Opening the registry key
|
||||
// RegistryKey rk = Registry.Users;
|
||||
// Open a subKey as read-only
|
||||
RegistryKey sk1 = rk.OpenSubKey(sSubKey);
|
||||
// If the RegistrySubKey doesn't exist -> (null)
|
||||
if ( sk1 == null )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// If the RegistryKey exists I get its value
|
||||
// or null is returned.
|
||||
return (string)sk1.GetValue(KeyName.ToUpper());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//ShowErrorMessage(e, "Reading registry " + KeyName.ToUpper());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void WriteRegKey(RegistryKey rk, string sSubKey, string KeyName, string sKeyValue)
|
||||
{
|
||||
RegistryKey sk1 = rk.OpenSubKey(sSubKey, true);
|
||||
// If the RegistrySubKey doesn't exist -> (null)
|
||||
if ( sk1 == null )
|
||||
{
|
||||
//return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// If the RegistryKey exists I get its value
|
||||
// or null is returned.
|
||||
sk1.SetValue(KeyName, sKeyValue);
|
||||
sk1.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
sk1.Close();
|
||||
//ShowErrorMessage(e, "Reading registry " + KeyName.ToUpper());
|
||||
Console.Write(e.ToString());
|
||||
//return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void dialogLogin_Destroyed(object sender, EventArgs e)
|
||||
{
|
||||
bool bStoreLocked = MiCASAStore.IsLocked();
|
||||
if (mCasaInstance != null)
|
||||
{
|
||||
if (bStoreLocked)
|
||||
mCasaInstance.LockGUI();
|
||||
else
|
||||
mCasaInstance.UnlockGUI();
|
||||
}
|
||||
|
||||
if (mTrayInstance != null)
|
||||
{
|
||||
if (bStoreLocked)
|
||||
mTrayInstance.UpdateTrayIcon(true);
|
||||
else
|
||||
mTrayInstance.UpdateTrayIcon(false);
|
||||
}
|
||||
}
|
||||
#if W32
|
||||
internal static string ReadRegKey(RegistryKey rk, string sSubKey, string KeyName)
|
||||
{
|
||||
// Opening the registry key
|
||||
// RegistryKey rk = Registry.Users;
|
||||
// Open a subKey as read-only
|
||||
RegistryKey sk1 = rk.OpenSubKey(sSubKey);
|
||||
// If the RegistrySubKey doesn't exist -> (null)
|
||||
if ( sk1 == null )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// If the RegistryKey exists I get its value
|
||||
// or null is returned.
|
||||
return (string)sk1.GetValue(KeyName.ToUpper());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//ShowErrorMessage(e, "Reading registry " + KeyName.ToUpper());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal static void WriteRegKey(RegistryKey rk, string sSubKey, string KeyName, string sKeyValue)
|
||||
{
|
||||
RegistryKey sk1 = rk.OpenSubKey(sSubKey, true);
|
||||
// If the RegistrySubKey doesn't exist -> (null)
|
||||
if ( sk1 == null )
|
||||
{
|
||||
//return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
// If the RegistryKey exists I get its value
|
||||
// or null is returned.
|
||||
sk1.SetValue(KeyName, sKeyValue);
|
||||
sk1.Close();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
sk1.Close();
|
||||
//ShowErrorMessage(e, "Reading registry " + KeyName.ToUpper());
|
||||
Console.Write(e.ToString());
|
||||
//return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -38,9 +38,7 @@ public class Firefox : Store
|
||||
tsKeyValue;
|
||||
|
||||
CellRendererText cellEditable;
|
||||
|
||||
ArrayList arrDeletedKeys = null;
|
||||
|
||||
|
||||
public bool IS_STORE_AGGREGATED = false;
|
||||
|
||||
#region Glade Widgets
|
||||
@ -57,7 +55,6 @@ public class Firefox : Store
|
||||
[Glade.Widget]
|
||||
Gtk.Dialog dialogNewSecret,
|
||||
dialogManageSecret,
|
||||
dialogConfirmDelete,
|
||||
dialogLogin;
|
||||
|
||||
[Glade.Widget]
|
||||
@ -68,8 +65,7 @@ public class Firefox : Store
|
||||
entryKey,
|
||||
entryValue,
|
||||
entryMasterPassword3,
|
||||
entryMasterPassword4,
|
||||
entryDeleteSecretID;
|
||||
entryMasterPassword4;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.CheckButton cbuttonShowPassword;
|
||||
@ -102,7 +98,7 @@ public class Firefox : Store
|
||||
Logger.DbgLog("GUI:Firefox.Firefox() - BEGIN");
|
||||
|
||||
/// SecretID TreeStore
|
||||
tvSecretIDFirefox = (Gtk.TreeView)CasaMain.gxml.GetWidget("tvSecretIDFirefox");
|
||||
tvSecretIDFirefox = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvSecretIDFirefox");
|
||||
tsSecretIDFirefox = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[]));
|
||||
tvSecretIDFirefox.AppendColumn("Secret ID",new CellRendererText(),"text",0);
|
||||
tvSecretIDFirefox.Model = tsSecretIDFirefox;
|
||||
@ -110,7 +106,7 @@ public class Firefox : Store
|
||||
tvSecretIDFirefox.ButtonReleaseEvent += new ButtonReleaseEventHandler(OnRightClicked);
|
||||
tvSecretIDFirefox.CursorChanged += new EventHandler(OnCursorChanged);
|
||||
/// NativeInfo TreeStore
|
||||
tvNativeInfoFirefox = (Gtk.TreeView)CasaMain.gxml.GetWidget("tvNativeInfoFirefox");
|
||||
tvNativeInfoFirefox = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvNativeInfoFirefox");
|
||||
tsNativeInfoFirefox = new TreeStore(typeof(string), typeof(string));
|
||||
tvNativeInfoFirefox.AppendColumn("NativeKey",new CellRendererText(),"text",0);
|
||||
tvNativeInfoFirefox.AppendColumn("NativeValue",new CellRendererText(),"text",1);
|
||||
@ -131,7 +127,7 @@ public class Firefox : Store
|
||||
|
||||
try
|
||||
{
|
||||
tsSecretIDFirefox.Clear();
|
||||
tsSecretIDFirefox.Clear();
|
||||
tsNativeInfoFirefox.Clear();
|
||||
StoreDataInterface.AggregateStore(Common.STORE_FIREFOX);
|
||||
StoreDataInterface.ReadStore(Common.STORE_FIREFOX,ref tsSecretIDFirefox);
|
||||
@ -235,7 +231,7 @@ public class Firefox : Store
|
||||
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogManageSecret", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogManageSecret.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogManageSecret.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogManageSecret.Title = "Firefox - Manage Secret";
|
||||
|
||||
cellEditable = new CellRendererText();
|
||||
@ -253,7 +249,7 @@ public class Firefox : Store
|
||||
{
|
||||
if( (null != keys[i]) && (null != values[i]) )
|
||||
tsKeyValue.AppendValues(keys[i], values[i], "********", false, "No");
|
||||
//Console.WriteLine("Keys="+keys[i]+" , "+"Values="+values[i]);
|
||||
Console.WriteLine("Keys="+keys[i]+" , "+"Values="+values[i]);
|
||||
}
|
||||
tvKeyValue.Model = tsKeyValue;
|
||||
//entryKey.HasFocus = true;
|
||||
@ -283,7 +279,7 @@ public class Firefox : Store
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MANAGE SECRET-ID DIALOG OK-BUTTON CLICKED
|
||||
/// MANAGE SECRET ID DIALOG OK-BUTTON CLICKED
|
||||
/// </summary>
|
||||
public void on_buttonManageOk_clicked(object obj, EventArgs args)
|
||||
{
|
||||
@ -292,7 +288,7 @@ public class Firefox : Store
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// MANAGE SECRET-ID DIALOG CANCEL-BUTTON CLICKED
|
||||
/// MANAGE SECRET ID DIALOG CANCEL-BUTTON CLICKED
|
||||
/// </summary>
|
||||
public void on_buttonManageCancel_clicked(object obj, EventArgs args)
|
||||
{
|
||||
@ -404,18 +400,9 @@ public class Firefox : Store
|
||||
}
|
||||
}
|
||||
|
||||
private void md_Response(object o, ResponseArgs args)
|
||||
{
|
||||
MessageDialog md = (MessageDialog)o;
|
||||
if (md != null)
|
||||
{
|
||||
md.Destroy();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// SECRET-ID DOUBLE CLICKED
|
||||
/// SECRET ID DOUBLE CLICKED
|
||||
/// </summary>
|
||||
private void OntvSecretIDFirefoxRowActivated( object obj, RowActivatedArgs args )
|
||||
{
|
||||
|
@ -26,8 +26,8 @@ namespace Novell.CASA.GUI {
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Specialized;
|
||||
using Gtk;
|
||||
using Glade;
|
||||
using Gtk;
|
||||
using Novell.CASA.MiCasa.Common;
|
||||
using Novell.CASA.MiCasa.Communication;
|
||||
|
||||
@ -45,6 +45,10 @@ public class GnomeKeyring : Store
|
||||
|
||||
public bool IS_STORE_AGGREGATED = false;
|
||||
|
||||
string[] stringNetworkManagerServerType = new string[]{ "SSH",
|
||||
"FTP (with login)",
|
||||
"Windows share" };
|
||||
|
||||
#region Glade Widgets
|
||||
|
||||
[Glade.Widget]
|
||||
@ -58,9 +62,11 @@ public class GnomeKeyring : Store
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Dialog dialogNewSecret,
|
||||
dialogManageSecret,
|
||||
dialogConfirmDelete,
|
||||
dialogLogin;
|
||||
dialogManageSecret,
|
||||
dialogConfirmDelete,
|
||||
dialogLogin,
|
||||
dialogNetworkManager,
|
||||
dialogGaim;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Menu menuRightClick;
|
||||
@ -71,29 +77,37 @@ public class GnomeKeyring : Store
|
||||
entryValue,
|
||||
entryMasterPassword3,
|
||||
entryMasterPassword4,
|
||||
entryDeleteSecretID;
|
||||
entryDeleteSecretID,
|
||||
entryNetworkManagerCName,
|
||||
entryNetworkManagerServer,
|
||||
entryNetworkManagerUsername,
|
||||
entryNetworkManagerPassword,
|
||||
entryNetworkManagerFolder,
|
||||
entryNetworkManagerPort,
|
||||
entryNetworkManagerShare,
|
||||
entryNetworkManagerDomain;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.CheckButton cbuttonShowPassword;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Label label86,
|
||||
label88;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Button buttonNewAdd,
|
||||
buttonNewRemove;
|
||||
|
||||
label88,
|
||||
labelNetworkManagerPort,
|
||||
labelNetworkManagerShare,
|
||||
labelNetworkManagerDomain;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.MenuItem cmiNewSecret,
|
||||
cmiNewKey,
|
||||
Gtk.MenuItem cmiNewKey,
|
||||
cmiDelete,
|
||||
cmiView,
|
||||
cmiLink,
|
||||
cmiCopy;
|
||||
|
||||
|
||||
[Glade.Widget]
|
||||
Combo comboNetworkManager;
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
///#######################################################################
|
||||
@ -107,15 +121,15 @@ public class GnomeKeyring : Store
|
||||
Logger.DbgLog("GUI:GnomeKeyring.GnomeKeyring() - BEGIN");
|
||||
|
||||
/// SecretID TreeStore
|
||||
tvSecretIDGnomeKeyring = (Gtk.TreeView)CasaMain.gxml.GetWidget("tvSecretIDGnomeKeyring");
|
||||
tvSecretIDGnomeKeyring = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvSecretIDGnomeKeyring");
|
||||
tsSecretIDGnomeKeyring = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[]));
|
||||
tvSecretIDGnomeKeyring.AppendColumn("Secret-ID",new CellRendererText(),"text",0);
|
||||
tvSecretIDGnomeKeyring.AppendColumn("Secret ID",new CellRendererText(),"text",0);
|
||||
tvSecretIDGnomeKeyring.Model = tsSecretIDGnomeKeyring;
|
||||
tvSecretIDGnomeKeyring.RowActivated += new RowActivatedHandler(OntvSecretIDGnomeKeyringRowActivated);
|
||||
tvSecretIDGnomeKeyring.ButtonReleaseEvent += new ButtonReleaseEventHandler(OnRightClicked);
|
||||
tvSecretIDGnomeKeyring.CursorChanged += new EventHandler(OnCursorChanged);
|
||||
/// NativeInfo TreeStore
|
||||
tvNativeInfoGnomeKeyring = (Gtk.TreeView)CasaMain.gxml.GetWidget("tvNativeInfoGnomeKeyring");
|
||||
tvNativeInfoGnomeKeyring = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvNativeInfoGnomeKeyring");
|
||||
tsNativeInfoGnomeKeyring = new TreeStore(typeof(string), typeof(string));
|
||||
tvNativeInfoGnomeKeyring.AppendColumn("NativeKey",new CellRendererText(),"text",0);
|
||||
tvNativeInfoGnomeKeyring.AppendColumn("NativeValue",new CellRendererText(),"text",1);
|
||||
@ -255,7 +269,7 @@ public class GnomeKeyring : Store
|
||||
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogManageSecret", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogManageSecret.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogManageSecret.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogManageSecret.Title = "GNOME Keyring - Manage Secret";
|
||||
|
||||
cellEditable = new CellRendererText();
|
||||
@ -642,7 +656,7 @@ public class GnomeKeyring : Store
|
||||
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogNewSecret", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogNewSecret.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogNewSecret.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogNewSecret.Title = "GNOME Keyring - New Secret";
|
||||
|
||||
cellEditable = new CellRendererText();
|
||||
@ -832,8 +846,8 @@ public class GnomeKeyring : Store
|
||||
{
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmDelete", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogConfirmDelete.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogNewSecret.Title = "GNOME Keyring - Delete Secret";
|
||||
dialogConfirmDelete.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogConfirmDelete.Title = "GNOME Keyring - Delete Secret";
|
||||
|
||||
TreeModel model;
|
||||
TreeIter iter;
|
||||
@ -886,16 +900,179 @@ public class GnomeKeyring : Store
|
||||
}
|
||||
|
||||
|
||||
public void on_buttonhelpEditSecret_clicked(object obj, EventArgs args)
|
||||
{
|
||||
Common.ShowHelpUrl("EditingSecrets.html");
|
||||
}
|
||||
public void on_helpbuttonAuthentication_clicked(object obj, EventArgs args)
|
||||
{
|
||||
Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm");
|
||||
}
|
||||
|
||||
public void on_buttonhelpEditSecret_clicked(object obj, EventArgs args)
|
||||
{
|
||||
Common.ShowHelpUrl("EditingSecrets.html");
|
||||
}
|
||||
public void on_helpbuttonAuthentication_clicked(object obj, EventArgs args)
|
||||
{
|
||||
Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm");
|
||||
}
|
||||
|
||||
///#######################################################################
|
||||
/// Application SSO
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
/// Network Manager
|
||||
public void SSONetworkManager(object obj, EventArgs args)
|
||||
{
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogNetworkManager", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogNetworkManager.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
comboNetworkManager.PopdownStrings = stringNetworkManagerServerType;
|
||||
comboNetworkManager.DisableActivate();
|
||||
//labelNetworkManagerFolder.Visible = entryNetworkManagerFolder.Visible = true;
|
||||
labelNetworkManagerPort.Visible = entryNetworkManagerPort.Visible = true;
|
||||
labelNetworkManagerShare.Visible = entryNetworkManagerShare.Visible = false;
|
||||
labelNetworkManagerDomain.Visible = entryNetworkManagerDomain.Visible = false;
|
||||
}
|
||||
|
||||
public void on_okNetworkManager_clicked(object abj, EventArgs args)
|
||||
{
|
||||
TreeModel modelSecret;
|
||||
TreeIter iterSecret;
|
||||
string SecretID = null;
|
||||
string[] Keys = null,
|
||||
Values = null,
|
||||
NativeKeys = null,
|
||||
NativeValues = null;
|
||||
ArrayList arrKeys = null,
|
||||
arrValues = null;
|
||||
|
||||
try
|
||||
{
|
||||
if( "" != entryNetworkManagerServer.Text && "" != entryNetworkManagerUsername.Text && "" != entryNetworkManagerPassword.Text )
|
||||
{
|
||||
arrKeys = new ArrayList();
|
||||
arrValues = new ArrayList();
|
||||
|
||||
if( "SSH" == comboNetworkManager.Entry.Text )
|
||||
{
|
||||
SecretID = String.Concat(entryNetworkManagerUsername.Text ,"@", entryNetworkManagerServer.Text);
|
||||
arrKeys.Add("server"); arrValues.Add(entryNetworkManagerServer.Text);
|
||||
arrKeys.Add("user"); arrValues.Add(entryNetworkManagerUsername.Text);
|
||||
arrKeys.Add("password"); arrValues.Add(entryNetworkManagerPassword.Text);
|
||||
arrKeys.Add("protocol"); arrValues.Add("sftp");
|
||||
arrKeys.Add("authtype"); arrValues.Add("password");
|
||||
}
|
||||
else if( "FTP (with login)" == comboNetworkManager.Entry.Text )
|
||||
{
|
||||
SecretID = String.Concat(entryNetworkManagerUsername.Text ,"@", entryNetworkManagerServer.Text);
|
||||
arrKeys.Add("server"); arrValues.Add(entryNetworkManagerServer.Text);
|
||||
arrKeys.Add("user"); arrValues.Add(entryNetworkManagerUsername.Text);
|
||||
arrKeys.Add("password"); arrValues.Add(entryNetworkManagerPassword.Text);
|
||||
arrKeys.Add("protocol"); arrValues.Add("ftp");
|
||||
arrKeys.Add("authtype"); arrValues.Add("password");
|
||||
}
|
||||
else if( "Windows share" == comboNetworkManager.Entry.Text )
|
||||
{
|
||||
SecretID = String.Concat(entryNetworkManagerUsername.Text ,"@", entryNetworkManagerServer.Text,"/",entryNetworkManagerShare.Text);
|
||||
arrKeys.Add("server"); arrValues.Add(entryNetworkManagerServer.Text);
|
||||
arrKeys.Add("user"); arrValues.Add(entryNetworkManagerUsername.Text);
|
||||
arrKeys.Add("password"); arrValues.Add(entryNetworkManagerPassword.Text);
|
||||
arrKeys.Add("object"); arrValues.Add(entryNetworkManagerShare.Text);
|
||||
arrKeys.Add("domain"); arrValues.Add(entryNetworkManagerDomain.Text);
|
||||
arrKeys.Add("protocol"); arrValues.Add("smb");
|
||||
}
|
||||
|
||||
Keys = (string[])arrKeys.ToArray(typeof(string));
|
||||
Values = (string[])arrValues.ToArray(typeof(string));
|
||||
NativeKeys = new string[Common.MAX_NATIVE_ELEMENTS];
|
||||
NativeValues = new string[Common.MAX_NATIVE_ELEMENTS];
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_FOLDERNAME] = Common.NATIVEINFO_FOLDERNAME;
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_TYPEID] = Common.NATIVEINFO_TYPEID;
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_SYNC] = Common.NATIVEINFO_SYNC;
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_SYNCTYPE] = Common.NATIVEINFO_SYNCTYPE;
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = Common.NATIVEINFO_MODIFIEDTIME;
|
||||
NativeValues[Common.INDEX_NATIVEINFO_FOLDERNAME] = null;
|
||||
NativeValues[Common.INDEX_NATIVEINFO_TYPEID] = "Network Password";
|
||||
NativeValues[Common.INDEX_NATIVEINFO_SYNC] = null;
|
||||
NativeValues[Common.INDEX_NATIVEINFO_SYNCTYPE] = null;
|
||||
NativeValues[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = null;
|
||||
|
||||
iterSecret = tsSecretIDGnomeKeyring.AppendValues(SecretID, Keys, Values, "default", NativeKeys, NativeValues);
|
||||
modelSecret = tvSecretIDGnomeKeyring.Model;
|
||||
|
||||
if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(Common.STORE_GNOMEKEYRING, Common.OPERATION_ADD_SECRET, "", "", ref modelSecret, ref iterSecret) )
|
||||
{
|
||||
AggregateStore();
|
||||
Logger.DbgLog("GUI:GnomeKeyring.on_okNetworkManager_clicked() - ADD_NEW_SECRET_SUCCEEDED.");
|
||||
}
|
||||
else
|
||||
Logger.DbgLog("GUI:GnomeKeyring.on_okNetworkManager_clicked() - ERROR: ADD_NEW_SECRET_FAILED");
|
||||
|
||||
dialogNetworkManager.Destroy();
|
||||
}
|
||||
}
|
||||
catch(Exception exp)
|
||||
{
|
||||
Logger.DbgLog("GUI:GnomeKeyring.on_okNetworkManager_clicked() - EXCEPTION:" + exp.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void on_entryNetworkManagerServerType_changed(object obj, EventArgs args)
|
||||
{
|
||||
if( comboNetworkManager.Entry.Text == stringNetworkManagerServerType[0] )
|
||||
{
|
||||
//labelNetworkManagerFolder.Visible = entryNetworkManagerFolder.Visible = true;
|
||||
labelNetworkManagerPort.Visible = entryNetworkManagerPort.Visible = true;
|
||||
labelNetworkManagerShare.Visible = entryNetworkManagerShare.Visible = false;
|
||||
labelNetworkManagerDomain.Visible = entryNetworkManagerDomain.Visible = false;
|
||||
entryNetworkManagerServer.HasFocus = true;
|
||||
}
|
||||
if( comboNetworkManager.Entry.Text == stringNetworkManagerServerType[1] )
|
||||
{
|
||||
//labelNetworkManagerFolder.Visible = entryNetworkManagerFolder.Visible = true;
|
||||
labelNetworkManagerPort.Visible = entryNetworkManagerPort.Visible = true;
|
||||
labelNetworkManagerShare.Visible = entryNetworkManagerShare.Visible = false;
|
||||
labelNetworkManagerDomain.Visible = entryNetworkManagerDomain.Visible = false;
|
||||
entryNetworkManagerServer.HasFocus = true;
|
||||
}
|
||||
if( comboNetworkManager.Entry.Text == stringNetworkManagerServerType[2] )
|
||||
{
|
||||
//labelNetworkManagerFolder.Visible = entryNetworkManagerFolder.Visible = true;
|
||||
labelNetworkManagerPort.Visible = entryNetworkManagerPort.Visible = false;
|
||||
labelNetworkManagerShare.Visible = entryNetworkManagerShare.Visible = true;
|
||||
labelNetworkManagerDomain.Visible = entryNetworkManagerDomain.Visible = true;
|
||||
entryNetworkManagerServer.HasFocus = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void on_cancelNetworkManager_clicked(object obj, EventArgs args)
|
||||
{
|
||||
dialogNetworkManager.Destroy();
|
||||
}
|
||||
|
||||
public void on_helpNetworkManager_clicked(object obj, EventArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// Gaim
|
||||
public void SSOGaim(object obj, EventArgs args)
|
||||
{
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogGaim", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogGaim.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
|
||||
}
|
||||
public void on_okGaim_clicked(object obj, EventArgs args)
|
||||
{
|
||||
dialogGaim.Destroy();
|
||||
}
|
||||
public void on_cancelGaim_clicked(object obj, EventArgs args)
|
||||
{
|
||||
dialogGaim.Destroy();
|
||||
}
|
||||
public void on_helpGaim_clicked(object obj, EventArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
///##################################################################
|
||||
|
@ -43,6 +43,17 @@ public class KdeWallet : Store
|
||||
|
||||
public bool IS_STORE_AGGREGATED = false;
|
||||
|
||||
string[] stringKonquererTemplates = new string[]{ "New Website",
|
||||
"Novell Website (novell.com)",
|
||||
"Novell Innerweb (innerweb.novell.com)",
|
||||
"Novell Bugzilla (bugzilla.novell.com)",
|
||||
"Novell Forge (forge.novell.com)",
|
||||
"Bandit Project (bandit-project.org)",
|
||||
"Groupwise Webaccess (gmail.novell.com)",
|
||||
"Gmail (gmail.com)",
|
||||
"Yahoo! Mail (mail.yahoo.com)",
|
||||
"MSN Hotmail (hotmail.com)"};
|
||||
|
||||
#region Glade Widgets
|
||||
|
||||
[Glade.Widget]
|
||||
@ -56,9 +67,11 @@ public class KdeWallet : Store
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Dialog dialogNewSecret,
|
||||
dialogManageSecret,
|
||||
dialogConfirmDelete,
|
||||
dialogLogin;
|
||||
dialogManageSecret,
|
||||
dialogConfirmDelete,
|
||||
dialogLogin,
|
||||
dialogKonquerer,
|
||||
dialogKopete;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Menu menuRightClick;
|
||||
@ -69,7 +82,12 @@ public class KdeWallet : Store
|
||||
entryValue,
|
||||
entryMasterPassword3,
|
||||
entryMasterPassword4,
|
||||
entryDeleteSecretID;
|
||||
entryDeleteSecretID,
|
||||
entryKonquererURL,
|
||||
entryKonquererUsrKey,
|
||||
entryKonquererUsrValue,
|
||||
entryKonquererPwdKey,
|
||||
entryKonquererPwdValue;
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.CheckButton cbuttonShowPassword;
|
||||
@ -80,13 +98,14 @@ public class KdeWallet : Store
|
||||
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.MenuItem cmiNewSecret,
|
||||
cmiNewKey,
|
||||
Gtk.MenuItem cmiNewKey,
|
||||
cmiDelete,
|
||||
cmiView,
|
||||
cmiLink,
|
||||
cmiCopy;
|
||||
|
||||
|
||||
[Glade.Widget]
|
||||
Gtk.Combo comboKonquererTemplates;
|
||||
#endregion
|
||||
|
||||
|
||||
@ -101,15 +120,15 @@ public class KdeWallet : Store
|
||||
Logger.DbgLog("GUI:KdeWallet.KdeWallet() - BEGIN");
|
||||
|
||||
/// SecretID TreeStore
|
||||
tvSecretIDKdeWallet = (Gtk.TreeView)CasaMain.gxml.GetWidget("tvSecretIDKdeWallet");
|
||||
tvSecretIDKdeWallet = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvSecretIDKdeWallet");
|
||||
tsSecretIDKdeWallet = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[]));
|
||||
tvSecretIDKdeWallet.AppendColumn("Secret-ID",new CellRendererText(),"text",0);
|
||||
tvSecretIDKdeWallet.AppendColumn("Secret ID",new CellRendererText(),"text",0);
|
||||
tvSecretIDKdeWallet.Model = tsSecretIDKdeWallet;
|
||||
tvSecretIDKdeWallet.RowActivated += new RowActivatedHandler(OntvSecretIDKdeWalletRowActivated);
|
||||
tvSecretIDKdeWallet.ButtonReleaseEvent += new ButtonReleaseEventHandler(OnRightClicked);
|
||||
tvSecretIDKdeWallet.CursorChanged += new EventHandler(OnCursorChanged);
|
||||
/// NativeInfo TreeStore
|
||||
tvNativeInfoKdeWallet = (Gtk.TreeView)CasaMain.gxml.GetWidget("tvNativeInfoKdeWallet");
|
||||
tvNativeInfoKdeWallet = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvNativeInfoKdeWallet");
|
||||
tsNativeInfoKdeWallet = new TreeStore(typeof(string), typeof(string));
|
||||
tvNativeInfoKdeWallet.AppendColumn("NativeKey",new CellRendererText(),"text",0);
|
||||
tvNativeInfoKdeWallet.AppendColumn("NativeValue",new CellRendererText(),"text",1);
|
||||
@ -251,7 +270,7 @@ public class KdeWallet : Store
|
||||
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogManageSecret", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogManageSecret.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogManageSecret.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogManageSecret.Title = "KDE Wallet - Manage Secret";
|
||||
|
||||
cellEditable = new CellRendererText();
|
||||
@ -636,7 +655,7 @@ public class KdeWallet : Store
|
||||
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogNewSecret", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogNewSecret.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogNewSecret.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogNewSecret.Title = "KDE Wallet - New Secret";
|
||||
|
||||
cellEditable = new CellRendererText();
|
||||
@ -744,7 +763,7 @@ public class KdeWallet : Store
|
||||
NativeValues[Common.INDEX_NATIVEINFO_SYNCTYPE] = null;
|
||||
NativeValues[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = null;
|
||||
|
||||
iterSecret = tsSecretIDKdeWallet.AppendValues(entrySecretID.Text, Keys, Values, "CASAwallet", NativeKeys, NativeValues);
|
||||
iterSecret = tsSecretIDKdeWallet.AppendValues(entrySecretID.Text, Keys, Values, "kdewallet", NativeKeys, NativeValues);
|
||||
modelSecret = tvSecretIDKdeWallet.Model;
|
||||
|
||||
if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(Common.STORE_KDEWALLET, Common.OPERATION_ADD_SECRET, "", "", ref modelSecret, ref iterSecret) )
|
||||
@ -823,7 +842,7 @@ public class KdeWallet : Store
|
||||
{
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmDelete", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogConfirmDelete.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogConfirmDelete.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogConfirmDelete.Title = "KDE Wallet - Delete Secret";
|
||||
|
||||
TreeModel model;
|
||||
@ -883,7 +902,195 @@ public class KdeWallet : Store
|
||||
public void on_helpbuttonAuthentication_clicked(object obj, EventArgs args)
|
||||
{
|
||||
Common.ShowHelpUrl("CASAMasterPasswordAuthentication.htm");
|
||||
}
|
||||
}
|
||||
|
||||
///#######################################################################
|
||||
/// Application SSO
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
/// Konquerer
|
||||
public void SSOKonquerer(object obj, EventArgs args)
|
||||
{
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogKonquerer", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogKonquerer.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
comboKonquererTemplates.PopdownStrings = stringKonquererTemplates;
|
||||
comboKonquererTemplates.DisableActivate();
|
||||
}
|
||||
public void on_okKonquerer_clicked(object abj, EventArgs args)
|
||||
{
|
||||
TreeModel modelSecret;
|
||||
TreeIter iterSecret;
|
||||
string[] Keys = null,
|
||||
Values = null,
|
||||
NativeKeys = null,
|
||||
NativeValues = null;
|
||||
ArrayList arrKeys = null,
|
||||
arrValues = null;
|
||||
|
||||
try
|
||||
{
|
||||
if( "" != entryKonquererURL.Text && "" != entryKonquererUsrKey.Text && "" != entryKonquererUsrValue.Text && "" != entryKonquererPwdKey.Text && "" != entryKonquererPwdValue.Text )
|
||||
{
|
||||
arrKeys = new ArrayList();
|
||||
arrValues = new ArrayList();
|
||||
|
||||
arrKeys.Add(entryKonquererUsrKey.Text);
|
||||
arrKeys.Add(entryKonquererPwdKey.Text);
|
||||
arrValues.Add(entryKonquererUsrValue.Text);
|
||||
arrValues.Add(entryKonquererPwdValue.Text);
|
||||
|
||||
Keys = (string[])arrKeys.ToArray(typeof(string));
|
||||
Values = (string[])arrValues.ToArray(typeof(string));
|
||||
|
||||
NativeKeys = new string[Common.MAX_NATIVE_ELEMENTS];
|
||||
NativeValues = new string[Common.MAX_NATIVE_ELEMENTS];
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_FOLDERNAME] = Common.NATIVEINFO_FOLDERNAME;
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_TYPEID] = Common.NATIVEINFO_TYPEID;
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_SYNC] = Common.NATIVEINFO_SYNC;
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_SYNCTYPE] = Common.NATIVEINFO_SYNCTYPE;
|
||||
NativeKeys[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = Common.NATIVEINFO_MODIFIEDTIME;
|
||||
NativeValues[Common.INDEX_NATIVEINFO_FOLDERNAME] = "Form Data";
|
||||
NativeValues[Common.INDEX_NATIVEINFO_TYPEID] = "Maps";
|
||||
NativeValues[Common.INDEX_NATIVEINFO_SYNC] = null;
|
||||
NativeValues[Common.INDEX_NATIVEINFO_SYNCTYPE] = null;
|
||||
NativeValues[Common.INDEX_NATIVEINFO_MODIFIEDTIME] = null;
|
||||
|
||||
iterSecret = tsSecretIDKdeWallet.AppendValues(entryKonquererURL.Text, Keys, Values, "kdewallet", NativeKeys, NativeValues);
|
||||
modelSecret = tvSecretIDKdeWallet.Model;
|
||||
|
||||
if( Common.STATUS_SUCCESS == StoreDataInterface.UpdateStore(Common.STORE_KDEWALLET, Common.OPERATION_ADD_SECRET, "", "", ref modelSecret, ref iterSecret) )
|
||||
{
|
||||
AggregateStore();
|
||||
Logger.DbgLog("GUI:KdeWallet.on_okKonquerer_clicked() - ADD_NEW_SECRET_SUCCEEDED.");
|
||||
}
|
||||
else
|
||||
Logger.DbgLog("GUI:KdeWallet.on_okKonquerer_clicked() - ERROR: ADD_NEW_SECRET_FAILED");
|
||||
|
||||
dialogKonquerer.Destroy();
|
||||
}
|
||||
}
|
||||
catch(Exception exp)
|
||||
{
|
||||
Logger.DbgLog("GUI:KdeWallet.on_okKonquerer_clicked() - EXCEPTION:" + exp.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void on_entryKonquererTemplates_changed(object obj, EventArgs args)
|
||||
{
|
||||
/// new
|
||||
if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[0] )
|
||||
{
|
||||
entryKonquererURL.Text = "";
|
||||
entryKonquererUsrKey.Text = "";
|
||||
entryKonquererPwdKey.Text = "";
|
||||
entryKonquererURL.HasFocus = true;
|
||||
}
|
||||
/// novell
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[1] )
|
||||
{
|
||||
entryKonquererURL.Text = "http://www.novell.com/ICSLogin/#";
|
||||
entryKonquererUsrKey.Text = "username";
|
||||
entryKonquererPwdKey.Text = "password";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
/// innerweb
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[2] )
|
||||
{
|
||||
entryKonquererURL.Text = "https://innerweb.novell.com/ICSLogin/#";
|
||||
entryKonquererUsrKey.Text = "username";
|
||||
entryKonquererPwdKey.Text = "password";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
/// bugzilla
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[3] )
|
||||
{
|
||||
entryKonquererURL.Text = "https://bugzilla.novell.com/ICSLogin/#";
|
||||
entryKonquererUsrKey.Text = "username";
|
||||
entryKonquererPwdKey.Text = "password";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
/// forge
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[4] )
|
||||
{
|
||||
entryKonquererURL.Text = "http://forge.novell.com/modules/news/#";
|
||||
entryKonquererUsrKey.Text = "username";
|
||||
entryKonquererPwdKey.Text = "password";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
/// bandit
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[5] )
|
||||
{
|
||||
entryKonquererURL.Text = "https://www.bandit-project.org/ICSLogin/#login";
|
||||
entryKonquererUsrKey.Text = "username";
|
||||
entryKonquererPwdKey.Text = "password";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
/// gw webaccess
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[6] )
|
||||
{
|
||||
entryKonquererURL.Text = "https://gmail.novell.com/gw/webacc#loginForm";
|
||||
entryKonquererUsrKey.Text = "User.id";
|
||||
entryKonquererPwdKey.Text = "User.password";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
/// gmail
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[7] )
|
||||
{
|
||||
entryKonquererURL.Text = "https://www.google.com/accounts/ServiceLogin#";
|
||||
entryKonquererUsrKey.Text = "Email";
|
||||
entryKonquererPwdKey.Text = "Passwd";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
/// yahoo mail
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[8] )
|
||||
{
|
||||
entryKonquererURL.Text = "http://mail.yahoo.com/#login_form";
|
||||
entryKonquererUsrKey.Text = "login";
|
||||
entryKonquererPwdKey.Text = "passwd";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
/// hotmail
|
||||
else if( comboKonquererTemplates.Entry.Text == stringKonquererTemplates[9] )
|
||||
{
|
||||
entryKonquererURL.Text = "http://login.passport.net/uilogin.srf#f1";
|
||||
entryKonquererUsrKey.Text = "login";
|
||||
entryKonquererPwdKey.Text = "passwd";
|
||||
entryKonquererUsrValue.HasFocus = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void on_cancelKonquerer_clicked(object obj, EventArgs args)
|
||||
{
|
||||
dialogKonquerer.Destroy();
|
||||
}
|
||||
|
||||
public void on_helpKonquerer_clicked(object obj, EventArgs args)
|
||||
{
|
||||
}
|
||||
|
||||
/// Kopete
|
||||
public void SSOKopete(object obj, EventArgs args)
|
||||
{
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogKopete", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogKopete.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
|
||||
}
|
||||
public void on_okKopete_clicked(object obj, EventArgs args)
|
||||
{
|
||||
dialogKopete.Destroy();
|
||||
}
|
||||
public void on_cancelKopete_clicked(object obj, EventArgs args)
|
||||
{
|
||||
dialogKopete.Destroy();
|
||||
}
|
||||
public void on_helpKopete_clicked(object obj, EventArgs args)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
///##################################################################
|
||||
|
@ -114,16 +114,16 @@ public class MiCasa : Store
|
||||
Logger.DbgLog("GUI:MiCasa.MiCasa() - BEGIN");
|
||||
|
||||
/// SecretID TreeStore
|
||||
tvSecretIDMiCasa = (Gtk.TreeView)CasaMain.gxml.GetWidget("tvSecretIDMiCasa");
|
||||
tvSecretIDMiCasa = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvSecretIDMiCasa");
|
||||
tsSecretIDMiCasa = new TreeStore(typeof(string), typeof(string[]), typeof(string[]), typeof(string), typeof(string[]), typeof(string[]));
|
||||
tvSecretIDMiCasa.AppendColumn("Secret-ID",new CellRendererText(),"text",0);
|
||||
tvSecretIDMiCasa.AppendColumn("Secret ID",new CellRendererText(),"text",0);
|
||||
tvSecretIDMiCasa.Model = tsSecretIDMiCasa;
|
||||
tsSecretIDMiCasa.SetSortColumnId(0, Gtk.SortType.Ascending);
|
||||
tvSecretIDMiCasa.RowActivated += new RowActivatedHandler(OntvSecretIDMiCasaRowActivated);
|
||||
tvSecretIDMiCasa.ButtonReleaseEvent += new ButtonReleaseEventHandler(OnRightClicked);
|
||||
tvSecretIDMiCasa.CursorChanged += new EventHandler(OnCursorChanged);
|
||||
/// NativeInfo TreeStore
|
||||
tvNativeInfoMiCasa = (Gtk.TreeView)CasaMain.gxml.GetWidget("tvNativeInfoMiCasa");
|
||||
tvNativeInfoMiCasa = (Gtk.TreeView)CasaMain.gxmlMain.GetWidget("tvNativeInfoMiCasa");
|
||||
tsNativeInfoMiCasa = new TreeStore(typeof(string), typeof(string));
|
||||
tvNativeInfoMiCasa.AppendColumn("NativeKey",new CellRendererText(),"text",0);
|
||||
tvNativeInfoMiCasa.AppendColumn("NativeValue",new CellRendererText(),"text",1);
|
||||
@ -131,11 +131,7 @@ public class MiCasa : Store
|
||||
tvNativeInfoMiCasa.ModifyBase(StateType.Normal,new Gdk.Color(0xff,0xff,0xe6));
|
||||
/// Aggregate the store
|
||||
AggregateStore();
|
||||
|
||||
//TreeIter iterSecret;
|
||||
//if( tsSecretIDMiCasa.GetIterFirst(out iterSecret) )
|
||||
// tvSecretIDMiCasa.Selection.SelectIter(iterSecret);
|
||||
|
||||
|
||||
Logger.DbgLog("GUI:MiCasa.MiCasa() - END");
|
||||
}
|
||||
|
||||
@ -268,7 +264,7 @@ public class MiCasa : Store
|
||||
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogManageSecret", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogManageSecret.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogManageSecret.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogManageSecret.Title = "miCASA - Manage Secret";
|
||||
|
||||
cellEditable = new CellRendererText();
|
||||
@ -682,7 +678,7 @@ public class MiCasa : Store
|
||||
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogNewSecret", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogNewSecret.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogNewSecret.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogNewSecret.Title = "miCASA - New Secret";
|
||||
|
||||
cellEditable = new CellRendererText();
|
||||
@ -875,7 +871,7 @@ public class MiCasa : Store
|
||||
{
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogConfirmDelete", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogConfirmDelete.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("windowMain");
|
||||
dialogConfirmDelete.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("windowMain");
|
||||
dialogConfirmDelete.Title = "miCASA - Delete Secret";
|
||||
|
||||
TreeModel model;
|
||||
@ -944,7 +940,7 @@ public class MiCasa : Store
|
||||
{
|
||||
Glade.XML gxmlTemp = new Glade.XML (Common.GladeFile, "dialogLinkKeyValue", null);
|
||||
gxmlTemp.Autoconnect (this);
|
||||
dialogLinkKeyValue.TransientFor = (Gtk.Window)CasaMain.gxml.GetWidget("dialogNewSecret");
|
||||
dialogLinkKeyValue.TransientFor = (Gtk.Window)CasaMain.gxmlMain.GetWidget("dialogNewSecret");
|
||||
dialogLinkKeyValue.Title = "miCASA - Link Keys";
|
||||
dialogLinkKeyValue.Modal = true;
|
||||
|
||||
@ -960,7 +956,7 @@ public class MiCasa : Store
|
||||
tsAvailableSecrets=new TreeStore(typeof(string),typeof(string));
|
||||
tsAvailableSecrets.SetSortColumnId(0, Gtk.SortType.Ascending);
|
||||
|
||||
tvAvailableSecrets.AppendColumn("Secret-ID",new CellRendererText(),"text",0);
|
||||
tvAvailableSecrets.AppendColumn("Secret ID",new CellRendererText(),"text",0);
|
||||
tvAvailableSecrets.Model=tsAvailableSecrets;
|
||||
tvAvailableSecrets.ButtonReleaseEvent +=new ButtonReleaseEventHandler(tvAvailableSecrets_ButtonReleaseEvent);
|
||||
|
||||
@ -986,7 +982,7 @@ public class MiCasa : Store
|
||||
tsLinkedKeys=new TreeStore(typeof(string), typeof(string));
|
||||
tsLinkedKeys.SetSortColumnId(0, Gtk.SortType.Descending);
|
||||
|
||||
tvLinkedKeys.AppendColumn("Secret-ID", new CellRendererText(), "text", 0);
|
||||
tvLinkedKeys.AppendColumn("Secret ID", new CellRendererText(), "text", 0);
|
||||
tvLinkedKeys.AppendColumn("Key", new CellRendererText(), "text", 1);
|
||||
tvLinkedKeys.Model=tsLinkedKeys;
|
||||
|
||||
@ -1093,7 +1089,7 @@ public class MiCasa : Store
|
||||
{
|
||||
selectedSecret = (string) model.GetValue(iter,0);
|
||||
// add NULL
|
||||
selectedSecret = selectedSecret;
|
||||
//selectedSecret = selectedSecret;
|
||||
selectedKey = (string) model.GetValue(iter,1);
|
||||
|
||||
LinkedKeyInfo lki = new LinkedKeyInfo(selectedSecret, selectedKey);
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user