Merge lp:~julien-spautz/cable/irc-commands into lp:cable
- irc-commands
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 122 | ||||
Proposed branch: | lp:~julien-spautz/cable/irc-commands | ||||
Merge into: | lp:cable | ||||
Diff against target: |
456 lines (+288/-6) (has conflicts) 12 files modified
src/Controller/Channel.vala (+105/-5) src/Controller/Server.vala (+19/-0) src/Controller/Window.vala (+19/-0) src/Irc/Channel.vala (+6/-0) src/Settings/Preferences.vala (+19/-0) src/Settings/SavedState.vala (+22/-0) src/Tests/Tests.vala (+19/-0) src/Tests/Utils.vala (+19/-0) src/View/Channel.vala (+19/-0) src/View/Server.vala (+19/-0) src/View/Window.vala (+19/-0) src/Widgets/ChatDisplay.vala (+3/-1) Text conflict in src/Settings/SavedState.vala |
||||
To merge this branch: | bzr merge lp:~julien-spautz/cable/irc-commands | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Eduard Gotwig (community) | Needs Fixing | ||
Review via email: mp+180624@code.launchpad.net |
Commit message
Description of the change
Started implementing irc commands. Also added support for actions (/me or /action) because they where not displayed previously. Also added missing copyright headers.
I only implemented a few commands so far, which should I add next?
Eduard Gotwig (gotwig) wrote : | # |
Julien Spautz (julien-spautz) wrote : | # |
It does forward all unknown commands.
Some commands, like /me, do not exits in the IRC protocol, so you can't just forward them, if that's what you mean.
Eduard Gotwig (gotwig) wrote : | # |
Ok, I think "/describe" is not there.
Also I found here a nice list: http://
Also, for autocompletition, it should first check if the entry is free, does not contain any charachters, and only than add ":" to the username. Else it should just autocomplete the username, without :.
Example: if you type /describe ma<TAB> the result is
/describe max: instead of /describe max, so the user has to remove the ":" manually.
This also happens when you want to refer to a user, in the chat.
example: Hello ma<TAB>
results in Hello max: .
This is not what we want, instead we want "Hello max".
Thanks for your work Julien, it seems to work for me.
Marcus Lundgren (marcus-lundgren) wrote : | # |
A list of the available IRC commands that might be of help: http://
At a glance, you seem to be missing /quit.
- 114. By Julien Spautz
-
a few more commands
Preview Diff
1 | === modified file 'src/Controller/Channel.vala' | |||
2 | --- src/Controller/Channel.vala 2013-08-08 00:37:02 +0000 | |||
3 | +++ src/Controller/Channel.vala 2013-08-24 21:40:34 +0000 | |||
4 | @@ -1,13 +1,33 @@ | |||
5 | 1 | /*** | ||
6 | 2 | Copyright (C) 2013 Cable Developers | ||
7 | 3 | |||
8 | 4 | This program or library is free software; you can redistribute it | ||
9 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
10 | 6 | License as published by the Free Software Foundation; either | ||
11 | 7 | version 3 of the License, or (at your option) any later version. | ||
12 | 8 | |||
13 | 9 | This library is distributed in the hope that it will be useful, | ||
14 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
16 | 12 | Lesser General Public License for more details. | ||
17 | 13 | |||
18 | 14 | You should have received a copy of the GNU Lesser General | ||
19 | 15 | Public License along with this library; if not, write to the | ||
20 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
21 | 17 | Boston, MA 02110-1301 USA. | ||
22 | 18 | ***/ | ||
23 | 19 | |||
24 | 1 | internal class Cable.Controller.Channel : GLib.Object { | 20 | internal class Cable.Controller.Channel : GLib.Object { |
25 | 2 | 21 | ||
26 | 3 | internal weak Server server; | 22 | internal weak Server server; |
27 | 4 | internal View.Channel view; | 23 | internal View.Channel view; |
28 | 5 | internal Irc.Channel backend; | 24 | internal Irc.Channel backend; |
30 | 6 | 25 | ||
31 | 7 | internal string name; //TODO id | 26 | internal string name; //TODO id |
32 | 8 | 27 | ||
33 | 9 | internal Channel (Server server, string name) { | 28 | internal Channel (Server server, string name) { |
35 | 10 | debug (@"+ CONTROLLER CHANNEL $name"); | 29 | debug (@"+ CONTROLLER CHANNEL $name"); |
36 | 30 | |||
37 | 11 | this.server = server; | 31 | this.server = server; |
38 | 12 | this.name = name; | 32 | this.name = name; |
39 | 13 | 33 | ||
40 | @@ -51,8 +71,8 @@ | |||
41 | 51 | } | 71 | } |
42 | 52 | } | 72 | } |
43 | 53 | 73 | ||
44 | 74 | // GUI signals | ||
45 | 54 | void connect_frontend_signals () { | 75 | void connect_frontend_signals () { |
46 | 55 | |||
47 | 56 | view.part.connect (() => { | 76 | view.part.connect (() => { |
48 | 57 | backend.send_part (); | 77 | backend.send_part (); |
49 | 58 | }); | 78 | }); |
50 | @@ -69,7 +89,7 @@ | |||
51 | 69 | 89 | ||
52 | 70 | view.send_message.connect ((message) => { | 90 | view.send_message.connect ((message) => { |
53 | 71 | if (message.has_prefix ("/")) | 91 | if (message.has_prefix ("/")) |
55 | 72 | server.backend.send_raw (message.replace ("/", "")); | 92 | send_command (message.replace ("/", "")); |
56 | 73 | else | 93 | else |
57 | 74 | server.backend.send_message (name, message); | 94 | server.backend.send_message (name, message); |
58 | 75 | 95 | ||
59 | @@ -84,6 +104,7 @@ | |||
60 | 84 | 104 | ||
61 | 85 | } | 105 | } |
62 | 86 | 106 | ||
63 | 107 | // IRC signals | ||
64 | 87 | void connect_backend_signals () { | 108 | void connect_backend_signals () { |
65 | 88 | backend.event_message.connect ((from, message) => { | 109 | backend.event_message.connect ((from, message) => { |
66 | 89 | if (server.window.view.current_channel != view) | 110 | if (server.window.view.current_channel != view) |
67 | @@ -98,7 +119,7 @@ | |||
68 | 98 | if (server.backend.is_me (from)) { | 119 | if (server.backend.is_me (from)) { |
69 | 99 | view.nick = new_nick; | 120 | view.nick = new_nick; |
70 | 100 | } | 121 | } |
72 | 101 | 122 | ||
73 | 102 | assert (new_nick != null); | 123 | assert (new_nick != null); |
74 | 103 | 124 | ||
75 | 104 | var name = from.split ("!")[0]; | 125 | var name = from.split ("!")[0]; |
76 | @@ -165,6 +186,85 @@ | |||
77 | 165 | } | 186 | } |
78 | 166 | }); | 187 | }); |
79 | 167 | 188 | ||
80 | 189 | backend.event_action.connect ((from, message) => { | ||
81 | 190 | var nick = from.split ("!")[0]; | ||
82 | 191 | view.message ("", "* " + nick + " " + message, MessageType.ACTION); | ||
83 | 192 | }); | ||
84 | 193 | |||
85 | 168 | backend.event_names.connect (view.list_users); | 194 | backend.event_names.connect (view.list_users); |
86 | 169 | } | 195 | } |
87 | 196 | |||
88 | 197 | void send_command (string command) { | ||
89 | 198 | |||
90 | 199 | var args = command.split (" "); | ||
91 | 200 | |||
92 | 201 | switch (args[0]) { | ||
93 | 202 | case "join": | ||
94 | 203 | return_if_fail (args.length > 1); | ||
95 | 204 | var channel = new Channel (server, args[1]); | ||
96 | 205 | server.channels[args[1]] = channel; | ||
97 | 206 | server.window.view.current_channel = channel.view; | ||
98 | 207 | break; | ||
99 | 208 | |||
100 | 209 | case "part": | ||
101 | 210 | backend.send_part (); | ||
102 | 211 | break; | ||
103 | 212 | |||
104 | 213 | case "quit": | ||
105 | 214 | server.backend.send_quit (); | ||
106 | 215 | break; | ||
107 | 216 | |||
108 | 217 | case "nick": | ||
109 | 218 | return_if_fail (args.length > 1); | ||
110 | 219 | server.backend.send_nick (args[1]); | ||
111 | 220 | break; | ||
112 | 221 | |||
113 | 222 | case "topic": | ||
114 | 223 | return_if_fail (args.length > 1); | ||
115 | 224 | backend.send_topic (string.joinv (" ", args[1:-1])); | ||
116 | 225 | break; | ||
117 | 226 | |||
118 | 227 | case "me": | ||
119 | 228 | case "action": | ||
120 | 229 | return_if_fail (args.length > 1); | ||
121 | 230 | backend.send_action (string.joinv (" ", args[1:-1])); | ||
122 | 231 | break; | ||
123 | 232 | |||
124 | 233 | case "kick": | ||
125 | 234 | return_if_fail (args.length > 2); | ||
126 | 235 | backend.send_kick (args[1], string.joinv (" ", args[2:-1])); | ||
127 | 236 | break; | ||
128 | 237 | |||
129 | 238 | case "ignore": | ||
130 | 239 | return_if_fail (args.length > 1); | ||
131 | 240 | server.backend.send_ignore (string.joinv (" ", args[1:-1])); | ||
132 | 241 | break; | ||
133 | 242 | |||
134 | 243 | case "unignore": | ||
135 | 244 | return_if_fail (args.length > 1); | ||
136 | 245 | server.backend.send_unignore (string.joinv (" ", args[1:-1])); | ||
137 | 246 | break; | ||
138 | 247 | |||
139 | 248 | case "msg": | ||
140 | 249 | return_if_fail (args.length > 2); | ||
141 | 250 | server.backend.send_message (args[1], string.joinv (" ", args[2:-1])); | ||
142 | 251 | break; | ||
143 | 252 | |||
144 | 253 | case "notice": | ||
145 | 254 | return_if_fail (args.length > 2); | ||
146 | 255 | server.backend.send_notice (args[1], string.joinv (" ", args[2:-1])); | ||
147 | 256 | break; | ||
148 | 257 | |||
149 | 258 | case "away": | ||
150 | 259 | if (args.length < 2) | ||
151 | 260 | server.backend.send_back (); | ||
152 | 261 | else | ||
153 | 262 | server.backend.send_away (string.joinv (" ", args[1:-1])); | ||
154 | 263 | break; | ||
155 | 264 | |||
156 | 265 | default: | ||
157 | 266 | server.backend.send_raw (command); | ||
158 | 267 | break; | ||
159 | 268 | } | ||
160 | 269 | } | ||
161 | 170 | } | 270 | } |
162 | 171 | 271 | ||
163 | === modified file 'src/Controller/Server.vala' | |||
164 | --- src/Controller/Server.vala 2013-08-20 19:51:01 +0000 | |||
165 | +++ src/Controller/Server.vala 2013-08-24 21:40:34 +0000 | |||
166 | @@ -1,3 +1,22 @@ | |||
167 | 1 | /*** | ||
168 | 2 | Copyright (C) 2013 Cable Developers | ||
169 | 3 | |||
170 | 4 | This program or library is free software; you can redistribute it | ||
171 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
172 | 6 | License as published by the Free Software Foundation; either | ||
173 | 7 | version 3 of the License, or (at your option) any later version. | ||
174 | 8 | |||
175 | 9 | This library is distributed in the hope that it will be useful, | ||
176 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
177 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
178 | 12 | Lesser General Public License for more details. | ||
179 | 13 | |||
180 | 14 | You should have received a copy of the GNU Lesser General | ||
181 | 15 | Public License along with this library; if not, write to the | ||
182 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
183 | 17 | Boston, MA 02110-1301 USA. | ||
184 | 18 | ***/ | ||
185 | 19 | |||
186 | 1 | internal class Cable.Controller.Server : GLib.Object { | 20 | internal class Cable.Controller.Server : GLib.Object { |
187 | 2 | 21 | ||
188 | 3 | internal weak Window window; | 22 | internal weak Window window; |
189 | 4 | 23 | ||
190 | === modified file 'src/Controller/Window.vala' | |||
191 | --- src/Controller/Window.vala 2013-08-08 00:37:02 +0000 | |||
192 | +++ src/Controller/Window.vala 2013-08-24 21:40:34 +0000 | |||
193 | @@ -1,3 +1,22 @@ | |||
194 | 1 | /*** | ||
195 | 2 | Copyright (C) 2013 Cable Developers | ||
196 | 3 | |||
197 | 4 | This program or library is free software; you can redistribute it | ||
198 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
199 | 6 | License as published by the Free Software Foundation; either | ||
200 | 7 | version 3 of the License, or (at your option) any later version. | ||
201 | 8 | |||
202 | 9 | This library is distributed in the hope that it will be useful, | ||
203 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
204 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
205 | 12 | Lesser General Public License for more details. | ||
206 | 13 | |||
207 | 14 | You should have received a copy of the GNU Lesser General | ||
208 | 15 | Public License along with this library; if not, write to the | ||
209 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
210 | 17 | Boston, MA 02110-1301 USA. | ||
211 | 18 | ***/ | ||
212 | 19 | |||
213 | 1 | internal class Cable.Controller.Window : GLib.Object { | 20 | internal class Cable.Controller.Window : GLib.Object { |
214 | 2 | 21 | ||
215 | 3 | internal View.Window view { get; set; } | 22 | internal View.Window view { get; set; } |
216 | 4 | 23 | ||
217 | === modified file 'src/Irc/Channel.vala' | |||
218 | --- src/Irc/Channel.vala 2013-08-06 15:32:12 +0000 | |||
219 | +++ src/Irc/Channel.vala 2013-08-24 21:40:34 +0000 | |||
220 | @@ -66,6 +66,7 @@ | |||
221 | 66 | get { return name in server.channel_names; } | 66 | get { return name in server.channel_names; } |
222 | 67 | } | 67 | } |
223 | 68 | 68 | ||
224 | 69 | public signal void event_action (string from, string message); | ||
225 | 69 | public signal void event_banlist (string mask, string who, int64 when); // TODO wtf is this? | 70 | public signal void event_banlist (string mask, string who, int64 when); // TODO wtf is this? |
226 | 70 | 71 | ||
227 | 71 | /** | 72 | /** |
228 | @@ -264,6 +265,11 @@ | |||
229 | 264 | } | 265 | } |
230 | 265 | 266 | ||
231 | 266 | void setup_signals () { | 267 | void setup_signals () { |
232 | 268 | client.event_action.connect ((time, server, from, target, message) => { | ||
233 | 269 | if (server == this.server.name && name == target) | ||
234 | 270 | event_action (from, message); | ||
235 | 271 | }); | ||
236 | 272 | |||
237 | 267 | client.event_banlist.connect ((time, server, channel, mask, who, when) => { | 273 | client.event_banlist.connect ((time, server, channel, mask, who, when) => { |
238 | 268 | if (server == this.server.name && name == channel) | 274 | if (server == this.server.name && name == channel) |
239 | 269 | event_banlist (mask, who, when); | 275 | event_banlist (mask, who, when); |
240 | 270 | 276 | ||
241 | === modified file 'src/Settings/Preferences.vala' | |||
242 | --- src/Settings/Preferences.vala 2013-08-20 14:28:43 +0000 | |||
243 | +++ src/Settings/Preferences.vala 2013-08-24 21:40:34 +0000 | |||
244 | @@ -1,3 +1,22 @@ | |||
245 | 1 | /*** | ||
246 | 2 | Copyright (C) 2013 Cable Developers | ||
247 | 3 | |||
248 | 4 | This program or library is free software; you can redistribute it | ||
249 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
250 | 6 | License as published by the Free Software Foundation; either | ||
251 | 7 | version 3 of the License, or (at your option) any later version. | ||
252 | 8 | |||
253 | 9 | This library is distributed in the hope that it will be useful, | ||
254 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
255 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
256 | 12 | Lesser General Public License for more details. | ||
257 | 13 | |||
258 | 14 | You should have received a copy of the GNU Lesser General | ||
259 | 15 | Public License along with this library; if not, write to the | ||
260 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
261 | 17 | Boston, MA 02110-1301 USA. | ||
262 | 18 | ***/ | ||
263 | 19 | |||
264 | 1 | public class Cable.Settings.Preferences : Granite.Services.Settings { | 20 | public class Cable.Settings.Preferences : Granite.Services.Settings { |
265 | 2 | 21 | ||
266 | 3 | public string[] networks { get; set; } | 22 | public string[] networks { get; set; } |
267 | 4 | 23 | ||
268 | === modified file 'src/Settings/SavedState.vala' | |||
269 | --- src/Settings/SavedState.vala 2013-08-20 06:46:01 +0000 | |||
270 | +++ src/Settings/SavedState.vala 2013-08-24 21:40:34 +0000 | |||
271 | @@ -1,3 +1,4 @@ | |||
272 | 1 | <<<<<<< TREE | ||
273 | 1 | public class Cable.Settings.SavedState : Granite.Services.Settings { | 2 | public class Cable.Settings.SavedState : Granite.Services.Settings { |
274 | 2 | 3 | ||
275 | 3 | public int window_width { get; set; } | 4 | public int window_width { get; set; } |
276 | @@ -15,3 +16,24 @@ | |||
277 | 15 | MAXIMIZED | 16 | MAXIMIZED |
278 | 16 | } | 17 | } |
279 | 17 | } | 18 | } |
280 | 19 | ======= | ||
281 | 20 | /*** | ||
282 | 21 | Copyright (C) 2013 Cable Developers | ||
283 | 22 | |||
284 | 23 | This program or library is free software; you can redistribute it | ||
285 | 24 | and/or modify it under the terms of the GNU Lesser General Public | ||
286 | 25 | License as published by the Free Software Foundation; either | ||
287 | 26 | version 3 of the License, or (at your option) any later version. | ||
288 | 27 | |||
289 | 28 | This library is distributed in the hope that it will be useful, | ||
290 | 29 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
291 | 30 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
292 | 31 | Lesser General Public License for more details. | ||
293 | 32 | |||
294 | 33 | You should have received a copy of the GNU Lesser General | ||
295 | 34 | Public License along with this library; if not, write to the | ||
296 | 35 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
297 | 36 | Boston, MA 02110-1301 USA. | ||
298 | 37 | ***/ | ||
299 | 38 | |||
300 | 39 | // XXX>>>>>>> MERGE-SOURCE | ||
301 | 18 | 40 | ||
302 | === modified file 'src/Tests/Tests.vala' | |||
303 | --- src/Tests/Tests.vala 2013-08-11 12:01:05 +0000 | |||
304 | +++ src/Tests/Tests.vala 2013-08-24 21:40:34 +0000 | |||
305 | @@ -1,3 +1,22 @@ | |||
306 | 1 | /*** | ||
307 | 2 | Copyright (C) 2013 Cable Developers | ||
308 | 3 | |||
309 | 4 | This program or library is free software; you can redistribute it | ||
310 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
311 | 6 | License as published by the Free Software Foundation; either | ||
312 | 7 | version 3 of the License, or (at your option) any later version. | ||
313 | 8 | |||
314 | 9 | This library is distributed in the hope that it will be useful, | ||
315 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
316 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
317 | 12 | Lesser General Public License for more details. | ||
318 | 13 | |||
319 | 14 | You should have received a copy of the GNU Lesser General | ||
320 | 15 | Public License along with this library; if not, write to the | ||
321 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
322 | 17 | Boston, MA 02110-1301 USA. | ||
323 | 18 | ***/ | ||
324 | 19 | |||
325 | 1 | namespace Cable.Tests { | 20 | namespace Cable.Tests { |
326 | 2 | 21 | ||
327 | 3 | public int run (string[] args) { | 22 | public int run (string[] args) { |
328 | 4 | 23 | ||
329 | === modified file 'src/Tests/Utils.vala' | |||
330 | --- src/Tests/Utils.vala 2013-08-07 00:56:30 +0000 | |||
331 | +++ src/Tests/Utils.vala 2013-08-24 21:40:34 +0000 | |||
332 | @@ -1,3 +1,22 @@ | |||
333 | 1 | /*** | ||
334 | 2 | Copyright (C) 2013 Cable Developers | ||
335 | 3 | |||
336 | 4 | This program or library is free software; you can redistribute it | ||
337 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
338 | 6 | License as published by the Free Software Foundation; either | ||
339 | 7 | version 3 of the License, or (at your option) any later version. | ||
340 | 8 | |||
341 | 9 | This library is distributed in the hope that it will be useful, | ||
342 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
343 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
344 | 12 | Lesser General Public License for more details. | ||
345 | 13 | |||
346 | 14 | You should have received a copy of the GNU Lesser General | ||
347 | 15 | Public License along with this library; if not, write to the | ||
348 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
349 | 17 | Boston, MA 02110-1301 USA. | ||
350 | 18 | ***/ | ||
351 | 19 | |||
352 | 1 | using Cable.Utils; | 20 | using Cable.Utils; |
353 | 2 | 21 | ||
354 | 3 | namespace Cable.Tests.Utils { | 22 | namespace Cable.Tests.Utils { |
355 | 4 | 23 | ||
356 | === modified file 'src/View/Channel.vala' | |||
357 | --- src/View/Channel.vala 2013-08-12 22:09:44 +0000 | |||
358 | +++ src/View/Channel.vala 2013-08-24 21:40:34 +0000 | |||
359 | @@ -1,3 +1,22 @@ | |||
360 | 1 | /*** | ||
361 | 2 | Copyright (C) 2013 Cable Developers | ||
362 | 3 | |||
363 | 4 | This program or library is free software; you can redistribute it | ||
364 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
365 | 6 | License as published by the Free Software Foundation; either | ||
366 | 7 | version 3 of the License, or (at your option) any later version. | ||
367 | 8 | |||
368 | 9 | This library is distributed in the hope that it will be useful, | ||
369 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
370 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
371 | 12 | Lesser General Public License for more details. | ||
372 | 13 | |||
373 | 14 | You should have received a copy of the GNU Lesser General | ||
374 | 15 | Public License along with this library; if not, write to the | ||
375 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
376 | 17 | Boston, MA 02110-1301 USA. | ||
377 | 18 | ***/ | ||
378 | 19 | |||
379 | 1 | public interface Cable.View.Channel : GLib.Object { | 20 | public interface Cable.View.Channel : GLib.Object { |
380 | 2 | 21 | ||
381 | 3 | public abstract int unread_messages { get; set; } | 22 | public abstract int unread_messages { get; set; } |
382 | 4 | 23 | ||
383 | === modified file 'src/View/Server.vala' | |||
384 | --- src/View/Server.vala 2013-08-06 15:32:12 +0000 | |||
385 | +++ src/View/Server.vala 2013-08-24 21:40:34 +0000 | |||
386 | @@ -1,3 +1,22 @@ | |||
387 | 1 | /*** | ||
388 | 2 | Copyright (C) 2013 Cable Developers | ||
389 | 3 | |||
390 | 4 | This program or library is free software; you can redistribute it | ||
391 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
392 | 6 | License as published by the Free Software Foundation; either | ||
393 | 7 | version 3 of the License, or (at your option) any later version. | ||
394 | 8 | |||
395 | 9 | This library is distributed in the hope that it will be useful, | ||
396 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
397 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
398 | 12 | Lesser General Public License for more details. | ||
399 | 13 | |||
400 | 14 | You should have received a copy of the GNU Lesser General | ||
401 | 15 | Public License along with this library; if not, write to the | ||
402 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
403 | 17 | Boston, MA 02110-1301 USA. | ||
404 | 18 | ***/ | ||
405 | 19 | |||
406 | 1 | public interface Cable.View.Server : GLib.Object { | 20 | public interface Cable.View.Server : GLib.Object { |
407 | 2 | 21 | ||
408 | 3 | // TODO parent-tier reference (i.e. window tier) | 22 | // TODO parent-tier reference (i.e. window tier) |
409 | 4 | 23 | ||
410 | === modified file 'src/View/Window.vala' | |||
411 | --- src/View/Window.vala 2013-08-06 15:32:12 +0000 | |||
412 | +++ src/View/Window.vala 2013-08-24 21:40:34 +0000 | |||
413 | @@ -1,3 +1,22 @@ | |||
414 | 1 | /*** | ||
415 | 2 | Copyright (C) 2013 Cable Developers | ||
416 | 3 | |||
417 | 4 | This program or library is free software; you can redistribute it | ||
418 | 5 | and/or modify it under the terms of the GNU Lesser General Public | ||
419 | 6 | License as published by the Free Software Foundation; either | ||
420 | 7 | version 3 of the License, or (at your option) any later version. | ||
421 | 8 | |||
422 | 9 | This library is distributed in the hope that it will be useful, | ||
423 | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
424 | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
425 | 12 | Lesser General Public License for more details. | ||
426 | 13 | |||
427 | 14 | You should have received a copy of the GNU Lesser General | ||
428 | 15 | Public License along with this library; if not, write to the | ||
429 | 16 | Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
430 | 17 | Boston, MA 02110-1301 USA. | ||
431 | 18 | ***/ | ||
432 | 19 | |||
433 | 1 | public interface Cable.View.Window : GLib.Object { | 20 | public interface Cable.View.Window : GLib.Object { |
434 | 2 | 21 | ||
435 | 3 | public abstract bool welcome_shown { get; set; } | 22 | public abstract bool welcome_shown { get; set; } |
436 | 4 | 23 | ||
437 | === modified file 'src/Widgets/ChatDisplay.vala' | |||
438 | --- src/Widgets/ChatDisplay.vala 2013-08-06 15:32:12 +0000 | |||
439 | +++ src/Widgets/ChatDisplay.vala 2013-08-24 21:40:34 +0000 | |||
440 | @@ -24,13 +24,15 @@ | |||
441 | 24 | SUGGESTION, | 24 | SUGGESTION, |
442 | 25 | NICK, | 25 | NICK, |
443 | 26 | AWAY, | 26 | AWAY, |
445 | 27 | PING; | 27 | PING, |
446 | 28 | ACTION; | ||
447 | 28 | /* QUIT, KICK, BAN, MODE(?), ACTION | 29 | /* QUIT, KICK, BAN, MODE(?), ACTION |
448 | 29 | */ | 30 | */ |
449 | 30 | 31 | ||
450 | 31 | public string color () { | 32 | public string color () { |
451 | 32 | switch (this) { | 33 | switch (this) { |
452 | 33 | case NORMAL: | 34 | case NORMAL: |
453 | 35 | case ACTION: | ||
454 | 34 | return "#333"; | 36 | return "#333"; |
455 | 35 | case ENTER: | 37 | case ENTER: |
456 | 36 | return "#9a9"; | 38 | return "#9a9"; |
Why can't you forward all commands, which beginn with a "/"?