示例#1
0
        protected virtual void OnLinkTagTextEvent(object sender, Gtk.TextEventArgs e)
        {
            // logging noise
            //Trace.Call(sender, e);

            // if something in the textview is selected, bail out
            if (HasTextViewSelection)
            {
#if LOG4NET
                _Logger.Debug("OnLinkTagTextEvent(): active selection present, bailing out...");
#endif
                return;
            }

            var tag = (LinkTag)sender;
            _ActiveLink = tag.Link;

            if (e.Event.Type != Gdk.EventType.ButtonRelease)
            {
                return;
            }

            if (_ActiveLink == null)
            {
#if LOG4NET
                _Logger.Warn("OnLinkTagTextEvent(): _ActiveLink is null, ignoring...");
#endif
                return;
            }

            OpenLink(_ActiveLink);
        }
示例#2
0
        protected virtual void OnPersonTagTextEvent(object sender, Gtk.TextEventArgs e)
        {
            // logging noise
            //Trace.Call(sender, e);

            // if something in the textview is selected, bail out
            if (HasTextViewSelection)
            {
#if LOG4NET
                _Logger.Debug("OnPersonTagTextEvent(): active selection present, bailing out...");
#endif
                return;
            }

            var tag = (PersonTag)sender;
            if (tag == null)
            {
                return;
            }

            if (e.Event.Type != Gdk.EventType.ButtonPress)
            {
                return;
            }

            if (PersonClicked != null)
            {
                PersonClicked(
                    this,
                    new MessageTextViewPersonClickedEventArgs(tag.IdentityName)
                    );
            }
        }