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

commit 76345523b423ec9c09b58d599945b0e075e0b4a6
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Sun Sep 19 21:33:30 2010 +0200

*update .pacnew ready just should find an icon :)

diff --git a/frugal-mono-tools/WID_UpdateConf.cs 
b/frugal-mono-tools/WID_UpdateConf.cs
index 7b5c26d..ba4f66f 100644
--- a/frugal-mono-tools/WID_UpdateConf.cs
+++ b/frugal-mono-tools/WID_UpdateConf.cs
@@ -50,6 +50,7 @@ namespace frugalmonotools

public void InitUpdateConf()
{
+                       listStore.Clear();
string dir=@"/etc/";
string pattern ="*"+cch_extPacnew;
System.IO.DirectoryInfo rootDir = new System.IO.DirectoryInfo(dir);
@@ -73,6 +74,39 @@ namespace frugalmonotools
catch{}
}

+               protected virtual void OnBTNSeeDiffClicked (object sender, 
System.EventArgs e)
+               {
+                       string strOrg =FileSelected.Replace(cch_extPacnew,"");
+                       if(MainClass.boRoot)
+                               Outils.Excecute("python","/usr/bin/PyFrugalVTE 
diff -u "+strOrg+" "+FileSelected,false);
+                       else
+                               Outils.ExcecuteAsRoot("python 
/usr/bin/PyFrugalVTE diff -u "+strOrg+" "+FileSelected,false);
+               }
+
+               protected virtual void OnBTNReplaceClicked (object sender, 
System.EventArgs e)
+               {
+                       //use mv instead c# for a user can start it with 
gksu/ksu
+                       string strOrg =FileSelected.Replace(cch_extPacnew,"");
+                       if(MainClass.boRoot)
+                               Outils.Excecute("mv",FileSelected+" 
"+strOrg,true);
+                       else
+                               Outils.ExcecuteAsRoot("mv "+FileSelected+" 
"+strOrg,true);
+                       this.InitUpdateConf();
+               }
+
+               protected virtual void OnBTNDeleteClicked (object sender, 
System.EventArgs e)
+               {
+                       //use rm instead c# for a user can start it with 
gksu/ksu
+                       if(MainClass.boRoot)
+                               Outils.Excecute("rm",FileSelected,true);
+                       else
+                               Outils.ExcecuteAsRoot("rm "+FileSelected,true);
+                       this.InitUpdateConf();
+               }
+
+
+
+

}
}
diff --git a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_UpdateConf.cs 
b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_UpdateConf.cs
index 21b20d7..1a7a579 100644
--- a/frugal-mono-tools/gtk-gui/frugalmonotools.WID_UpdateConf.cs
+++ b/frugal-mono-tools/gtk-gui/frugalmonotools.WID_UpdateConf.cs
@@ -12,6 +12,12 @@ namespace frugalmonotools

private global::Gtk.HBox hbox1;

+               private global::Gtk.Button BTN_SeeDiff;
+
+               private global::Gtk.Button BTN_Replace;
+
+               private global::Gtk.Button BTN_Delete;
+
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
@@ -38,14 +44,52 @@ namespace frugalmonotools
this.hbox1 = new global::Gtk.HBox ();
this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6;
+                       // Container child hbox1.Gtk.Box+BoxChild
+                       this.BTN_SeeDiff = new global::Gtk.Button ();
+                       this.BTN_SeeDiff.CanFocus = true;
+                       this.BTN_SeeDiff.Name = "BTN_SeeDiff";
+                       this.BTN_SeeDiff.UseUnderline = true;
+                       this.BTN_SeeDiff.Label = 
global::Mono.Unix.Catalog.GetString ("See diff");
+                       this.hbox1.Add (this.BTN_SeeDiff);
+                       global::Gtk.Box.BoxChild w3 = 
((global::Gtk.Box.BoxChild)(this.hbox1[this.BTN_SeeDiff]));
+                       w3.Position = 0;
+                       w3.Expand = false;
+                       w3.Fill = false;
+                       // Container child hbox1.Gtk.Box+BoxChild
+                       this.BTN_Replace = new global::Gtk.Button ();
+                       this.BTN_Replace.CanFocus = true;
+                       this.BTN_Replace.Name = "BTN_Replace";
+                       this.BTN_Replace.UseUnderline = true;
+                       this.BTN_Replace.Label = 
global::Mono.Unix.Catalog.GetString ("Replace");
+                       this.hbox1.Add (this.BTN_Replace);
+                       global::Gtk.Box.BoxChild w4 = 
((global::Gtk.Box.BoxChild)(this.hbox1[this.BTN_Replace]));
+                       w4.Position = 1;
+                       w4.Expand = false;
+                       w4.Fill = false;
+                       // Container child hbox1.Gtk.Box+BoxChild
+                       this.BTN_Delete = new global::Gtk.Button ();
+                       this.BTN_Delete.CanFocus = true;
+                       this.BTN_Delete.Name = "BTN_Delete";
+                       this.BTN_Delete.UseUnderline = true;
+                       this.BTN_Delete.Label = 
global::Mono.Unix.Catalog.GetString ("Delete");
+                       this.hbox1.Add (this.BTN_Delete);
+                       global::Gtk.Box.BoxChild w5 = 
((global::Gtk.Box.BoxChild)(this.hbox1[this.BTN_Delete]));
+                       w5.Position = 2;
+                       w5.Expand = false;
+                       w5.Fill = false;
this.vbox1.Add (this.hbox1);
-                       global::Gtk.Box.BoxChild w3 = 
((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
-                       w3.Position = 2;
+                       global::Gtk.Box.BoxChild w6 = 
((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
+                       w6.Position = 1;
+                       w6.Expand = false;
+                       w6.Fill = false;
this.Add (this.vbox1);
if ((this.Child != null)) {
this.Child.ShowAll ();
}
this.Hide ();
+                       this.BTN_SeeDiff.Clicked += new 
global::System.EventHandler (this.OnBTNSeeDiffClicked);
+                       this.BTN_Replace.Clicked += new 
global::System.EventHandler (this.OnBTNReplaceClicked);
+                       this.BTN_Delete.Clicked += new 
global::System.EventHandler (this.OnBTNDeleteClicked);
}
}
}
diff --git a/frugal-mono-tools/gtk-gui/gui.stetic 
b/frugal-mono-tools/gtk-gui/gui.stetic
index 94babc5..7a9d91a 100644
--- a/frugal-mono-tools/gtk-gui/gui.stetic
+++ b/frugal-mono-tools/gtk-gui/gui.stetic
@@ -2486,25 +2486,63 @@ Public License instead of this License.
</packing>
</child>
<child>
-          <placeholder />
-        </child>
-        <child>
<widget class="Gtk.HBox" id="hbox1">
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
-              <placeholder />
+              <widget class="Gtk.Button" id="BTN_SeeDiff">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="Type">TextOnly</property>
+                <property name="Label" translatable="yes">See diff</property>
+                <property name="UseUnderline">True</property>
+                <signal name="Clicked" handler="OnBTNSeeDiffClicked" />
+              </widget>
+              <packing>
+                <property name="Position">0</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
</child>
<child>
-              <placeholder />
+              <widget class="Gtk.Button" id="BTN_Replace">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="Type">TextOnly</property>
+                <property name="Label" translatable="yes">Replace</property>
+                <property name="UseUnderline">True</property>
+                <signal name="Clicked" handler="OnBTNReplaceClicked" />
+              </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
</child>
<child>
-              <placeholder />
+              <widget class="Gtk.Button" id="BTN_Delete">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="Type">TextOnly</property>
+                <property name="Label" translatable="yes">Delete</property>
+                <property name="UseUnderline">True</property>
+                <signal name="Clicked" handler="OnBTNDeleteClicked" />
+              </widget>
+              <packing>
+                <property name="Position">2</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
</child>
</widget>
<packing>
-            <property name="Position">2</property>
+            <property name="Position">1</property>
<property name="AutoSize">True</property>
+            <property name="Expand">False</property>
+            <property name="Fill">False</property>
</packing>
</child>
</widget>
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to