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

commit fc2a5a0879a766d292e8f78dd184377a2cbb99e6
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Fri Sep 10 10:42:52 2010 +0000

*fixes crash on slowy desktop

diff --git a/frugal-irc/MainWindow.cs b/frugal-irc/MainWindow.cs
index b609511..b243178 100644
--- a/frugal-irc/MainWindow.cs
+++ b/frugal-irc/MainWindow.cs
@@ -29,7 +29,7 @@ public partial class MainWindow : Gtk.Window
public static IrcClient irc = new IrcClient();
private Thread T;
ListStore UpdateListUsers = new Gtk.ListStore (typeof (string));
-
+       private bool _initOk = false ;
private int MyRandom()
{
Random rndNumbers = new Random();
@@ -172,6 +172,7 @@ public partial class MainWindow : Gtk.Window
// this method will get all IRC messages
public  void OnRawMessage(object sender, IrcEventArgs e)
{
+               if(!_initOk) return ;
//AppendText("Received: "+e.Data.RawMessage);
switch(e.Data.Type)
{
@@ -280,9 +281,12 @@ public partial class MainWindow : Gtk.Window
// testing the delay and flood protection (messagebuffer work)
irc.SendMessage(SendType.Message, channel, "Hello");
//ask list users
+                       _initOk=true;
irc.RfcList(channel);
+                       Gtk.Application.Invoke (delegate {
+                               BTN_Send.Visible=true;
+                       });

-                       BTN_Send.Visible=true;
// 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
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to