Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-tweak.git;a=commitdiff;h=b09067a06983a18fa3e4c7adf70b3ed4a0000178

commit b09067a06983a18fa3e4c7adf70b3ed4a0000178
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Tue Sep 7 14:08:16 2010 +0000

*refresh all service for now

diff --git a/frugal-mono-tools/MainWindow.cs b/frugal-mono-tools/MainWindow.cs
index a738b7c..df42a19 100644
--- a/frugal-mono-tools/MainWindow.cs
+++ b/frugal-mono-tools/MainWindow.cs
@@ -920,13 +920,25 @@ public partial class MainWindow : Gtk.Window
MainClass.configuration.Set_ShowSplash(INT_ShowSplash.Active);
MainClass.configuration.ConfSave();
}
-
+       private void _serviceRefresh()
+       {
+               serviceListStore.Clear();
+               foreach(Service service in ServicesRc.Services)
+               {
+                       string Etat = "yes";
+                       if (!service.IsStarted()) Etat="No";
+                       string OnBoot = "yes";
+                       if (!service.IsStartedOnBoot()) OnBoot = "No";
+                       
serviceListStore.AppendValues(service.Get_Name(),Etat,OnBoot,service.GetDescription());
+               }
+       }
protected virtual void OnBTNServiceStartClicked (object sender, 
System.EventArgs e)
{
if(ServiceSelected!="")
{
Service service = new Service(ServiceSelected);
service.Start();
+                       _serviceRefresh();
}
}

@@ -936,6 +948,7 @@ public partial class MainWindow : Gtk.Window
{
Service service = new Service(ServiceSelected);
service.Stop();
+                       _serviceRefresh();
}
}

@@ -945,6 +958,7 @@ public partial class MainWindow : Gtk.Window
{
Service service = new Service(ServiceSelected);
service.EnableDisableOnBoot(false);
+                       _serviceRefresh();
}
}

@@ -954,6 +968,7 @@ public partial class MainWindow : Gtk.Window
{
Service service = new Service(ServiceSelected);
service.EnableDisableOnBoot(true);
+                       _serviceRefresh();
}
}

diff --git a/frugal-mono-tools/Service.cs b/frugal-mono-tools/Service.cs
index b089aa0..5a59512 100644
--- a/frugal-mono-tools/Service.cs
+++ b/frugal-mono-tools/Service.cs
@@ -96,18 +96,18 @@ namespace frugalmonotools
}
public void Start()
{
-                       Outils.Excecute("/sbin/service",this.Get_Name()+" 
start",false);
+                       Outils.Excecute("/sbin/service",this.Get_Name()+" 
start",true);
}
public void Stop()
{
-                       Outils.Excecute("/sbin/service",this.Get_Name()+" 
stop",false);
+                       Outils.Excecute("/sbin/service",this.Get_Name()+" 
stop",true);
}
public void EnableDisableOnBoot(bool enableit)
{
if(enableit)
-                               
Outils.Excecute("/sbin/service",this.Get_Name()+" add",false);
+                               
Outils.Excecute("/sbin/service",this.Get_Name()+" add",true);
else
-                               
Outils.Excecute("/sbin/service",this.Get_Name()+" del",false);
+                               
Outils.Excecute("/sbin/service",this.Get_Name()+" del",true);
}
}
}
diff --git a/frugal-mono-tools/gtk-gui/MainWindow.cs 
b/frugal-mono-tools/gtk-gui/MainWindow.cs
index 6c3a452..46273b9 100644
--- a/frugal-mono-tools/gtk-gui/MainWindow.cs
+++ b/frugal-mono-tools/gtk-gui/MainWindow.cs
@@ -311,7 +311,7 @@ public partial class MainWindow
this.ONG_principal = new global::Gtk.Notebook ();
this.ONG_principal.CanFocus = true;
this.ONG_principal.Name = "ONG_principal";
-               this.ONG_principal.CurrentPage = 9;
+               this.ONG_principal.CurrentPage = 5;
// Container child ONG_principal.Gtk.Notebook+NotebookChild
this.vbox4 = new global::Gtk.VBox ();
this.vbox4.Name = "vbox4";
diff --git a/frugal-mono-tools/gtk-gui/gui.stetic 
b/frugal-mono-tools/gtk-gui/gui.stetic
index 69b62e8..fb2fb23 100644
--- a/frugal-mono-tools/gtk-gui/gui.stetic
+++ b/frugal-mono-tools/gtk-gui/gui.stetic
@@ -27,7 +27,7 @@
<widget class="Gtk.Notebook" id="ONG_principal">
<property name="MemberName" />
<property name="CanFocus">True</property>
-        <property name="CurrentPage">9</property>
+        <property name="CurrentPage">5</property>
<child>
<widget class="Gtk.VBox" id="vbox4">
<property name="MemberName" />
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to