Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-mono-tools.git;a=commitdiff;h=694a48b200f06952c0fea326f59b0ded99064c33

commit 694a48b200f06952c0fea326f59b0ded99064c33
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Tue Aug 31 13:19:51 2010 +0000

*switch pacman-g2 xterm to vte
*fixes gui

diff --git a/frugal-mono-tools/Main.cs b/frugal-mono-tools/Main.cs
index 3149ebe..f8d7b56 100644
--- a/frugal-mono-tools/Main.cs
+++ b/frugal-mono-tools/Main.cs
@@ -40,8 +40,10 @@ namespace frugalmonotools
public static void checktest()
{
if (configuration.Get_CheckUpdate())
+                       {
updatePkg=Update.CheckUpdate();
-                       win.InitFinish();
+                       }
+                       //win.InitFinish();
}

public static void check()
@@ -69,12 +71,21 @@ namespace frugalmonotools
if(args.Length==0)
{
Gtk.Application.Init();
-                               win = new splash ();
-                               win.Show ();
-                               Thread th = new Thread(new 
ThreadStart(checktest));
-                               th.IsBackground=true;
-                               th.SetApartmentState(ApartmentState.STA);
-                               th.Start();
+
+                               if (configuration.Get_CheckUpdate())
+                               {
+                                       win = new splash ();
+                                       win.Show ();
+                                       Thread th = new Thread(new 
ThreadStart(checktest));
+                                       th.IsBackground=true;
+                                       
th.SetApartmentState(ApartmentState.STA);
+                                       th.Start();
+                               }
+                               else
+                               {
+                                       MainWindow Fen = new MainWindow();
+                                       Fen.Show();
+                               }
Gtk.Application.Run ();
}
else
diff --git a/frugal-mono-tools/MainWindow.cs b/frugal-mono-tools/MainWindow.cs
index 41e3303..05a6bca 100644
--- a/frugal-mono-tools/MainWindow.cs
+++ b/frugal-mono-tools/MainWindow.cs
@@ -660,18 +660,35 @@ public partial class MainWindow : Gtk.Window
protected virtual void OnBTNUninstallClicked (object sender, System.EventArgs e)
{
if(packageSelected=="") return;
-               Outils.Excecute("xterm"," -hold -e pacman-g2 -Rc 
"+packageSelected,true);
+               VteConsole vte = new VteConsole();
+               vte.Show();
+               string[] args=new string[3];
+               args[0]=" ";
+               args[1]="-Rc";
+               args[2]=packageSelected;
+               vte.Execute("pacman-g2",args);
}

protected virtual void OnBTNInstallClicked (object sender, System.EventArgs e)
{
if(packageSelected=="") return;
-               Outils.Excecute("xterm"," -hold -e pacman-g2 -Sy 
"+packageSelected,true);
+               VteConsole vte = new VteConsole();
+               vte.Show();
+               string[] args=new string[3];
+               args[0]=" ";
+               args[1]="-Sy";
+               args[2]=packageSelected;
+               vte.Execute("pacman-g2",args);
}

protected virtual void OnBTNUpdateClicked (object sender, System.EventArgs e)
{
-               Outils.Excecute("xterm"," -hold -e pacman-g2 -Syu",true);
+               VteConsole vte = new VteConsole();
+               vte.Show();
+               string[] args=new string[2];
+               args[0]=" ";
+               args[1]="-Syu";
+               vte.Execute("pacman-g2",args);
}

protected virtual void OnBTNPrinterClicked (object sender, System.EventArgs e)
@@ -681,12 +698,18 @@ public partial class MainWindow : Gtk.Window

protected virtual void OnBTNSynapticsClicked (object sender, System.EventArgs e)
{
-               Outils.Excecute("xterm"," -hold -e pacman-g2 -Sy 
xf86-input-synaptics",true);
+               VteConsole vte = new VteConsole();
+               vte.Show();
+               string[] args=new string[3];
+               args[0]=" ";
+               args[1]="-Sy";
+               args[2]="xf86-input-synaptics";
+               vte.Execute("pacman-g2",args);
}

protected virtual void OnBTNSetupClicked (object sender, System.EventArgs e)
{
-               Outils.Excecute("xterm"," -hold -e /sbin/setup",false);
+               Outils.Excecute("xterm"," -hold -e /sbin/setup",true);
}
protected virtual void OnBTNSaveConfClicked (object sender, System.EventArgs e)
{
diff --git a/frugal-mono-tools/VteConsole.cs b/frugal-mono-tools/VteConsole.cs
index a097f82..be81f5b 100644
--- a/frugal-mono-tools/VteConsole.cs
+++ b/frugal-mono-tools/VteConsole.cs
@@ -47,7 +47,7 @@ namespace frugalmonotools
byte[] commutf8 = System.Text.Encoding.UTF8.GetBytes(commande);
string commandev = System.Text.Encoding.UTF8.GetString(commutf8);
if (args==null)
-                               argv=new string[0];
+                               argv=null;
else
{
argv = new string[args.Length];
diff --git a/frugal-mono-tools/gtk-gui/MainWindow.cs 
b/frugal-mono-tools/gtk-gui/MainWindow.cs
index f7c21ea..0b47727 100644
--- a/frugal-mono-tools/gtk-gui/MainWindow.cs
+++ b/frugal-mono-tools/gtk-gui/MainWindow.cs
@@ -205,7 +205,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 = 0;
+               this.ONG_principal.CurrentPage = 2;
// 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 f307979..8f4627b 100644
--- a/frugal-mono-tools/gtk-gui/gui.stetic
+++ b/frugal-mono-tools/gtk-gui/gui.stetic
@@ -21,7 +21,7 @@
<widget class="Gtk.Notebook" id="ONG_principal">
<property name="MemberName" />
<property name="CanFocus">True</property>
-        <property name="CurrentPage">0</property>
+        <property name="CurrentPage">2</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