mirror of
https://github.com/deavminet/gustav.git
synced 2025-02-16 10:56:56 +00:00
Restructure and inherit
This commit is contained in:
parent
d4912089b1
commit
31611d6f94
@ -10,7 +10,7 @@ import std.socket;
|
|||||||
import gtk.ListBox;
|
import gtk.ListBox;
|
||||||
import gtk.Label;
|
import gtk.Label;
|
||||||
|
|
||||||
import Channel;
|
import areas.Channel;
|
||||||
import std.string;
|
import std.string;
|
||||||
|
|
||||||
import core.sync.mutex;
|
import core.sync.mutex;
|
||||||
@ -184,7 +184,7 @@ public final class Connection : Thread
|
|||||||
string channel = cast(string)data[2+usernameLength+1..2+usernameLength+1+channelLength];
|
string channel = cast(string)data[2+usernameLength+1..2+usernameLength+1+channelLength];
|
||||||
gprintln("NormalMessage: (Channel): "~channel);
|
gprintln("NormalMessage: (Channel): "~channel);
|
||||||
|
|
||||||
|
|
||||||
findChannel(channel).receiveMessage(username, cast(string)data[2+usernameLength+1+channelLength..data.length]);
|
findChannel(channel).receiveMessage(username, cast(string)data[2+usernameLength+1+channelLength..data.length]);
|
||||||
}
|
}
|
||||||
/* Channel notification (ntype=1) */
|
/* Channel notification (ntype=1) */
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
* along with the input box state
|
* along with the input box state
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
module areas.Channel;
|
||||||
|
|
||||||
import gtk.Box;
|
import gtk.Box;
|
||||||
import gtk.ListBox;
|
import gtk.ListBox;
|
||||||
import gtk.Label;
|
import gtk.Label;
|
||||||
@ -27,8 +29,9 @@ import pango.PgAttribute;
|
|||||||
import Connection;
|
import Connection;
|
||||||
|
|
||||||
import gogga;
|
import gogga;
|
||||||
|
import areas.MessageArea;
|
||||||
|
|
||||||
public final class Channel
|
public final class Channel : MessageArea
|
||||||
{
|
{
|
||||||
private DClient client;
|
private DClient client;
|
||||||
private Connection connection;
|
private Connection connection;
|
@ -7,6 +7,8 @@
|
|||||||
* The sub-classes are "Direct Message" and "Channel"
|
* The sub-classes are "Direct Message" and "Channel"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
module areas.MessageArea;
|
||||||
|
|
||||||
public class MessageArea
|
public class MessageArea
|
||||||
{
|
{
|
||||||
/* TODO: Implement me */
|
/* TODO: Implement me */
|
@ -21,7 +21,7 @@ import gtk.SearchEntry;
|
|||||||
import gtk.Image;
|
import gtk.Image;
|
||||||
|
|
||||||
import Connection;
|
import Connection;
|
||||||
import Channel;
|
import areas.Channel;
|
||||||
import std.socket;
|
import std.socket;
|
||||||
|
|
||||||
import std.conv;
|
import std.conv;
|
||||||
|
Loading…
Reference in New Issue
Block a user