~ubuntu-branches/ubuntu/trusty/smuxi/trusty-proposed

« back to all changes in this revision

Viewing changes to src/Frontend-GNOME/Views/Chats/ChatView.cs

  • Committer: Package Import Robot
  • Author(s): Mirco Bauer
  • Date: 2013-05-25 22:11:31 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20130525221131-nd2mc0kzubuwyx20
Tags: 0.8.11-1
* [22d13d5] Imported Upstream version 0.8.11
* [6d2b95a] Refreshed patches
* [89eb66e] Added ServiceStack libraries to smuxi-engine package
* [848ab10] Enable Campfire engine
* [c6dbdc7] Always build db4o for predictable build result
* [13ec489] Exclude OS X specific libraries from dh_clideps

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 */
22
22
 
23
23
using System;
 
24
using System.Text.RegularExpressions;
24
25
using System.Threading;
25
26
using System.Collections.Generic;
26
27
using Smuxi.Common;
215
216
            }
216
217
        }
217
218
 
 
219
        // by default: no participants
 
220
        public virtual IList<PersonModel> Participants {
 
221
            get {
 
222
                return new List<PersonModel>();
 
223
            }
 
224
        }
 
225
 
218
226
        public Gtk.Widget LabelWidget {
219
227
            get {
220
228
                return _TabEventBox;
239
247
            }
240
248
        }
241
249
 
 
250
        protected Gtk.Menu TabMenu {
 
251
            get {
 
252
                return _TabMenu;
 
253
            }
 
254
        }
 
255
 
242
256
        protected ThemeSettings ThemeSettings {
243
257
            get {
244
258
                return _ThemeSettings;
271
285
            tv.SizeRequested += delegate {
272
286
                AutoScroll();
273
287
            };
 
288
            tv.PersonClicked += OnMessageTextViewPersonClicked;
274
289
            _OutputMessageTextView = tv;
275
290
 
276
291
            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
469
484
 
470
485
            // REMOTING CALL
471
486
            SyncedName = _ChatModel.Name;
472
 
            // REMOTING CALL
473
 
            ProtocolManager = _ChatModel.ProtocolManager;
474
487
 
475
488
            if (!Frontend.IsLocalEngine && Frontend.UseLowBandwidthMode) {
476
489
                // FIXME: set TabImage back to normal
747
760
            popup.ShowAll();
748
761
        }
749
762
 
 
763
        protected virtual void OnMessageTextViewPersonClicked(object sender, MessageTextViewPersonClickedEventArgs e)
 
764
        {
 
765
            Trace.Call(sender, e);
 
766
 
 
767
            var entry = Frontend.MainWindow.Entry;
 
768
            var text = entry.Text;
 
769
            var match = Regex.Match(text, "^[^ ]+: ");
 
770
            if (match.Success) {
 
771
                // removing existing nick
 
772
                text = text.Substring(match.Length);
 
773
            }
 
774
            text = String.Format("{0}: {1}", e.IdentityName, text);
 
775
            entry.Text = text;
 
776
            entry.HasFocus = true;
 
777
        }
 
778
 
750
779
        protected virtual void OnLastSeenHighlightQueueExceptionEvent(object sender, TaskQueueExceptionEventArgs e)
751
780
        {
752
781
            Trace.Call(sender, e);