mirror of https://github.com/deavminet/gustav.git
Some more stuff
This commit is contained in:
parent
5d76b434cb
commit
3bfe967e68
|
@ -99,8 +99,6 @@ public final class Connection : Thread
|
|||
if(notificationType == 0)
|
||||
{
|
||||
/* TODO: Decode using tristanable */
|
||||
|
||||
|
||||
writeln("new message");
|
||||
}
|
||||
/* Channel notification (ntype=1) */
|
||||
|
@ -191,6 +189,10 @@ public final class Connection : Thread
|
|||
users.add(new Label(member));
|
||||
users.showAll();
|
||||
}
|
||||
|
||||
/* Clear the text area */
|
||||
textArea.removeAll();
|
||||
textArea.showAll();
|
||||
}
|
||||
|
||||
|
||||
|
@ -231,7 +233,7 @@ public final class Connection : Thread
|
|||
userBox.add(new Label("Users"));
|
||||
userBox.add(users);
|
||||
|
||||
|
||||
/* The text box */
|
||||
textArea = new ListBox();
|
||||
|
||||
|
||||
|
@ -239,7 +241,7 @@ public final class Connection : Thread
|
|||
box.add(textArea);
|
||||
box.packEnd(userBox,0,0,0);
|
||||
|
||||
|
||||
box.setChildPacking(textArea, true, true, 0, GtkPackType.START);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ public class GUI : Thread
|
|||
/* Connect option */
|
||||
MenuItem connectItem = new MenuItem();
|
||||
connectItem.setLabel("Connect");
|
||||
connectItem.addOnActivate(&exitButton);
|
||||
connectItem.addOnActivate(&connectButton);
|
||||
gustavMenu.add(connectItem);
|
||||
|
||||
/* Exit option */
|
||||
|
@ -165,6 +165,11 @@ public class GUI : Thread
|
|||
// tl();
|
||||
}
|
||||
|
||||
private void connectButton(MenuItem)
|
||||
{
|
||||
connections ~= new Connection(this, parseAddress("0.0.0.0", 7777), ["testGustav1", "bruh"]);
|
||||
}
|
||||
|
||||
private void shutdownConnections()
|
||||
{
|
||||
foreach(Connection connection; connections)
|
||||
|
|
Loading…
Reference in New Issue