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

commit 7745507f628a31150b8cb227909275c258788632
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Thu Nov 11 00:25:26 2010 +0100

*can install grub

diff --git a/frugal-mono-tools/Grub.cs b/frugal-mono-tools/Grub.cs
index 3ea564c..a515bc7 100644
--- a/frugal-mono-tools/Grub.cs
+++ b/frugal-mono-tools/Grub.cs
@@ -172,6 +172,10 @@ namespace frugalmonotools
MenuGrub.Close();
}
catch{}
+               }
+               public void Install(string hdd)
+               {
+                       Outils.Excecute("grub-install",hdd,false);
}
}
}
diff --git a/frugal-mono-tools/WID_Grub.cs b/frugal-mono-tools/WID_Grub.cs
index af68db8..0ad4c49 100644
--- a/frugal-mono-tools/WID_Grub.cs
+++ b/frugal-mono-tools/WID_Grub.cs
@@ -39,6 +39,7 @@ namespace frugalmonotools
BTN_AddEntry.Visible = false;
BTN_Save.Visible = false;
BTN_Apply.Visible = false;
+                               SAI_Hdd.Visible = false;
LIB_Root.Visible=true;
}
else
@@ -82,9 +83,7 @@ namespace frugalmonotools

protected virtual void OnBTNApplyClicked (object sender, System.EventArgs e)
{
-                       
MainClass.grub.SetDefault(int.Parse(this.SAI_Default.Text));
-                       MainClass.grub.SetGfx(this.SAI_Gfx.Text);
-                       
MainClass.grub.SetTimeOut(int.Parse(this.SAI_TimeOut.Text));
+                       MainClass.grub.Install(SAI_Hdd.Text);
}

protected virtual void OnBTNAddEntryClicked (object sender, System.EventArgs e)
@@ -96,6 +95,9 @@ namespace frugalmonotools

protected virtual void OnBTNSaveClicked (object sender, System.EventArgs e)
{
+                       
MainClass.grub.SetDefault(int.Parse(this.SAI_Default.Text));
+                       MainClass.grub.SetGfx(this.SAI_Gfx.Text);
+                       
MainClass.grub.SetTimeOut(int.Parse(this.SAI_TimeOut.Text));
MainClass.grub.Save();
}

diff --git a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Grub.cs 
b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Grub.cs
index 5bb4b25..23d8e3c 100644
--- a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Grub.cs
+++ b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_Grub.cs
@@ -58,6 +58,8 @@ namespace frugalmonotools

private global::Gtk.Button BTN_Apply;

+               private global::Gtk.Entry SAI_Hdd;
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
@@ -337,22 +339,32 @@ namespace frugalmonotools
w48.Add (w49);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w51 = new global::Gtk.Label ();
-                       w51.LabelProp = global::Mono.Unix.Catalog.GetString 
("Install Grub");
+                       w51.LabelProp = global::Mono.Unix.Catalog.GetString 
("Install Grub to");
w51.UseUnderline = true;
w48.Add (w51);
w47.Add (w48);
this.BTN_Apply.Add (w47);
this.hbox6.Add (this.BTN_Apply);
global::Gtk.Box.BoxChild w55 = 
((global::Gtk.Box.BoxChild)(this.hbox6[this.BTN_Apply]));
-                       w55.PackType = ((global::Gtk.PackType)(1));
w55.Position = 2;
w55.Expand = false;
w55.Fill = false;
+                       // Container child hbox6.Gtk.Box+BoxChild
+                       this.SAI_Hdd = new global::Gtk.Entry ();
+                       this.SAI_Hdd.CanFocus = true;
+                       this.SAI_Hdd.Name = "SAI_Hdd";
+                       this.SAI_Hdd.Text = global::Mono.Unix.Catalog.GetString 
("/dev/sda");
+                       this.SAI_Hdd.IsEditable = true;
+                       this.SAI_Hdd.InvisibleChar = '•';
+                       this.hbox6.Add (this.SAI_Hdd);
+                       global::Gtk.Box.BoxChild w56 = 
((global::Gtk.Box.BoxChild)(this.hbox6[this.SAI_Hdd]));
+                       w56.PackType = ((global::Gtk.PackType)(1));
+                       w56.Position = 3;
this.vbox2.Add (this.hbox6);
-                       global::Gtk.Box.BoxChild w56 = 
((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox6]));
-                       w56.Position = 1;
-                       w56.Expand = false;
-                       w56.Fill = false;
+                       global::Gtk.Box.BoxChild w57 = 
((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox6]));
+                       w57.Position = 1;
+                       w57.Expand = false;
+                       w57.Fill = false;
this.Add (this.vbox2);
if ((this.Child != null)) {
this.Child.ShowAll ();
diff --git a/frugal-mono-tools/gtk-gui/gui.stetic 
b/frugal-mono-tools/gtk-gui/gui.stetic
index 1eaacc0..221cb3a 100644
--- a/frugal-mono-tools/gtk-gui/gui.stetic
+++ b/frugal-mono-tools/gtk-gui/gui.stetic
@@ -2838,7 +2838,7 @@ Public License instead of this License.
</widget>
</child>
</widget>
-  <widget class="Gtk.Bin" id="frugalmonotools.WID_Grub" design-size="376 300">
+  <widget class="Gtk.Bin" id="frugalmonotools.WID_Grub" design-size="557 300">
<property name="MemberName" />
<property name="Visible">False</property>
<child>
@@ -3150,18 +3150,31 @@ Public License instead of this License.
<property name="CanFocus">True</property>
<property name="Type">TextAndIcon</property>
<property name="Icon">stock:gtk-apply Menu</property>
-                <property name="Label" translatable="yes">Install 
Grub</property>
+                <property name="Label" translatable="yes">Install Grub 
to</property>
<property name="UseUnderline">True</property>
<signal name="Clicked" handler="OnBTNApplyClicked" />
</widget>
<packing>
-                <property name="PackType">End</property>
<property name="Position">2</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
+            <child>
+              <widget class="Gtk.Entry" id="SAI_Hdd">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="Text" translatable="yes">/dev/sda</property>
+                <property name="IsEditable">True</property>
+                <property name="InvisibleChar">•</property>
+              </widget>
+              <packing>
+                <property name="PackType">End</property>
+                <property name="Position">3</property>
+                <property name="AutoSize">True</property>
+              </packing>
+            </child>
</widget>
<packing>
<property name="Position">1</property>
@@ -3284,4 +3297,4 @@ Public License instead of this License.
</widget>
</child>
</widget>
-</stetic-interface>
+</stetic-interface>
\ No newline at end of file
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to