FileFind.Meshwork.GtkClient.Windows.PreferencesDialog.ShowAutoConnectIP C# (CSharp) Method

ShowAutoConnectIP() private method

private ShowAutoConnectIP ( Gtk.TreeViewColumn column, Gtk.CellRenderer cell, TreeModel model, Gtk.TreeIter iter ) : void
column Gtk.TreeViewColumn
cell Gtk.CellRenderer
model TreeModel
iter Gtk.TreeIter
return void
        private void ShowAutoConnectIP(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
        {
            CellRendererText textCell = (CellRendererText) cell;

            if (((TreeStore)model).IterDepth (iter) > 0) {
                TrustedNodeInfo node = (TrustedNodeInfo) model.GetValue (iter, 0);
                IDestination destination = node.FirstConnectableDestination;
                if (destination == null) {
                    textCell.Text = "<unknown>";
                } else {
                    textCell.Text = destination.ToString();
                }
            } else {
                textCell.Text = String.Empty;
            }
        }