mirror of https://github.com/deavminet/gustav.git
Pass in Connection instead
This commit is contained in:
parent
32deadfc83
commit
185e5efd5f
|
@ -23,10 +23,12 @@ import gtk.Entry;
|
|||
|
||||
import pango.PgAttributeList;
|
||||
import pango.PgAttribute;
|
||||
import Connection;
|
||||
|
||||
public final class Channel
|
||||
{
|
||||
private DClient client;
|
||||
private Connection connection;
|
||||
|
||||
/**
|
||||
* Channel details
|
||||
|
@ -52,9 +54,10 @@ public final class Channel
|
|||
/* TODO: No mutexes should be needed (same precaution) as the GTK lock provides safety */
|
||||
private string[] usersString;
|
||||
|
||||
this(DClient client, string channelName)
|
||||
this(Connection connection, string channelName)
|
||||
{
|
||||
this.client = client;
|
||||
this.client = connection.getClient();
|
||||
this.connection = connection;
|
||||
this.channelName = channelName;
|
||||
|
||||
initializeBox();
|
||||
|
@ -259,6 +262,10 @@ public final class Channel
|
|||
Label bruh = getUserLabel(member);
|
||||
users.add(bruh);
|
||||
usersString~=member;
|
||||
|
||||
|
||||
/* TODO: Testing code, remove */
|
||||
// UserNode testNode = new UserNode(connectio)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -260,7 +260,7 @@ public final class Connection : Thread
|
|||
client.join(channelName);
|
||||
|
||||
/* Create the Channel object */
|
||||
Channel newChannel = new Channel(client, channelName);
|
||||
Channel newChannel = new Channel(this, channelName);
|
||||
|
||||
/* Add the channel */
|
||||
addChannel(newChannel);
|
||||
|
|
Loading…
Reference in New Issue