UpdateMarkerline() public méthode

public UpdateMarkerline ( ) : void
Résultat void
Exemple #1
0
        public virtual void Populate()
        {
            Trace.Call();

            Name = SyncedName;

            // sync messages
            // cleanup, be sure the output is empty
            _OutputMessageTextView.Clear();

            if (!Frontend.IsLocalEngine && Frontend.UseLowBandwidthMode)
            {
                var msg = new MessageBuilder();
                msg.AppendEventPrefix();
                msg.AppendMessage(_("Low Bandwidth Mode is active: no messages synced."));
                AddMessage(msg.ToMessage());
            }
            else
            {
                if (SyncedMessages != null)
                {
                    // TODO: push messages in batches and give back control to
                    // GTK+ in between for blocking the GUI thread less
                    foreach (MessageModel msg in SyncedMessages)
                    {
                        AddMessage(msg);
                        if (msg.TimeStamp <= SyncedLastSeenMessage)
                        {
                            // let the user know at which position new messages start
                            _OutputMessageTextView.UpdateMarkerline();
                        }
                    }
                }
            }

            // as we don't track which events have already been seen it would
            // show all chats with unseen events after the frontend connect
            if (!HasHighlight)
            {
                HasEvent = false;
                // Smuxi protocol < 0.13 does not support remembering seen
                // messages thus we mark all message as seen as we can't tell
                // which ones are new
                if (Frontend.EngineProtocolVersion < new Version(0, 13))
                {
                    HasActivity = false;
                }
            }

            // reset tab icon to normal
            TabImage.Pixbuf = DefaultTabImage.Pixbuf;
            OnStatusChanged(EventArgs.Empty);

            SyncedMessages = null;
            IsSynced       = true;
        }
Exemple #2
0
        public virtual void Populate()
        {
            Trace.Call();

            Name = SyncedName;

            // sync messages
            // cleanup, be sure the output is empty
            _OutputMessageTextView.Clear();

            if (!Frontend.IsLocalEngine && Frontend.UseLowBandwidthMode)
            {
                var msg = new MessageBuilder();
                msg.AppendEventPrefix();
                msg.AppendMessage(_("Low Bandwidth Mode is active: no messages synced."));
                AddMessage(msg.ToMessage());
            }
            else
            {
                if (SyncedMessages != null)
                {
                    // TODO: push messages in batches and give back control to
                    // GTK+ in between for blocking the GUI thread less
                    foreach (MessageModel msg in SyncedMessages)
                    {
                        AddMessage(msg);
                    }
                }
            }

            // as we don't track which messages were already seen it would
            // show all chats with message activity after the frontend connect
            if (!HasHighlight)
            {
                HasActivity = false;
                HasEvent    = false;
            }

            // let the user know at which position new messages start
            _OutputMessageTextView.UpdateMarkerline();

            // reset tab icon to normal
            TabImage.Pixbuf = DefaultTabImage.Pixbuf;
            OnStatusChanged(EventArgs.Empty);

            SyncedMessages = null;
            _IsSynced      = true;
        }