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

commit faa14685032831f3a039212af70a099803642882
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Wed Sep 8 22:14:21 2010 +0200

*new project
*IRC client in gtk# use libsmartirc
*better that console irc for the user

diff --git a/frugal-irc/AssemblyInfo.cs b/frugal-irc/AssemblyInfo.cs
new file mode 100644
index 0000000..78a1938
--- /dev/null
+++ b/frugal-irc/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// /*
+//  *  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.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+
+[assembly: AssemblyTitle("frugal-irc")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and 
revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+
+[assembly: AssemblyVersion("1.0.*")]
+
+// The following attributes are used to specify the signing key for the 
assembly,
+// if desired. See the Mono documentation for more information about signing.
+
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+
diff --git a/frugal-irc/Main.cs b/frugal-irc/Main.cs
new file mode 100644
index 0000000..4421649
--- /dev/null
+++ b/frugal-irc/Main.cs
@@ -0,0 +1,34 @@
+// /*
+//  *  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 Gtk;
+
+namespace frugalirc
+{
+       class MainClass
+       {
+               public static void Main (string[] args)
+               {
+                       Application.Init ();
+                       MainWindow win = new MainWindow ();
+                       win.Show ();
+                       Application.Run ();
+               }
+       }
+}
+
diff --git a/frugal-irc/MainWindow.cs b/frugal-irc/MainWindow.cs
new file mode 100644
index 0000000..8f7c711
--- /dev/null
+++ b/frugal-irc/MainWindow.cs
@@ -0,0 +1,248 @@
+// /*
+//  *  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 Gtk;
+using System.Threading;
+using System.Collections;
+using System.Collections.Generic;
+
+using Meebey.SmartIrc4net;
+
+public partial class MainWindow : Gtk.Window
+{
+        // make an instance of the high-level API
+    public static IrcClient irc = new IrcClient();
+       private Thread T;
+       public MainWindow () : base(Gtk.WindowType.Toplevel)
+       {
+               Build ();
+       }
+
+       protected void OnDeleteEvent (object sender, DeleteEventArgs a)
+       {
+               Application.Quit ();
+               T.Abort();
+               a.RetVal = true;
+       }
+        // this method we will use to analyse queries (also known as private 
messages)
+    public  void OnQueryMessage(object sender, IrcEventArgs e)
+    {
+        switch (e.Data.MessageArray[0]) {
+            // debug stuff
+            case "dump_channel":
+                string requested_channel = e.Data.MessageArray[1];
+                // getting the channel (via channel sync feature)
+                Channel channel = irc.GetChannel(requested_channel);
+
+                // here we send messages
+                irc.SendMessage(SendType.Message, e.Data.Nick, "<channel 
'"+requested_channel+"'>");
+
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Name: 
'"+channel.Name+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Topic: 
'"+channel.Topic+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Mode: 
'"+channel.Mode+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "Key: 
'"+channel.Key+"'");
+                irc.SendMessage(SendType.Message, e.Data.Nick, "UserLimit: 
'"+channel.UserLimit+"'");
+
+                // here we go through all users of the channel and show their
+                // hashtable key and nickname
+                string nickname_list = "";
+                nickname_list += "Users: ";
+                foreach (DictionaryEntry de in channel.Users) {
+                    string      key         = (string)de.Key;
+                    ChannelUser channeluser = (ChannelUser)de.Value;
+                    nickname_list += "(";
+                    if (channeluser.IsOp) {
+                        nickname_list += "@";
+                    }
+                    if (channeluser.IsVoice) {
+                        nickname_list += "+";
+                    }
+                    nickname_list += ")"+key+" => "+channeluser.Nick+", ";
+                }
+                irc.SendMessage(SendType.Message, e.Data.Nick, nickname_list);
+
+                irc.SendMessage(SendType.Message, e.Data.Nick, "</channel>");
+            break;
+            case "gc":
+                GC.Collect();
+            break;
+            // typical commands
+            case "join":
+                irc.RfcJoin(e.Data.MessageArray[1]);
+            break;
+            case "part":
+                irc.RfcPart(e.Data.MessageArray[1]);
+            break;
+            case "die":
+                Exit();
+            break;
+        }
+    }
+
+       public void Exit()
+    {
+        // we are done, lets exit...
+        System.Console.WriteLine("Exiting...");
+        System.Environment.Exit(0);
+    }
+
+    // this method handles when we receive "ERROR" from the IRC server
+    public  void OnError(object sender, ErrorEventArgs e)
+    {
+        System.Console.WriteLine("Error: "+e.ErrorMessage);
+        Exit();
+    }
+    public  void ReadCommands()
+    {
+        // here we read the commands from the stdin and send it to the IRC API
+        // WARNING, it uses WriteLine() means you need to enter RFC commands
+        // like "JOIN #test" and then "PRIVMSG #test :hello to you"
+        while (true) {
+            string cmd = System.Console.ReadLine();
+            if (cmd.StartsWith("/list")) {
+                int pos = cmd.IndexOf(" ");
+                string channel = null;
+                if (pos != -1) {
+                    channel = cmd.Substring(pos + 1);
+                }
+
+                IList<ChannelInfo> channelInfos = irc.GetChannelList(channel);
+                Console.WriteLine("channel count: {0}", channelInfos.Count);
+                foreach (ChannelInfo channelInfo in channelInfos) {
+                    Console.WriteLine("channel: {0} user count: {1} topic: 
{2}",
+                                      channelInfo.Channel,
+                                      channelInfo.UserCount,
+                                      channelInfo.Topic);
+                }
+            } else {
+                irc.WriteLine(cmd);
+            }
+        }
+    }
+
+
+    // this method will get all IRC messages
+    public  void OnRawMessage(object sender, IrcEventArgs e)
+    {
+        AppendText("Received: "+e.Data.RawMessage);
+    }
+
+    protected virtual void OnBTNConnectClicked (object sender, 
System.EventArgs e)
+       {
+               BTN_Connect.Visible=false;
+
+               T = new Thread(Connect);
+               T.IsBackground=true;
+               T.SetApartmentState(ApartmentState.STA);
+               T.Start();
+       }
+       private void Connect()
+       {
+               Thread.CurrentThread.Name = "Main";
+
+        // UTF-8 test
+        irc.Encoding = System.Text.Encoding.UTF8;
+
+        // wait time between messages, we can set this lower on own irc servers
+        irc.SendDelay = 200;
+
+        // we use channel sync, means we can use irc.GetChannel() and so on
+        irc.ActiveChannelSyncing = true;
+
+        // here we connect the events of the API to our written methods
+        // most have own event handler types, because they ship different data
+        irc.OnQueryMessage += new IrcEventHandler(OnQueryMessage);
+        irc.OnError += new ErrorEventHandler(OnError);
+        irc.OnRawMessage += new IrcEventHandler(OnRawMessage);
+
+        string[] serverlist;
+        // the server we want to connect to, could be also a simple string
+        serverlist = new string[] {SAI_Serveur.Text};
+        int port = int.Parse(SAI_Port.Text);
+        string channel = SAI_Chan.Text;
+        try {
+            // here we try to connect to the server and exceptions get handled
+            irc.Connect(serverlist, port);
+        } catch (ConnectionException exe) {
+            // something went wrong, the reason will be shown
+            System.Console.WriteLine("couldn't connect! Reason: "+exe.Message);
+            Exit();
+        }
+
+        try {
+            // here we logon and register our nickname and so on
+            irc.Login(SAI_User.Text,SAI_User.Text);
+            // join the channel
+            irc.RfcJoin(channel);
+
+            for (int i = 0; i < 3; i++) {
+                // here we send just 3 different types of messages, 3 times for
+                // testing the delay and flood protection (messagebuffer work)
+                               irc.SendMessage(SendType.Notice, channel, 
"Hello");
+                       }
+
+            // spawn a new thread to read the stdin of the console, this we use
+            // for reading IRC commands from the keyboard while the IRC 
connection
+            // stays in its own thread
+            new Thread(new ThreadStart(ReadCommands)).Start();
+
+            // here we tell the IRC API to go into a receive mode, all events
+            // will be triggered by _this_ thread (main thread in this case)
+            // Listen() blocks by default, you can also use ListenOnce() if you
+            // need that does one IRC operation and then returns, so you need 
then
+            // an own loop
+            irc.Listen();
+
+            // when Listen() returns our IRC session is over, to be sure we 
call
+            // disconnect manually
+            irc.Disconnect();
+        } catch (ConnectionException) {
+            // this exception is handled because Disconnect() can throw a not
+            // connected exception
+            Exit();
+        } catch (Exception exe) {
+            // this should not happen by just in case we handle it nicely
+            System.Console.WriteLine("Error occurred! Message: "+exe.Message);
+            System.Console.WriteLine("Exception: "+exe.StackTrace);
+            Exit();
+        }
+
+       }
+
+       private void AppendText(string text)
+       {
+
+    Gtk.Application.Invoke (delegate {
+        TextIter mIter = TXT_Messages.Buffer.EndIter;
+        TXT_Messages.Buffer.Insert(ref mIter, text+"\n");
+        TXT_Messages.ScrollToIter(TXT_Messages.Buffer.EndIter, 0, false, 0, 0);
+        });
+
+
+               Console.WriteLine(text);
+       }
+
+       protected virtual void OnBTNSendClicked (object sender, 
System.EventArgs e)
+       {
+               irc.SendMessage(SendType.Notice, SAI_Chan.Text, SAI_Envoi.Text);
+               SAI_Envoi.Text="";
+       }
+
+
+}
+
diff --git a/frugal-irc/frugal-irc.csproj b/frugal-irc/frugal-irc.csproj
new file mode 100644
index 0000000..e6f279d
--- /dev/null
+++ b/frugal-irc/frugal-irc.csproj
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003";>
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{4E7A55B1-C72A-480A-90CA-6EAF97259A63}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>frugalirc</RootNamespace>
+    <AssemblyName>frugal-irc</AssemblyName>
+    <ReleaseVersion>0.1.6</ReleaseVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="Mono.Posix" />
+    <Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
+    <Reference Include="Meebey.SmartIrc4net, Version=0.4.5.0, Culture=neutral, 
PublicKeyToken=7868485fbf407e0f">
+      <Package>smartirc4net</Package>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="gtk-gui\gui.stetic">
+      <LogicalName>gui.stetic</LogicalName>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="gtk-gui\generated.cs" />
+    <Compile Include="MainWindow.cs" />
+    <Compile Include="gtk-gui\MainWindow.cs" />
+    <Compile Include="Main.cs" />
+    <Compile Include="AssemblyInfo.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ProjectExtensions>
+    <MonoDevelop>
+      <Properties InternalTargetFrameworkVersion="3.5" />
+    </MonoDevelop>
+  </ProjectExtensions>
+</Project>
\ No newline at end of file
diff --git a/frugal-irc/gtk-gui/MainWindow.cs b/frugal-irc/gtk-gui/MainWindow.cs
new file mode 100644
index 0000000..79d177c
--- /dev/null
+++ b/frugal-irc/gtk-gui/MainWindow.cs
@@ -0,0 +1,195 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+
+public partial class MainWindow
+{
+       private global::Gtk.HBox hbox1;
+
+       private global::Gtk.VBox vbox2;
+
+       private global::Gtk.VBox vbox3;
+
+       private global::Gtk.Entry SAI_Serveur;
+
+       private global::Gtk.Entry SAI_Chan;
+
+       private global::Gtk.HBox hbox3;
+
+       private global::Gtk.Entry SAI_Port;
+
+       private global::Gtk.Entry SAI_User;
+
+       private global::Gtk.Button BTN_Connect;
+
+       private global::Gtk.ScrolledWindow GtkScrolledWindow1;
+
+       private global::Gtk.TextView TXT_Messages;
+
+       private global::Gtk.HBox hbox2;
+
+       private global::Gtk.Entry SAI_Envoi;
+
+       private global::Gtk.Button BTN_Send;
+
+       private global::Gtk.ScrolledWindow GtkScrolledWindow;
+
+       private global::Gtk.TreeView TREE_Users;
+
+       protected virtual void Build ()
+       {
+               global::Stetic.Gui.Initialize (this);
+               // Widget MainWindow
+               this.Name = "MainWindow";
+               this.Title = global::Mono.Unix.Catalog.GetString ("FrugalIRC");
+               this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+               // Container child MainWindow.Gtk.Container+ContainerChild
+               this.hbox1 = new global::Gtk.HBox ();
+               this.hbox1.Name = "hbox1";
+               this.hbox1.Spacing = 6;
+               // Container child hbox1.Gtk.Box+BoxChild
+               this.vbox2 = new global::Gtk.VBox ();
+               this.vbox2.Name = "vbox2";
+               this.vbox2.Spacing = 6;
+               // Container child vbox2.Gtk.Box+BoxChild
+               this.vbox3 = new global::Gtk.VBox ();
+               this.vbox3.Name = "vbox3";
+               this.vbox3.Spacing = 6;
+               // Container child vbox3.Gtk.Box+BoxChild
+               this.SAI_Serveur = new global::Gtk.Entry ();
+               this.SAI_Serveur.CanFocus = true;
+               this.SAI_Serveur.Name = "SAI_Serveur";
+               this.SAI_Serveur.Text = global::Mono.Unix.Catalog.GetString 
("irc.freenode.net");
+               this.SAI_Serveur.IsEditable = false;
+               this.SAI_Serveur.InvisibleChar = '•';
+               this.vbox3.Add (this.SAI_Serveur);
+               global::Gtk.Box.BoxChild w1 = 
((global::Gtk.Box.BoxChild)(this.vbox3[this.SAI_Serveur]));
+               w1.Position = 0;
+               w1.Expand = false;
+               w1.Fill = false;
+               // Container child vbox3.Gtk.Box+BoxChild
+               this.SAI_Chan = new global::Gtk.Entry ();
+               this.SAI_Chan.CanFocus = true;
+               this.SAI_Chan.Name = "SAI_Chan";
+               this.SAI_Chan.Text = global::Mono.Unix.Catalog.GetString 
("#test");
+               this.SAI_Chan.IsEditable = false;
+               this.SAI_Chan.InvisibleChar = '•';
+               this.vbox3.Add (this.SAI_Chan);
+               global::Gtk.Box.BoxChild w2 = 
((global::Gtk.Box.BoxChild)(this.vbox3[this.SAI_Chan]));
+               w2.Position = 1;
+               w2.Expand = false;
+               w2.Fill = false;
+               // Container child vbox3.Gtk.Box+BoxChild
+               this.hbox3 = new global::Gtk.HBox ();
+               this.hbox3.Name = "hbox3";
+               this.hbox3.Spacing = 6;
+               // Container child hbox3.Gtk.Box+BoxChild
+               this.SAI_Port = new global::Gtk.Entry ();
+               this.SAI_Port.CanFocus = true;
+               this.SAI_Port.Name = "SAI_Port";
+               this.SAI_Port.Text = global::Mono.Unix.Catalog.GetString 
("6667");
+               this.SAI_Port.IsEditable = false;
+               this.SAI_Port.MaxLength = 4;
+               this.SAI_Port.InvisibleChar = '•';
+               this.hbox3.Add (this.SAI_Port);
+               global::Gtk.Box.BoxChild w3 = 
((global::Gtk.Box.BoxChild)(this.hbox3[this.SAI_Port]));
+               w3.Position = 0;
+               w3.Expand = false;
+               // Container child hbox3.Gtk.Box+BoxChild
+               this.SAI_User = new global::Gtk.Entry ();
+               this.SAI_User.CanFocus = true;
+               this.SAI_User.Name = "SAI_User";
+               this.SAI_User.Text = global::Mono.Unix.Catalog.GetString 
("FrugalUser");
+               this.SAI_User.IsEditable = false;
+               this.SAI_User.InvisibleChar = '•';
+               this.hbox3.Add (this.SAI_User);
+               global::Gtk.Box.BoxChild w4 = 
((global::Gtk.Box.BoxChild)(this.hbox3[this.SAI_User]));
+               w4.Position = 1;
+               // Container child hbox3.Gtk.Box+BoxChild
+               this.BTN_Connect = new global::Gtk.Button ();
+               this.BTN_Connect.CanFocus = true;
+               this.BTN_Connect.Name = "BTN_Connect";
+               this.BTN_Connect.UseUnderline = true;
+               this.BTN_Connect.Label = global::Mono.Unix.Catalog.GetString 
("Connect");
+               this.hbox3.Add (this.BTN_Connect);
+               global::Gtk.Box.BoxChild w5 = 
((global::Gtk.Box.BoxChild)(this.hbox3[this.BTN_Connect]));
+               w5.Position = 2;
+               w5.Expand = false;
+               w5.Fill = false;
+               this.vbox3.Add (this.hbox3);
+               global::Gtk.Box.BoxChild w6 = 
((global::Gtk.Box.BoxChild)(this.vbox3[this.hbox3]));
+               w6.Position = 2;
+               w6.Expand = false;
+               w6.Fill = false;
+               this.vbox2.Add (this.vbox3);
+               global::Gtk.Box.BoxChild w7 = 
((global::Gtk.Box.BoxChild)(this.vbox2[this.vbox3]));
+               w7.Position = 0;
+               w7.Expand = false;
+               w7.Fill = false;
+               // Container child vbox2.Gtk.Box+BoxChild
+               this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
+               this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
+               this.GtkScrolledWindow1.ShadowType = 
((global::Gtk.ShadowType)(1));
+               // Container child 
GtkScrolledWindow1.Gtk.Container+ContainerChild
+               this.TXT_Messages = new global::Gtk.TextView ();
+               this.TXT_Messages.CanFocus = true;
+               this.TXT_Messages.Name = "TXT_Messages";
+               this.GtkScrolledWindow1.Add (this.TXT_Messages);
+               this.vbox2.Add (this.GtkScrolledWindow1);
+               global::Gtk.Box.BoxChild w9 = 
((global::Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow1]));
+               w9.Position = 1;
+               // Container child vbox2.Gtk.Box+BoxChild
+               this.hbox2 = new global::Gtk.HBox ();
+               this.hbox2.Name = "hbox2";
+               this.hbox2.Spacing = 6;
+               // Container child hbox2.Gtk.Box+BoxChild
+               this.SAI_Envoi = new global::Gtk.Entry ();
+               this.SAI_Envoi.CanFocus = true;
+               this.SAI_Envoi.Name = "SAI_Envoi";
+               this.SAI_Envoi.IsEditable = true;
+               this.SAI_Envoi.InvisibleChar = '•';
+               this.hbox2.Add (this.SAI_Envoi);
+               global::Gtk.Box.BoxChild w10 = 
((global::Gtk.Box.BoxChild)(this.hbox2[this.SAI_Envoi]));
+               w10.Position = 0;
+               // Container child hbox2.Gtk.Box+BoxChild
+               this.BTN_Send = new global::Gtk.Button ();
+               this.BTN_Send.CanFocus = true;
+               this.BTN_Send.Name = "BTN_Send";
+               this.BTN_Send.UseUnderline = true;
+               this.BTN_Send.Label = global::Mono.Unix.Catalog.GetString 
("Send");
+               this.hbox2.Add (this.BTN_Send);
+               global::Gtk.Box.BoxChild w11 = 
((global::Gtk.Box.BoxChild)(this.hbox2[this.BTN_Send]));
+               w11.Position = 1;
+               w11.Expand = false;
+               w11.Fill = false;
+               this.vbox2.Add (this.hbox2);
+               global::Gtk.Box.BoxChild w12 = 
((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox2]));
+               w12.Position = 2;
+               w12.Expand = false;
+               w12.Fill = false;
+               this.hbox1.Add (this.vbox2);
+               global::Gtk.Box.BoxChild w13 = 
((global::Gtk.Box.BoxChild)(this.hbox1[this.vbox2]));
+               w13.Position = 0;
+               // Container child hbox1.Gtk.Box+BoxChild
+               this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
+               this.GtkScrolledWindow.Name = "GtkScrolledWindow";
+               this.GtkScrolledWindow.ShadowType = 
((global::Gtk.ShadowType)(1));
+               // Container child 
GtkScrolledWindow.Gtk.Container+ContainerChild
+               this.TREE_Users = new global::Gtk.TreeView ();
+               this.TREE_Users.CanFocus = true;
+               this.TREE_Users.Name = "TREE_Users";
+               this.GtkScrolledWindow.Add (this.TREE_Users);
+               this.hbox1.Add (this.GtkScrolledWindow);
+               global::Gtk.Box.BoxChild w15 = 
((global::Gtk.Box.BoxChild)(this.hbox1[this.GtkScrolledWindow]));
+               w15.Position = 1;
+               this.Add (this.hbox1);
+               if ((this.Child != null)) {
+                       this.Child.ShowAll ();
+               }
+               this.DefaultWidth = 478;
+               this.DefaultHeight = 300;
+               this.Show ();
+               this.DeleteEvent += new global::Gtk.DeleteEventHandler 
(this.OnDeleteEvent);
+               this.BTN_Connect.Clicked += new global::System.EventHandler 
(this.OnBTNConnectClicked);
+               this.BTN_Send.Clicked += new global::System.EventHandler 
(this.OnBTNSendClicked);
+       }
+}
diff --git a/frugal-irc/gtk-gui/generated.cs b/frugal-irc/gtk-gui/generated.cs
new file mode 100644
index 0000000..8463caa
--- /dev/null
+++ b/frugal-irc/gtk-gui/generated.cs
@@ -0,0 +1,29 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace Stetic
+{
+       internal class Gui
+       {
+               private static bool initialized;
+
+               static internal void Initialize (Gtk.Widget iconRenderer)
+               {
+                       if ((Stetic.Gui.initialized == false)) {
+                               Stetic.Gui.initialized = true;
+                       }
+               }
+       }
+
+       internal class ActionGroups
+       {
+               public static Gtk.ActionGroup GetActionGroup (System.Type type)
+               {
+                       return Stetic.ActionGroups.GetActionGroup 
(type.FullName);
+               }
+
+               public static Gtk.ActionGroup GetActionGroup (string name)
+               {
+                       return null;
+               }
+       }
+}
diff --git a/frugal-irc/gtk-gui/gui.stetic b/frugal-irc/gtk-gui/gui.stetic
new file mode 100644
index 0000000..2d8a012
--- /dev/null
+++ b/frugal-irc/gtk-gui/gui.stetic
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+  <configuration>
+    <images-root-path>..</images-root-path>
+    <target-gtk-version>2.12</target-gtk-version>
+  </configuration>
+  <import>
+    <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, 
PublicKeyToken=35e10195dab3c99f" />
+    <widget-library name="../bin/Debug/frugal-irc.exe" internal="true" />
+  </import>
+  <widget class="Gtk.Window" id="MainWindow" design-size="478 300">
+    <property name="MemberName" />
+    <property name="Title" translatable="yes">FrugalIRC</property>
+    <property name="WindowPosition">CenterOnParent</property>
+    <signal name="DeleteEvent" handler="OnDeleteEvent" />
+    <child>
+      <widget class="Gtk.HBox" id="hbox1">
+        <property name="MemberName" />
+        <property name="Spacing">6</property>
+        <child>
+          <widget class="Gtk.VBox" id="vbox2">
+            <property name="MemberName" />
+            <property name="Spacing">6</property>
+            <child>
+              <widget class="Gtk.VBox" id="vbox3">
+                <property name="MemberName" />
+                <property name="Spacing">6</property>
+                <child>
+                  <widget class="Gtk.Entry" id="SAI_Serveur">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="Text" 
translatable="yes">irc.freenode.net</property>
+                    <property name="IsEditable">False</property>
+                    <property name="InvisibleChar">•</property>
+                  </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>
+                  <widget class="Gtk.Entry" id="SAI_Chan">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="Text" translatable="yes">#test</property>
+                    <property name="IsEditable">False</property>
+                    <property name="InvisibleChar">•</property>
+                  </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>
+                  <widget class="Gtk.HBox" id="hbox3">
+                    <property name="MemberName" />
+                    <property name="Spacing">6</property>
+                    <child>
+                      <widget class="Gtk.Entry" id="SAI_Port">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="Text" 
translatable="yes">6667</property>
+                        <property name="IsEditable">False</property>
+                        <property name="MaxLength">4</property>
+                        <property name="InvisibleChar">•</property>
+                      </widget>
+                      <packing>
+                        <property name="Position">0</property>
+                        <property name="AutoSize">False</property>
+                        <property name="Expand">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="Gtk.Entry" id="SAI_User">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="Text" 
translatable="yes">FrugalUser</property>
+                        <property name="IsEditable">False</property>
+                        <property name="InvisibleChar">•</property>
+                      </widget>
+                      <packing>
+                        <property name="Position">1</property>
+                        <property name="AutoSize">True</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="Gtk.Button" id="BTN_Connect">
+                        <property name="MemberName" />
+                        <property name="CanFocus">True</property>
+                        <property name="Type">TextOnly</property>
+                        <property name="Label" 
translatable="yes">Connect</property>
+                        <property name="UseUnderline">True</property>
+                        <signal name="Clicked" handler="OnBTNConnectClicked" />
+                      </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="AutoSize">True</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+              </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>
+              <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
+                <property name="MemberName" />
+                <property name="ShadowType">In</property>
+                <child>
+                  <widget class="Gtk.TextView" id="TXT_Messages">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="ShowScrollbars">True</property>
+                    <property name="Text" translatable="yes" />
+                  </widget>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">1</property>
+                <property name="AutoSize">True</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.HBox" id="hbox2">
+                <property name="MemberName" />
+                <property name="Spacing">6</property>
+                <child>
+                  <widget class="Gtk.Entry" id="SAI_Envoi">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="IsEditable">True</property>
+                    <property name="InvisibleChar">•</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.Button" id="BTN_Send">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="Type">TextOnly</property>
+                    <property name="Label" translatable="yes">Send</property>
+                    <property name="UseUnderline">True</property>
+                    <signal name="Clicked" handler="OnBTNSendClicked" />
+                  </widget>
+                  <packing>
+                    <property name="Position">1</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="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">0</property>
+            <property name="AutoSize">True</property>
+          </packing>
+        </child>
+        <child>
+          <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
+            <property name="MemberName" />
+            <property name="ShadowType">In</property>
+            <child>
+              <widget class="Gtk.TreeView" id="TREE_Users">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="ShowScrollbars">True</property>
+              </widget>
+            </child>
+          </widget>
+          <packing>
+            <property name="Position">1</property>
+            <property name="AutoSize">True</property>
+          </packing>
+        </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

Reply via email to