diff --git a/CASA/gui/CommonGUI.cs b/CASA/gui/CommonGUI.cs index 7ea8c990..4840464c 100644 --- a/CASA/gui/CommonGUI.cs +++ b/CASA/gui/CommonGUI.cs @@ -216,6 +216,7 @@ namespace Novell.CASA.GUI } } +#if W32 public static string FileChooser(FileChooserAction action, String sWindowTitle, String sCurrentFolder, String sHintFileName) { FileChooserDialog chooser = new FileChooserDialog (sWindowTitle, @@ -263,7 +264,7 @@ namespace Novell.CASA.GUI chooser.Destroy(); return ret; } - +#endif /// /// VerifyMasterPasswordWithUser dialog /// diff --git a/CASA/gui/ExportSecrets.cs b/CASA/gui/ExportSecrets.cs index 5f46663a..5efa3f47 100644 --- a/CASA/gui/ExportSecrets.cs +++ b/CASA/gui/ExportSecrets.cs @@ -95,8 +95,7 @@ namespace Novell.CASA.GUI if (iLastSlash > 0) { sHintFile = sFileName.Substring(iLastSlash + 1); - sHintDir = sFileName.Substring(8, sFileName.Length - sHintFile.Length - 8); - } + sHintDir = sFileName.Substring(8, sFileName.Length - sHintFile.Length - 8); } // save for later use m_config.SetConfigSetting(CommonGUI.HINT_DIR, sHintDir); @@ -134,7 +133,13 @@ namespace Novell.CASA.GUI private string GetStorageFileName(string sHintDir, string sHintFile) { +#if W32 String sFileName = CommonGUI.FileChooser(FileChooserAction.Save, "Select filename and location for secrets", sHintDir, sHintFile); +#else + String sFileName = null; + CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Not implemented"); +#endif + return sFileName; } diff --git a/CASA/gui/ImportSecrets.cs b/CASA/gui/ImportSecrets.cs index cdea0b02..bd2b60b0 100644 --- a/CASA/gui/ImportSecrets.cs +++ b/CASA/gui/ImportSecrets.cs @@ -31,9 +31,13 @@ namespace Novell.CASA.GUI { String sHintDir = m_config.GetConfigSetting(CommonGUI.HINT_DIR, null);; String sHintFilename = m_config.GetConfigSetting(CommonGUI.HINT_FILENAME, null); - +#if W32 // ask the user to locate the secret file to import string sFile = CommonGUI.FileChooser(Gtk.FileChooserAction.Open, "Select import file", sHintDir, sHintFilename); +#else + string sFile = null; + CommonGUI.DisplayMessage(Gtk.MessageType.Info, "Not implemented"); +#endif if (sFile != null) { // parse of the file:///