Bug 171135. Give user the option to launch YAST when micasad is not running.
This commit is contained in:
parent
cde3ddbd8b
commit
6bf0bc9539
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 02 15:37:37 MST 2006 - jnorman@novell.com
|
||||
- Bug 171135. Give user the option to launch YAST when micasad is
|
||||
not running.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 02 15:37:37 MST 2006 - jnorman@novell.com
|
||||
- Security Audit 4.1. Enhanced Persistence encryption salt generation
|
||||
|
@ -169,16 +169,34 @@ namespace Novell.CASA.GUI
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
//Console.WriteLine("CasaMain: EXCEPTION \n"+e.ToString());
|
||||
|
||||
string message = "miCASA services are not available";
|
||||
//Console.WriteLine("CasaMain: EXCEPTION \n"+e.ToString());
|
||||
string message;
|
||||
Gtk.ButtonsType buttonType = Gtk.ButtonsType.Close;
|
||||
|
||||
if (m_bShowDebug)
|
||||
{
|
||||
message = e.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Common.IS_LINUX)
|
||||
{
|
||||
message = "CASA services are not available.\r\n\r\nConfigure CASA using YAST?";
|
||||
buttonType = Gtk.ButtonsType.YesNo;
|
||||
}
|
||||
else
|
||||
{
|
||||
message = "CASA services are not available";
|
||||
}
|
||||
}
|
||||
|
||||
MessageDialog md=new MessageDialog(null,Gtk.DialogFlags.Modal,
|
||||
Gtk.MessageType.Error,
|
||||
Gtk.ButtonsType.Close,
|
||||
message);
|
||||
Gtk.MessageType.Error,
|
||||
buttonType,
|
||||
message);
|
||||
|
||||
md.Response+=new ResponseHandler(md_ResponseCloseWindow);
|
||||
|
||||
md.SetPosition(Gtk.WindowPosition.CenterAlways);
|
||||
md.Show();
|
||||
Application.Run();
|
||||
@ -1632,6 +1650,13 @@ namespace Novell.CASA.GUI
|
||||
private static void md_ResponseCloseWindow(object o, ResponseArgs args)
|
||||
{
|
||||
MessageDialog md = (MessageDialog)o;
|
||||
|
||||
if (args.Args[0].Equals(Gtk.ResponseType.Yes))
|
||||
{
|
||||
// launch yast to configure CASA
|
||||
Common.StartProcess("/sbin/yast2", "CASA");
|
||||
}
|
||||
|
||||
if (md != null)
|
||||
{
|
||||
md.Destroy();
|
||||
|
@ -325,8 +325,7 @@ public class Common
|
||||
string sUrl = GetHelpPath() + GetLocale() + sHelpFilename;
|
||||
return ShowUrl(sUrl);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static bool ShowUrl(string url)
|
||||
{
|
||||
|
||||
@ -362,6 +361,27 @@ public class Common
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void StartProcess(string sProcessPath, string sProcessArgs)
|
||||
{
|
||||
if (sProcessPath != null)
|
||||
{
|
||||
Process newProcess = new Process();
|
||||
newProcess.StartInfo.FileName = sProcessPath;
|
||||
if (sProcessArgs != null)
|
||||
newProcess.StartInfo.Arguments = sProcessArgs;
|
||||
|
||||
try
|
||||
{
|
||||
newProcess.Start();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.DbgLog(e.Message);
|
||||
Logger.DbgLog(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user