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
|
Tue May 02 15:37:37 MST 2006 - jnorman@novell.com
|
||||||
- Security Audit 4.1. Enhanced Persistence encryption salt generation
|
- Security Audit 4.1. Enhanced Persistence encryption salt generation
|
||||||
|
@ -169,16 +169,34 @@ namespace Novell.CASA.GUI
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
//Console.WriteLine("CasaMain: EXCEPTION \n"+e.ToString());
|
//Console.WriteLine("CasaMain: EXCEPTION \n"+e.ToString());
|
||||||
|
string message;
|
||||||
string message = "miCASA services are not available";
|
Gtk.ButtonsType buttonType = Gtk.ButtonsType.Close;
|
||||||
|
|
||||||
if (m_bShowDebug)
|
if (m_bShowDebug)
|
||||||
|
{
|
||||||
message = e.ToString();
|
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,
|
MessageDialog md=new MessageDialog(null,Gtk.DialogFlags.Modal,
|
||||||
Gtk.MessageType.Error,
|
Gtk.MessageType.Error,
|
||||||
Gtk.ButtonsType.Close,
|
buttonType,
|
||||||
message);
|
message);
|
||||||
|
|
||||||
md.Response+=new ResponseHandler(md_ResponseCloseWindow);
|
md.Response+=new ResponseHandler(md_ResponseCloseWindow);
|
||||||
|
|
||||||
md.SetPosition(Gtk.WindowPosition.CenterAlways);
|
md.SetPosition(Gtk.WindowPosition.CenterAlways);
|
||||||
md.Show();
|
md.Show();
|
||||||
Application.Run();
|
Application.Run();
|
||||||
@ -1632,6 +1650,13 @@ namespace Novell.CASA.GUI
|
|||||||
private static void md_ResponseCloseWindow(object o, ResponseArgs args)
|
private static void md_ResponseCloseWindow(object o, ResponseArgs args)
|
||||||
{
|
{
|
||||||
MessageDialog md = (MessageDialog)o;
|
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)
|
if (md != null)
|
||||||
{
|
{
|
||||||
md.Destroy();
|
md.Destroy();
|
||||||
|
@ -325,8 +325,7 @@ public class Common
|
|||||||
string sUrl = GetHelpPath() + GetLocale() + sHelpFilename;
|
string sUrl = GetHelpPath() + GetLocale() + sHelpFilename;
|
||||||
return ShowUrl(sUrl);
|
return ShowUrl(sUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static bool ShowUrl(string url)
|
public static bool ShowUrl(string url)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -362,6 +361,27 @@ public class Common
|
|||||||
else
|
else
|
||||||
return false;
|
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