Bug 171135. Give user the option to launch YAST when micasad is not running.

This commit is contained in:
Jim Norman 2006-05-04 10:37:20 +00:00
parent 9410dca79c
commit 3f70b8e277

View File

@ -179,9 +179,7 @@ namespace Novell.CASA.GUI
}
else
{
// NOTE: Until we can figure out how to run YAST as root from here.
//if (Common.IS_LINUX)
if (false)
if (Common.IS_LINUX)
{
message = "CASA services are not available.\r\n\r\nConfigure CASA using YAST?";
buttonType = Gtk.ButtonsType.YesNo;
@ -331,7 +329,7 @@ namespace Novell.CASA.GUI
UnlockGUI();
Gdk.Color color = new Gdk.Color(90, 77, 189);
Gdk.Color color = new Gdk.Color(90, 77, 189);
drawingarea1.ModifyBg(Gtk.StateType.Normal, color);
windowMain.Show();
@ -1666,7 +1664,15 @@ namespace Novell.CASA.GUI
if (args.Args[0].Equals(Gtk.ResponseType.Yes))
{
// launch yast to configure CASA
Common.StartProcess("/sbin/yast2", "CASA");
String sCurrentDesktop = Environment.GetEnvironmentVariable("WINDOWMANAGER");
if (sCurrentDesktop != null && (sCurrentDesktop.IndexOf("kde") > 0))
{
Common.StartProcess("kdesu", "/sbin/yast2 CASA");
}
else
{
Common.StartProcess("gnomesu", "/sbin/yast2 CASA");
}
}
if (md != null)