diff --git a/source/Connection.d b/source/Connection.d index db831d6..85a9b45 100644 --- a/source/Connection.d +++ b/source/Connection.d @@ -10,7 +10,7 @@ import std.socket; import gtk.ListBox; import gtk.Label; -import Channel; +import areas.Channel; import std.string; 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]; gprintln("NormalMessage: (Channel): "~channel); - + findChannel(channel).receiveMessage(username, cast(string)data[2+usernameLength+1+channelLength..data.length]); } /* Channel notification (ntype=1) */ diff --git a/source/Channel.d b/source/areas/Channel.d similarity index 99% rename from source/Channel.d rename to source/areas/Channel.d index 3b257fe..f605317 100644 --- a/source/Channel.d +++ b/source/areas/Channel.d @@ -7,6 +7,8 @@ * along with the input box state */ +module areas.Channel; + import gtk.Box; import gtk.ListBox; import gtk.Label; @@ -27,8 +29,9 @@ import pango.PgAttribute; import Connection; import gogga; +import areas.MessageArea; -public final class Channel +public final class Channel : MessageArea { private DClient client; private Connection connection; diff --git a/source/MessageArea.d b/source/areas/MessageArea.d similarity index 91% rename from source/MessageArea.d rename to source/areas/MessageArea.d index bbaede8..710525d 100644 --- a/source/MessageArea.d +++ b/source/areas/MessageArea.d @@ -7,6 +7,8 @@ * The sub-classes are "Direct Message" and "Channel" */ +module areas.MessageArea; + public class MessageArea { /* TODO: Implement me */ diff --git a/source/gui.d b/source/gui.d index a375ed9..56d9a24 100644 --- a/source/gui.d +++ b/source/gui.d @@ -21,7 +21,7 @@ import gtk.SearchEntry; import gtk.Image; import Connection; -import Channel; +import areas.Channel; import std.socket; import std.conv;