Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugal-mono-tools.git;a=commitdiff;h=eeb5e9d5535259d4900abdb3fa604e26c3a5bc81
commit eeb5e9d5535259d4900abdb3fa604e26c3a5bc81 Author: bouleetbil <bouleet...@frogdev.info> Date: Tue Aug 31 00:09:43 2010 +0200 *begin to use vte instead xterm for started some commands diff --git a/frugal-mono-tools.sln b/frugal-mono-tools.sln index 00546b0..2cf4ec9 100644 --- a/frugal-mono-tools.sln +++ b/frugal-mono-tools.sln @@ -17,6 +17,7 @@ Global EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {069FB0B9-80D4-4093-88F3-116B09B0E09F}.Debug|x86.ActiveCfg = Debug|Any CPU + {069FB0B9-80D4-4093-88F3-116B09B0E09F}.Debug|x86.Build.0 = Debug|Any CPU {069FB0B9-80D4-4093-88F3-116B09B0E09F}.Release|Any CPU.ActiveCfg = Release|Any CPU {069FB0B9-80D4-4093-88F3-116B09B0E09F}.Release|x86.ActiveCfg = Release|Any CPU {8CC36C0E-5E0E-4B46-A124-2CE460C48FF7}.Debug|x86.ActiveCfg = Debug|Any CPU diff --git a/frugal-mono-tools/VteConsole.cs b/frugal-mono-tools/VteConsole.cs new file mode 100644 index 0000000..6b600f6 --- /dev/null +++ b/frugal-mono-tools/VteConsole.cs @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2010 by Gaetan Gourdin <bouleet...@frogdev.info> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +using System; +using System.Collections; +using Vte; +namespace frugalmonotools +{ + public partial class VteConsole : Gtk.Window + { + Vte.Terminal term; + public VteConsole () : base(Gtk.WindowType.Toplevel) + { + this.Build (); + term = new Vte.Terminal(); + term.CursorBlinks = true; + term.MouseAutohide = true; + term.ScrollOnKeystroke = true; + term.DeleteBinding = TerminalEraseBinding.Auto; + term.BackspaceBinding = TerminalEraseBinding.Auto; + term.Encoding = "UTF-8"; + term.FontFromString = "Monospace 12"; + + this.vbox1.Add (term); + this.vbox1.ShowAll(); + + + string[] argv = Environment.GetCommandLineArgs (); + // wants an array of "variable=value" + string[] envv = new string [Environment.GetEnvironmentVariables ().Count]; + int i = 0; + foreach (DictionaryEntry e in Environment.GetEnvironmentVariables ()) + { + if (e.Key == "" || e.Value == "") + continue; + string tmp = String.Format ("{0}={1}", e.Key, e.Value); + envv[i] = tmp; + i ++; + } + + int pid = term.ForkCommand ( + Environment.GetEnvironmentVariable ("SHELL"), + argv, + envv, + Environment.CurrentDirectory, + false, + true, + true); + Console.WriteLine ("Child pid: {0}", pid); + + } + } +} + diff --git a/frugal-mono-tools/frugal-mono-tools.csproj b/frugal-mono-tools/frugal-mono-tools.csproj index 0baeb20..acae087 100644 --- a/frugal-mono-tools/frugal-mono-tools.csproj +++ b/frugal-mono-tools/frugal-mono-tools.csproj @@ -50,6 +50,7 @@ <Reference Include="webkit-sharp, Version=1.1.15.0, Culture=neutral, PublicKeyToken=eaa1d335d2e19745" /> <Reference Include="notify-sharp, Version=0.4.0.0, Culture=neutral, PublicKeyToken=2df29c54e245917a" /> <Reference Include="System.ServiceProcess" /> + <Reference Include="vte-sharp, Version=0.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="gtk-gui\gui.stetic"> @@ -82,6 +83,8 @@ <Compile Include="splash.cs" /> <Compile Include="gtk-gui\frugalmonotools.splash.cs" /> <Compile Include="Configuration.cs" /> + <Compile Include="VteConsole.cs" /> + <Compile Include="gtk-gui\frugalmonotools.VteConsole.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> diff --git a/frugal-mono-tools/gtk-gui/MainWindow.cs b/frugal-mono-tools/gtk-gui/MainWindow.cs index 0ce24b3..f7c21ea 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 = 7; + this.ONG_principal.CurrentPage = 0; // 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 ca4c679..f307979 100644 --- a/frugal-mono-tools/gtk-gui/gui.stetic +++ b/frugal-mono-tools/gtk-gui/gui.stetic @@ -9,6 +9,7 @@ <widget-library name="webkit-sharp, Version=1.1.15.0, Culture=neutral, PublicKeyToken=eaa1d335d2e19745" /> <widget-library name="notify-sharp, Version=0.4.0.0, Culture=neutral, PublicKeyToken=2df29c54e245917a" /> <widget-library name="../bin/Debug/frugal-mono-tools.exe" internal="true" /> + <widget-library name="vte-sharp, Version=0.16.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> </import> <widget class="Gtk.Window" id="MainWindow" design-size="597 395"> <property name="MemberName" /> @@ -20,7 +21,7 @@ <widget class="Gtk.Notebook" id="ONG_principal"> <property name="MemberName" /> <property name="CanFocus">True</property> - <property name="CurrentPage">7</property> + <property name="CurrentPage">0</property> <child> <widget class="Gtk.VBox" id="vbox4"> <property name="MemberName" /> @@ -1704,4 +1705,24 @@ Public License instead of this License. </widget> </child> </widget> + <widget class="Gtk.Window" id="frugalmonotools.VteConsole" design-size="400 300"> + <property name="MemberName" /> + <property name="Title" translatable="yes">Console</property> + <property name="WindowPosition">CenterOnParent</property> + <child> + <widget class="Gtk.VBox" id="vbox1"> + <property name="MemberName" /> + <property name="Spacing">6</property> + <child> + <placeholder /> + </child> + <child> + <placeholder /> + </child> + <child> + <placeholder /> + </child> + </widget> + </child> + </widget> </stetic-interface> \ No newline at end of file _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git