Merge lp:~tintou/cable/cable into lp:cable

Proposed by Corentin Noël
Status: Rejected
Rejected by: Eduard Gotwig
Proposed branch: lp:~tintou/cable/cable
Merge into: lp:cable
Diff against target: 976 lines (+384/-167) (has conflicts)
8 files modified
CMakeLists.txt (+1/-0)
po/cable.pot (+171/-0)
po/fr.po (+54/-41)
src/Utils.vala (+32/-1)
src/Widgets/Room.vala (+5/-34)
src/Widgets/Server.vala (+10/-1)
src/Widgets/Toolbar.vala (+83/-0)
src/Window.vala (+28/-90)
Text conflict in po/cable.pot
Text conflict in po/fr.po
To merge this branch: bzr merge lp:~tintou/cable/cable
Reviewer Review Type Date Requested Status
Eduard Gotwig (community) Disapprove
Corentin Noël (community) Abstain
Review via email: mp+173063@code.launchpad.net

Description of the change

Changed to toolbar and added link support

To post a comment you must log in.
Revision history for this message
Eduard Gotwig (gotwig) wrote :

doesn't compile.

review: Needs Fixing
Revision history for this message
Eduard Gotwig (gotwig) wrote :

try to use bzr add to add the missing files.

What about a topic expander like in empathy, is this possible?

Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

According to xylon:

make[2]: *** No rule to make target `../src/Widgets/Toolbar.vala', needed by `src/Cable.c'. Stop.
make[1]: *** [CMakeFiles/cable.dir/all] Error 2
make: *** [all] Error 2

lp:~tintou/cable/cable updated
81. By Corentin Noël

Added missing file

Revision history for this message
Corentin Noël (tintou) wrote :

OOps indeed, added missing file

review: Needs Resubmitting
Revision history for this message
Corentin Noël (tintou) :
review: Abstain
Revision history for this message
982c80311320c1b (alexander-wilms) wrote :

Maybe a designer could give some input on the topic in the toolbar?

Revision history for this message
Eduard Gotwig (gotwig) wrote :

We are working on julien's new branch to get merged. It includes your code as well.

review: Disapprove

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2013-07-04 01:34:38 +0000
3+++ CMakeLists.txt 2013-07-04 22:40:32 +0000
4@@ -60,6 +60,7 @@
5 src/Widgets/ChatDisplay.vala
6 src/Widgets/ServerList.vala
7 src/Widgets/User.vala
8+ src/Widgets/Toolbar.vala
9 src/Widgets/Welcome.vala
10
11 src/Dialogs/JoinChannel.vala
12
13=== modified file 'po/cable.pot'
14--- po/cable.pot 2013-07-04 14:08:00 +0000
15+++ po/cable.pot 2013-07-04 22:40:32 +0000
16@@ -3,13 +3,21 @@
17 # This file is distributed under the same license as the PACKAGE package.
18 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
19 #
20+<<<<<<< TREE
21 #: /home/gotwig/cable/po/../src/Widgets/Server.vala:145
22+=======
23+#: /home/noelco/cable/po/../src/Widgets/Server.vala:153
24+>>>>>>> MERGE-SOURCE
25 #, fuzzy
26 msgid ""
27 msgstr ""
28 "Project-Id-Version: PACKAGE VERSION\n"
29 "Report-Msgid-Bugs-To: \n"
30+<<<<<<< TREE
31 "POT-Creation-Date: 2013-07-04 16:07+0200\n"
32+=======
33+"POT-Creation-Date: 2013-07-04 18:06+0200\n"
34+>>>>>>> MERGE-SOURCE
35 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
36 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
37 "Language-Team: LANGUAGE <LL@li.org>\n"
38@@ -18,21 +26,37 @@
39 "Content-Type: text/plain; charset=UTF-8\n"
40 "Content-Transfer-Encoding: 8bit\n"
41
42+<<<<<<< TREE
43 #: /home/gotwig/cable/po/../src/Window.vala:302
44 #: /home/gotwig/cable/po/../src/Window.vala:303
45+=======
46+#: /home/noelco/cable/po/../src/Window.vala:246
47+#: /home/noelco/cable/po/../src/Window.vala:247
48+>>>>>>> MERGE-SOURCE
49 msgid "Join Channel…"
50 msgstr ""
51
52+<<<<<<< TREE
53 #: /home/gotwig/cable/po/../src/Window.vala:305
54 #: /home/gotwig/cable/po/../src/Window.vala:306
55+=======
56+#: /home/noelco/cable/po/../src/Window.vala:249
57+#: /home/noelco/cable/po/../src/Window.vala:250
58+>>>>>>> MERGE-SOURCE
59 msgid "Leave current Channel"
60 msgstr ""
61
62+<<<<<<< TREE
63 #: /home/gotwig/cable/po/../src/Window.vala:308
64 #: /home/gotwig/cable/po/../src/Window.vala:309
65+=======
66+#: /home/noelco/cable/po/../src/Window.vala:252
67+#: /home/noelco/cable/po/../src/Window.vala:253
68+>>>>>>> MERGE-SOURCE
69 msgid "Edit current Identity…"
70 msgstr ""
71
72+<<<<<<< TREE
73 #: /home/gotwig/cable/po/../src/Window.vala:311
74 #: /home/gotwig/cable/po/../src/Window.vala:312
75 #: /home/gotwig/cable/po/../src/Dialogs/Preferences.vala:23
76@@ -45,6 +69,9 @@
77 msgstr ""
78
79 #: /home/gotwig/cable/po/../src/Cable.vala:48
80+=======
81+#: /home/noelco/cable/po/../src/Cable.vala:48
82+>>>>>>> MERGE-SOURCE
83 msgid "Development release, not all features implemented"
84 msgstr ""
85
86@@ -88,6 +115,7 @@
87 msgid "Select the new color for %s"
88 msgstr ""
89
90+<<<<<<< TREE
91 #: /home/gotwig/cable/po/../src/Widgets/Server.vala:134
92 #: /home/gotwig/cable/po/../src/Widgets/Server.vala:146
93 msgid "Mark Away"
94@@ -114,42 +142,142 @@
95 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:80
96 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:217
97 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:232
98+=======
99+#: /home/noelco/cable/po/../src/Widgets/Room.vala:79
100+#: /home/noelco/cable/po/../src/Widgets/Room.vala:188
101+#: /home/noelco/cable/po/../src/Widgets/Room.vala:203
102+>>>>>>> MERGE-SOURCE
103 msgid "Operators"
104 msgstr ""
105
106+<<<<<<< TREE
107 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:133
108 msgid "Loading Topic…"
109 msgstr ""
110
111 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:216
112 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:231
113+=======
114+#: /home/noelco/cable/po/../src/Widgets/Room.vala:187
115+#: /home/noelco/cable/po/../src/Widgets/Room.vala:202
116+>>>>>>> MERGE-SOURCE
117 msgid "Regular"
118 msgstr ""
119
120+<<<<<<< TREE
121 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:218
122 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:233
123+=======
124+#: /home/noelco/cable/po/../src/Widgets/Room.vala:189
125+#: /home/noelco/cable/po/../src/Widgets/Room.vala:204
126+>>>>>>> MERGE-SOURCE
127 msgid "Voiced"
128 msgstr ""
129
130+<<<<<<< TREE
131 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:289
132+=======
133+#: /home/noelco/cable/po/../src/Widgets/Room.vala:260
134+>>>>>>> MERGE-SOURCE
135 #, c-format
136 msgid "%s joined"
137 msgstr ""
138
139+<<<<<<< TREE
140 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:292
141+=======
142+#: /home/noelco/cable/po/../src/Widgets/Room.vala:263
143+>>>>>>> MERGE-SOURCE
144 #, c-format
145 msgid "%s left"
146 msgstr ""
147
148+<<<<<<< TREE
149 #: /home/gotwig/cable/po/../src/Widgets/Room.vala:295
150+=======
151+#: /home/noelco/cable/po/../src/Widgets/Room.vala:266
152+>>>>>>> MERGE-SOURCE
153 #, c-format
154 msgid "%s is away"
155 msgstr ""
156
157+<<<<<<< TREE
158 #: /home/gotwig/cable/po/../src/Dialogs/JoinChannel.vala:26
159+=======
160+#: /home/noelco/cable/po/../src/Widgets/Channel.vala:44
161+msgid "Leave Channel"
162+msgstr ""
163+
164+#: /home/noelco/cable/po/../src/Widgets/Server.vala:142
165+#: /home/noelco/cable/po/../src/Widgets/Server.vala:154
166+msgid "Mark Away"
167+msgstr ""
168+
169+#: /home/noelco/cable/po/../src/Widgets/Server.vala:143
170+msgid "Leave all channels"
171+msgstr ""
172+
173+#: /home/noelco/cable/po/../src/Widgets/Server.vala:150
174+#: /home/noelco/cable/po/../src/Services/Identity.vala:77
175+#, c-format
176+msgid "%s is away."
177+msgstr ""
178+
179+#: /home/noelco/cable/po/../src/Widgets/Server.vala:151
180+msgid "Mark Present"
181+msgstr ""
182+
183+#: /home/noelco/cable/po/../src/Widgets/Toolbar.vala:31
184+msgid "Search…"
185+msgstr ""
186+
187+#: /home/noelco/cable/po/../src/Widgets/Toolbar.vala:46
188+msgid "Preferences…"
189+msgstr ""
190+
191+#: /home/noelco/cable/po/../src/Widgets/Toolbar.vala:62
192+#: /home/noelco/cable/po/../src/Widgets/Toolbar.vala:74
193+msgid "<b>Topic:</b> "
194+msgstr ""
195+
196+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:44
197+msgid "johndoe"
198+msgstr ""
199+
200+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:47
201+msgid "John Doe"
202+msgstr ""
203+
204+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:49
205+msgid "Good night everyone !"
206+msgstr ""
207+
208+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:51
209+msgid "Nick Name:"
210+msgstr ""
211+
212+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:53
213+msgid "Real Name:"
214+msgstr ""
215+
216+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:55
217+msgid "Part Message:"
218+msgstr ""
219+
220+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:75
221+msgid "Add Identity"
222+msgstr ""
223+
224+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:76
225+msgid "Edit Identity"
226+msgstr ""
227+
228+#: /home/noelco/cable/po/../src/Dialogs/JoinChannel.vala:26
229+>>>>>>> MERGE-SOURCE
230 msgid "Join Channel"
231 msgstr ""
232
233+<<<<<<< TREE
234 #: /home/gotwig/cable/po/../src/Dialogs/ManageNetwork.vala:44
235 msgid "irc.network.net"
236 msgstr ""
237@@ -183,6 +311,13 @@
238 msgstr ""
239
240 #: /home/gotwig/cable/po/../src/Dialogs/Preferences.vala:30
241+=======
242+#: /home/noelco/cable/po/../src/Dialogs/Preferences.vala:23
243+msgid "Preferences"
244+msgstr ""
245+
246+#: /home/noelco/cable/po/../src/Dialogs/Preferences.vala:30
247+>>>>>>> MERGE-SOURCE
248 msgid "Networks"
249 msgstr ""
250
251@@ -223,6 +358,7 @@
252 msgid "Add"
253 msgstr ""
254
255+<<<<<<< TREE
256 #: /home/gotwig/cable/po/../src/Dialogs/ManageIdentity.vala:44
257 msgid "johndoe (Without spaces/special characters)"
258 msgstr ""
259@@ -256,6 +392,41 @@
260 msgstr ""
261
262 #: /home/gotwig/cable/po/../src/Services/Identity.vala:75
263+=======
264+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:44
265+msgid "irc.network.net"
266+msgstr ""
267+
268+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:47
269+msgid "Network IRC"
270+msgstr ""
271+
272+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:49
273+msgid "Optional"
274+msgstr ""
275+
276+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:53
277+msgid "Address:"
278+msgstr ""
279+
280+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:55
281+msgid "Name:"
282+msgstr ""
283+
284+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:57
285+msgid "Password:"
286+msgstr ""
287+
288+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:77
289+msgid "Add Network"
290+msgstr ""
291+
292+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:78
293+msgid "Change Network"
294+msgstr ""
295+
296+#: /home/noelco/cable/po/../src/Services/Identity.vala:75
297+>>>>>>> MERGE-SOURCE
298 msgid "Bye."
299 msgstr ""
300
301
302=== modified file 'po/fr.po'
303--- po/fr.po 2013-07-04 14:08:00 +0000
304+++ po/fr.po 2013-07-04 22:40:32 +0000
305@@ -8,8 +8,13 @@
306 msgstr ""
307 "Project-Id-Version: cable\n"
308 "Report-Msgid-Bugs-To: \n"
309+<<<<<<< TREE
310 "POT-Creation-Date: 2013-07-04 03:29+0200\n"
311 "PO-Revision-Date: 2013-07-02 17:03+0000\n"
312+=======
313+"POT-Creation-Date: 2013-07-04 18:06+0200\n"
314+"PO-Revision-Date: 2013-07-04 18:07+0100\n"
315+>>>>>>> MERGE-SOURCE
316 "Last-Translator: Corentin Noël <tintou@mailoo.org>\n"
317 "Language-Team: Spanish <es@li.org>\n"
318 "Language: es\n"
319@@ -19,32 +24,21 @@
320 "X-Launchpad-Export-Date: 2013-07-03 05:56+0000\n"
321 "X-Generator: Launchpad (build 16692)\n"
322
323-#: /home/noelco/cable/po/../src/Window.vala:302
324-#: /home/noelco/cable/po/../src/Window.vala:303
325+#: /home/noelco/cable/po/../src/Window.vala:246
326+#: /home/noelco/cable/po/../src/Window.vala:247
327 msgid "Join Channel…"
328 msgstr "Rejoindre le canal…"
329
330-#: /home/noelco/cable/po/../src/Window.vala:305
331-#: /home/noelco/cable/po/../src/Window.vala:306
332+#: /home/noelco/cable/po/../src/Window.vala:249
333+#: /home/noelco/cable/po/../src/Window.vala:250
334 msgid "Leave current Channel"
335 msgstr "Quitter le canal actuel"
336
337-#: /home/noelco/cable/po/../src/Window.vala:308
338-#: /home/noelco/cable/po/../src/Window.vala:309
339+#: /home/noelco/cable/po/../src/Window.vala:252
340+#: /home/noelco/cable/po/../src/Window.vala:253
341 msgid "Edit current Identity…"
342 msgstr "Modifier l'identité actuelle"
343
344-#: /home/noelco/cable/po/../src/Window.vala:311
345-#: /home/noelco/cable/po/../src/Window.vala:312
346-#: /home/noelco/cable/po/../src/Dialogs/Preferences.vala:23
347-msgid "Preferences"
348-msgstr "Préférences"
349-
350-#: /home/noelco/cable/po/../src/Window.vala:314
351-#: /home/noelco/cable/po/../src/Window.vala:315
352-msgid "About"
353-msgstr "À propos"
354-
355 #: /home/noelco/cable/po/../src/Cable.vala:48
356 msgid "Development release, not all features implemented"
357 msgstr "Version en développement, fonctions manquantes"
358@@ -89,37 +83,33 @@
359 msgid "Select the new color for %s"
360 msgstr "Sélectionner une nouvelle couleur pour %s"
361
362-#: /home/noelco/cable/po/../src/Widgets/Room.vala:80
363-#: /home/noelco/cable/po/../src/Widgets/Room.vala:217
364-#: /home/noelco/cable/po/../src/Widgets/Room.vala:232
365+#: /home/noelco/cable/po/../src/Widgets/Room.vala:79
366+#: /home/noelco/cable/po/../src/Widgets/Room.vala:188
367+#: /home/noelco/cable/po/../src/Widgets/Room.vala:203
368 msgid "Operators"
369 msgstr "Modérateurs"
370
371-#: /home/noelco/cable/po/../src/Widgets/Room.vala:133
372-msgid "Loading Topic…"
373-msgstr "Chargement du sujet…"
374-
375-#: /home/noelco/cable/po/../src/Widgets/Room.vala:216
376-#: /home/noelco/cable/po/../src/Widgets/Room.vala:231
377+#: /home/noelco/cable/po/../src/Widgets/Room.vala:187
378+#: /home/noelco/cable/po/../src/Widgets/Room.vala:202
379 msgid "Regular"
380 msgstr "Visiteurs"
381
382-#: /home/noelco/cable/po/../src/Widgets/Room.vala:218
383-#: /home/noelco/cable/po/../src/Widgets/Room.vala:233
384+#: /home/noelco/cable/po/../src/Widgets/Room.vala:189
385+#: /home/noelco/cable/po/../src/Widgets/Room.vala:204
386 msgid "Voiced"
387-msgstr ""
388+msgstr "Participants"
389
390-#: /home/noelco/cable/po/../src/Widgets/Room.vala:289
391+#: /home/noelco/cable/po/../src/Widgets/Room.vala:260
392 #, c-format
393 msgid "%s joined"
394 msgstr "%s a rejoint le salon"
395
396-#: /home/noelco/cable/po/../src/Widgets/Room.vala:292
397+#: /home/noelco/cable/po/../src/Widgets/Room.vala:263
398 #, c-format
399 msgid "%s left"
400 msgstr "%s a quitté le salon"
401
402-#: /home/noelco/cable/po/../src/Widgets/Room.vala:295
403+#: /home/noelco/cable/po/../src/Widgets/Room.vala:266
404 #, c-format
405 msgid "%s is away"
406 msgstr "%s est absent"
407@@ -128,25 +118,38 @@
408 msgid "Leave Channel"
409 msgstr "Quitter le canal"
410
411-#: /home/noelco/cable/po/../src/Widgets/Server.vala:134
412-#: /home/noelco/cable/po/../src/Widgets/Server.vala:146
413+#: /home/noelco/cable/po/../src/Widgets/Server.vala:142
414+#: /home/noelco/cable/po/../src/Widgets/Server.vala:154
415 msgid "Mark Away"
416 msgstr "Signaler comme absent"
417
418-#: /home/noelco/cable/po/../src/Widgets/Server.vala:135
419+#: /home/noelco/cable/po/../src/Widgets/Server.vala:143
420 msgid "Leave all channels"
421 msgstr "Quitter tout les canaux"
422
423-#: /home/noelco/cable/po/../src/Widgets/Server.vala:142
424+#: /home/noelco/cable/po/../src/Widgets/Server.vala:150
425 #: /home/noelco/cable/po/../src/Services/Identity.vala:77
426 #, c-format
427 msgid "%s is away."
428 msgstr "%s est absent."
429
430-#: /home/noelco/cable/po/../src/Widgets/Server.vala:143
431+#: /home/noelco/cable/po/../src/Widgets/Server.vala:151
432 msgid "Mark Present"
433 msgstr "Signaler comme présent"
434
435+#: /home/noelco/cable/po/../src/Widgets/Toolbar.vala:31
436+msgid "Search…"
437+msgstr "Recherche…"
438+
439+#: /home/noelco/cable/po/../src/Widgets/Toolbar.vala:46
440+msgid "Preferences…"
441+msgstr "Préférences…"
442+
443+#: /home/noelco/cable/po/../src/Widgets/Toolbar.vala:62
444+#: /home/noelco/cable/po/../src/Widgets/Toolbar.vala:74
445+msgid "<b>Topic:</b> "
446+msgstr "<b>Sujet :</b> "
447+
448 #: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:44
449 msgid "johndoe"
450 msgstr "jeandupond"
451@@ -171,11 +174,11 @@
452 msgid "Part Message:"
453 msgstr "Message d'au-revoir :"
454
455-#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:74
456+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:75
457 msgid "Add Identity"
458 msgstr "Ajouter une identité"
459
460-#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:75
461+#: /home/noelco/cable/po/../src/Dialogs/ManageIdentity.vala:76
462 msgid "Edit Identity"
463 msgstr "Modifier l'identité"
464
465@@ -183,6 +186,10 @@
466 msgid "Join Channel"
467 msgstr "Rejoindre le canal"
468
469+#: /home/noelco/cable/po/../src/Dialogs/Preferences.vala:23
470+msgid "Preferences"
471+msgstr "Préférences"
472+
473 #: /home/noelco/cable/po/../src/Dialogs/Preferences.vala:30
474 msgid "Networks"
475 msgstr "Réseaux"
476@@ -248,11 +255,11 @@
477 msgid "Password:"
478 msgstr "Mot de passe :"
479
480-#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:76
481+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:77
482 msgid "Add Network"
483 msgstr "Ajouter un réseau"
484
485-#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:77
486+#: /home/noelco/cable/po/../src/Dialogs/ManageNetwork.vala:78
487 msgid "Change Network"
488 msgstr "Changer de réseau"
489
490@@ -264,6 +271,12 @@
491 msgid "Quit server."
492 msgstr "Quitte le serveur."
493
494+#~ msgid "About"
495+#~ msgstr "À propos"
496+
497+#~ msgid "Loading Topic…"
498+#~ msgstr "Chargement du sujet…"
499+
500 #~ msgid "Leave current channel"
501 #~ msgstr "Quitter le canal actuel"
502
503
504=== modified file 'src/Utils.vala'
505--- src/Utils.vala 2013-06-28 19:07:25 +0000
506+++ src/Utils.vala 2013-07-04 22:40:32 +0000
507@@ -59,11 +59,42 @@
508 }
509 }
510
511-// FIXME
512 namespace Cable.Utils {
513+ // FIXME
514 public void filter (Gtk.Editable editable, string text, string[] needles) {
515 foreach (var needle in needles)
516 if (needle in text)
517 Signal.stop_emission_by_name (editable, "insert-text");
518 }
519+
520+ public string parse_string_to_markup (string input) {
521+ var new_input = input.replace ("<", "&lt;");
522+ new_input = new_input.replace (">", "&gt;");
523+ var uris = new Gee.LinkedList<string> ();
524+ string current_state = "";
525+ string current_uri = "";
526+ bool is_parsing = false;
527+ foreach (var character in new_input.to_utf8 ()) {
528+ current_state = current_state + character.to_string ();
529+ if (current_state.has_suffix ("http") && !is_parsing) {
530+ current_uri = "htt";
531+ is_parsing = true;
532+ }
533+ if (is_parsing) {
534+ if (character.to_string () == " ") {
535+ uris.add (current_uri);
536+ is_parsing = false;
537+ } else {
538+ current_uri = current_uri + character.to_string ();
539+ }
540+ }
541+ }
542+ if (is_parsing) {
543+ uris.add (current_uri);
544+ }
545+ foreach (var uri in uris) {
546+ new_input = new_input.replace (uri, "<a href=\""+uri+"\">"+uri+"</a>");
547+ }
548+ return new_input;
549+ }
550 }
551
552=== modified file 'src/Widgets/Room.vala'
553--- src/Widgets/Room.vala 2013-07-04 01:34:38 +0000
554+++ src/Widgets/Room.vala 2013-07-04 22:40:32 +0000
555@@ -51,11 +51,10 @@
556 Gtk.Box user_box;
557
558 Gee.HashMap<string, string> color_map;
559+ public string topic = "";
560
561- public Gtk.InfoBar topic;
562- public Gtk.Label topic_name;
563 private Gtk.Button identity_button;
564-
565+
566 public signal void send_message (string message);
567
568 public signal bool kick_user (string nick_name);
569@@ -63,7 +62,7 @@
570 public signal void ignore (string nick_name, bool ignore = true);
571
572 public Server server { get; private set; }
573- public string channel;
574+ public string channel = "";
575
576 public Room (string channel, Server server) {
577 this.channel = channel;
578@@ -110,33 +109,6 @@
579 paned.pack1 (box, true, false);
580 paned.pack2 (user_box, false, false);
581
582- /* Create inline toolbar */
583- misc_bar = new Gtk.Toolbar ();
584- misc_bar.set_icon_size (Gtk.IconSize.SMALL_TOOLBAR);
585-
586- var misc_bar_style = misc_bar.get_style_context ();
587- misc_bar_style.add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR);
588-
589- var aligner = new Gtk.SeparatorToolItem ();
590- aligner.set_draw (false);
591- aligner.set_expand (true);
592-
593- var about_button = main_actions.get_action ("About").create_tool_item() as Gtk.ToolButton;
594- var settings_button = main_actions.get_action ("Preferences").create_tool_item() as Gtk.ToolButton;
595-
596- misc_bar.add (aligner);
597- misc_bar.add (settings_button);
598- misc_bar.add (about_button);
599-
600- /* Create the Topic InfoBar */
601- var topic = new Gtk.InfoBar ();
602- topic_name = new Gtk.Label (_("Loading Topic…"));
603- topic_name.wrap = true;
604- topic_name.halign = Gtk.Align.FILL;
605- topic_name.valign = Gtk.Align.FILL;
606- var content = topic.get_content_area () as Gtk.Container;
607- content.add (topic_name);
608-
609 var entry = new Gtk.Entry ();
610 entry.hexpand = true;
611
612@@ -160,7 +132,6 @@
613 entry_grid.attach (entry, 1, 0, 1, 1);
614 left_scrolled.add_with_viewport(chat);
615
616- box.pack_start (topic, false);
617 box.pack_start (left_scrolled);
618 box.pack_start (entry_eventbox, false);
619
620@@ -271,12 +242,12 @@
621
622 switch (type) {
623 case MessageType.NORMAL:
624- var new_message = message;
625+ var new_message = Utils.parse_string_to_markup (message);
626 foreach (var entry in color_map.entries) {
627 new_message = new_message.replace (entry.key, "<span color='"+entry.value+"'>"+entry.key+"</span>");
628 }
629 if (message.contains (server.identity.nick_name)) {
630- chat.add_message (@"<span color='#DA4D45'><b>$from</b></span>", @"<span color='#DA4D45'><b>$new_message</b></span>");
631+ chat.add_message (@"<span color='#DA4D45'><b>$from</b></span>", "<span color='#DA4D45'><b>" + new_message + "</b></span>");
632 } else {
633 if (color_map.has_key (from)) {
634 chat.add_message ("<span color='"+color_map.get (from)+@"'>$from</span>", new_message);
635
636=== modified file 'src/Widgets/Server.vala'
637--- src/Widgets/Server.vala 2013-07-04 01:34:38 +0000
638+++ src/Widgets/Server.vala 2013-07-04 22:40:32 +0000
639@@ -67,6 +67,14 @@
640 public signal void joined_channel (Channel channel);
641
642 /**
643+ * Emitted when a the topic changes.
644+ *
645+ * @param channel Channel that applies this topic.
646+ * @param topic The new topic name.
647+ */
648+ public signal void topic_changed (string channel, string topic);
649+
650+ /**
651 * Create and connect to a server.
652 */
653 public Server (Settings.Network network, Settings.Identity identity) {
654@@ -205,7 +213,8 @@
655 if (channel == null)
656 return;
657
658- channel.room.topic_name.label = topic;
659+ channel.room.topic = topic;
660+ topic_changed (channel.room.channel, topic);
661 });
662
663
664
665=== added file 'src/Widgets/Toolbar.vala'
666--- src/Widgets/Toolbar.vala 1970-01-01 00:00:00 +0000
667+++ src/Widgets/Toolbar.vala 2013-07-04 22:40:32 +0000
668@@ -0,0 +1,83 @@
669+/***
670+ Copyright (C) 2013 Cable Developers
671+
672+ This program or library is free software; you can redistribute it
673+ and/or modify it under the terms of the GNU Lesser General Public
674+ License as published by the Free Software Foundation; either
675+ version 3 of the License, or (at your option) any later version.
676+
677+ This library is distributed in the hope that it will be useful,
678+ but WITHOUT ANY WARRANTY; without even the implied warranty of
679+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
680+ Lesser General Public License for more details.
681+
682+ You should have received a copy of the GNU Lesser General
683+ Public License along with this library; if not, write to the
684+ Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
685+ Boston, MA 02110-1301 USA.
686+***/
687+
688+public class Cable.Widgets.Toolbar : Gtk.Toolbar {
689+
690+ public Granite.Widgets.SearchBar search_entry;
691+ private Granite.Widgets.WrapLabel topic_label;
692+ private string current_channel;
693+ Cable.App application;
694+
695+ public Toolbar (Cable.App application) {
696+ this.application = application;
697+ this.show_arrow = false;
698+
699+ search_entry = new Granite.Widgets.SearchBar (_("Search…"));
700+ search_entry.sensitive = false;
701+ var search_toolitem = new Gtk.ToolItem ();
702+ search_toolitem.add (search_entry);
703+
704+ topic_label = new Granite.Widgets.WrapLabel ("");
705+ topic_label.hexpand = true;
706+ topic_label.margin_left = 12;
707+ topic_label.margin_right = 12;
708+ topic_label.ellipsize = Pango.EllipsizeMode.END;
709+ var topic_toolitem = new Gtk.ToolItem ();
710+ topic_toolitem.set_expand (true);
711+ topic_toolitem.add (topic_label);
712+
713+ var menu = new Gtk.Menu ();
714+ var preferences_menu = new Gtk.MenuItem.with_label (_("Preferences…"));
715+ preferences_menu.activate.connect (() => {
716+ var dialog = new Dialogs.Preferences ();
717+ dialog.show_all ();
718+ });
719+ menu.add (preferences_menu);
720+ var app_menu = (application as Granite.Application).create_appmenu (menu);
721+
722+ this.add (topic_toolitem);
723+ this.add (search_toolitem);
724+ this.add (app_menu);
725+ }
726+
727+ public void topic_changed (string channel, string topic) {
728+ if (current_channel == channel) {
729+ if (topic != "") {
730+ var new_topic = Utils.parse_string_to_markup (topic);
731+ topic_label.set_markup (_("<b>Topic:</b> ") + new_topic);
732+ topic_label.set_tooltip_text (new_topic);
733+ } else {
734+ topic_label.set_markup ("");
735+ topic_label.set_tooltip_text ("");
736+ }
737+ }
738+ }
739+
740+ public void change_topic (string channel, string topic) {
741+ current_channel = channel;
742+ if (topic != "") {
743+ var new_topic = Utils.parse_string_to_markup (topic);
744+ topic_label.set_markup (_("<b>Topic:</b> ") + new_topic);
745+ topic_label.set_tooltip_text (new_topic);
746+ } else {
747+ topic_label.set_markup ("");
748+ topic_label.set_tooltip_text ("");
749+ }
750+ }
751+}
752
753=== modified file 'src/Window.vala'
754--- src/Window.vala 2013-07-04 01:34:38 +0000
755+++ src/Window.vala 2013-07-04 22:40:32 +0000
756@@ -23,18 +23,15 @@
757
758 bool welcome_shown;
759
760- Gtk.EventBox display_box;
761- Widgets.ServerList server_list;
762-
763- Gtk.Grid layout;
764- Gtk.Toolbar toolbar;
765+ Gtk.EventBox display_box;
766+ Widgets.ServerList server_list;
767+ Gtk.Grid layout;
768+ Gtk.Grid server_grid;
769+ Widgets.Toolbar toolbar;
770 Granite.Widgets.ThinPaned paned;
771- //Widgets.StatusBar statusbar;
772- Widgets.Welcome welcome;
773-
774- Gtk.Box serverBox;
775+ Widgets.Welcome welcome;
776
777- Gtk.Toolbar channel_control;
778+ Gtk.Toolbar channel_control;
779 Gtk.ToolButton add_channel;
780 Gtk.ToolButton leave_channel;
781
782@@ -47,10 +44,6 @@
783 <menuitem name="Leave Channel" action="LeaveChannel"/>
784 <menuitem name="Edit Identity" action="EditCurrentId"/>
785 </popup>
786-
787- <popup name="AppMenu">
788- <menuitem name="Preferences" action="Preferences"/>
789- </popup>
790 </ui>
791 """;
792
793@@ -96,81 +89,46 @@
794 }
795
796 private void init_layout () {
797+ this.title = "Cable";
798+ this.icon_name = "internet-chat";
799+ this.set_default_size (740, 480);
800+ this.window_position = Gtk.WindowPosition.CENTER;
801+ this.show_all ();
802+
803 layout = new Gtk.Grid ();
804 server_list = new Widgets.ServerList ();
805 display_box = new Gtk.EventBox ();
806- toolbar = new Gtk.Toolbar ();
807+ toolbar = new Widgets.Toolbar ((Cable.App)application);
808 paned = new Granite.Widgets.ThinPaned ();
809- welcome = new Widgets.Welcome ();
810- //statusbar = new Widgets.StatusBar ();
811
812- serverBox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
813 channel_control = new Gtk.Toolbar ();
814- /* add_channel = new Gtk.ToolButton (new Gtk.Image.from_icon_name ("list-add-symbolic", Gtk.IconSize.SMALL_TOOLBAR), _("Join a Channel"));
815- leave_channel = new Gtk.ToolButton (new Gtk.Image.from_icon_name ("list-remove-symbolic", Gtk.IconSize.SMALL_TOOLBAR), _("Leave a Channel"));*/
816-
817 channel_control.set_icon_size (Gtk.IconSize.SMALL_TOOLBAR);
818-
819- //layout.attach (toolbar, 0, 0, 1, 1);
820-
821+
822 var join_button = main_actions.get_action ("JoinChannel").create_tool_item() as Gtk.ToolButton;
823 var leave_button = main_actions.get_action ("LeaveChannel").create_tool_item() as Gtk.ToolButton;
824- var settings_button = main_actions.get_action ("Preferences").create_tool_item() as Gtk.ToolButton;
825- var about_button = main_actions.get_action ("About").create_tool_item() as Gtk.ToolButton;
826-
827+
828 var expander = new Gtk.SeparatorToolItem ();
829 expander.set_draw (false);
830 expander.set_expand (true);
831-
832- toolbar.vexpand = false;
833- //toolbar.add (join_button);
834- //toolbar.add (leave_button);
835-
836- /*var spacer = new Gtk.ToolItem ();
837- spacer.set_expand (true);
838- toolbar.add (spacer);
839-
840- var menu = ui.get_widget ("ui/AppMenu") as Gtk.Menu;
841- app_menu = (application as Granite.Application).create_appmenu (menu);
842- toolbar.add (app_menu);
843- */
844-
845+
846+ welcome = new Widgets.Welcome ();
847 welcome.done.connect (join_channel);
848 welcome.hexpand = true;
849 welcome.vexpand = true;
850
851 var channel_toolbar_style = channel_control.get_style_context ();
852 channel_toolbar_style.add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR);
853-
854 channel_control.add (join_button);
855 channel_control.add (leave_button);
856- channel_control.add (expander);
857- channel_control.add (settings_button);
858- channel_control.add (about_button);
859-
860- /*add_channel.clicked.connect (() => {
861- var join_dialog = new Dialogs.JoinChannel ();
862- join_dialog.show_all ();
863- join_dialog.done ();
864- });*/
865
866- serverBox.pack_start (server_list);
867- serverBox.pack_end (channel_control ,false, false, 0);
868+ server_grid = new Gtk.Grid ();
869+ server_grid.attach (server_list, 0, 0, 1, 1);
870+ server_grid.attach (channel_control, 0, 1, 1, 1);
871
872 paned.position = 150;
873- paned.pack1 (serverBox, false, false);
874+ paned.pack1 (server_grid, false, false);
875 paned.pack2 (display_box, true, false);
876
877- this.title = "Cable";
878- this.icon_name = "internet-chat";
879- this.set_default_size (740, 480);
880- this.window_position = Gtk.WindowPosition.CENTER;
881- this.show_all ();
882-
883- //statusbar.send_message.connect ((msg) => {
884- // server_list.current_server.send_message (server_list.current_channel, msg);
885- // });
886-
887 server_list.item_selected.connect ((item) => {
888 if (item != null && item is Widgets.Channel) {
889 var channel = item as Widgets.Channel;
890@@ -181,21 +139,16 @@
891
892 display_box.add ((item as Widgets.Channel).room);
893 display_box.show_all ();
894+ toolbar.change_topic ((item as Widgets.Channel).room.channel, (item as Widgets.Channel).room.topic);
895 title = string.join (" — ", channel.name, channel.server.identity.nick_name);
896 }
897 });
898
899- var css = new Gtk.CssProvider();
900- css.load_from_data ("*{border-color:#9c9c9c;}", -1);
901-
902 var channels = Settings.settings.get_strv ("channels");
903- var line = new Gtk.Separator (Gtk.Orientation.HORIZONTAL);
904-
905- line.get_style_context ().add_provider (css, 999999999);
906+ layout.attach (toolbar, 0, 0, 1, 1);
907
908 if (channels.length > 0) {
909 welcome_shown = false;
910- layout.attach (line, 0, 0, 1, 1);
911 layout.attach (paned, 0, 1, 1, 1);
912 //layout.attach (statusbar, 0, 2, 1, 1);
913 this.add (layout);
914@@ -227,7 +180,6 @@
915 server_list.selected = server_list.servers[0].channels[0];
916 } else {
917 welcome_shown = true;
918- layout.attach (line, 0, 0, 1, 1);
919 layout.attach (welcome, 0, 1, 1, 1);
920 this.add (layout);
921 this.show_all ();
922@@ -248,7 +200,6 @@
923 welcome_shown = false;
924 layout.remove (welcome);
925 layout.attach (paned, 0, 1, 1, 1);
926- //layout.attach (statusbar, 0, 2, 1, 1);
927 this.show_all ();
928 welcome.focus_channel_entry ();
929 server_list.selected = channel;
930@@ -257,13 +208,15 @@
931
932 server.left_channel.connect ((channel) => {
933 if (server_list.get_n_servers () == 0) {
934+ toolbar.change_topic (channel.room.channel, "");
935 welcome_shown = true;
936 layout.remove (paned);
937- //layout.remove (statusbar);
938 layout.attach (welcome, 0, 1, 1, 1);
939 this.show_all ();
940 }
941 });
942+
943+ server.topic_changed.connect (toolbar.change_topic);
944 }
945
946 server.join_channel (channel_name);
947@@ -289,15 +242,6 @@
948 dialog.show_all ();
949 }
950
951- void action_about () {
952- (application as Cable.App).show_about (this);
953- }
954-
955- void action_preferences () {
956- var dialog = new Dialogs.Preferences ();
957- dialog.show_all ();
958- }
959-
960 private static const Gtk.ActionEntry[] main_entries = {
961 { "JoinChannel", "list-add-symbolic", N_("Join Channel…"), "<Control>j",
962 N_("Join Channel…"), action_join_channel },
963@@ -306,12 +250,6 @@
964 N_("Leave current Channel"), action_leave_channel },
965
966 { "EditCurrentId", "avatar-default-symbolic", N_("Edit current Identity…"), "<Control>i",
967- N_("Edit current Identity…"), action_edit_identity },
968-
969- { "Preferences", "document-properties-symbolic", N_("Preferences"), null,
970- N_("Preferences"), action_preferences },
971-
972- { "About", "help-info-symbolic", N_("About"), null,
973- N_("About"), action_about }
974+ N_("Edit current Identity…"), action_edit_identity }
975 };
976 }

Subscribers

People subscribed via source and target branches

to all changes: