AppendNick() public method

public AppendNick ( Smuxi.Engine.ContactModel contact ) : MessageBuilder
contact Smuxi.Engine.ContactModel
return MessageBuilder
Beispiel #1
0
 public virtual void RenderPersonIdentityName(Gtk.TreeViewColumn column,
                                              Gtk.CellRenderer cellr,
                                              Gtk.TreeModel model, Gtk.TreeIter iter)
 {
     PersonModel person = (PersonModel) model.GetValue(iter, 0);
     var renderer = (Gtk.CellRendererText) cellr;
     if (NickColors) {
         // TODO: do we need to optimize this? it's called very often...
         Gdk.Color bgColor = _PersonTreeView.Style.Base(Gtk.StateType.Normal);
         var builder = new MessageBuilder();
         builder.Settings.NickColors = true;
         builder.AppendNick(person);
         renderer.Markup = PangoTools.ToMarkup(builder.ToMessage(),
                                               bgColor);
     } else {
         renderer.Text = person.IdentityName;
     }
 }