Class | Test::Unit::UI::GTK2::FaultList
In: | test/unit/ui/gtk2/testrunner.rb
Parent: | Gtk::TreeView

### Methods

add_fault clear get_fault new

### Public Class methods

new()

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 23
              def initialize
                @faults = []
                @model = Gtk::ListStore.new(String, String)
                super(@model)
                column = Gtk::TreeViewColumn.new
                column.visible = false
                append_column(column)
                renderer = Gtk::CellRendererText.new
                column = Gtk::TreeViewColumn.new("Failures", renderer, {:text => 1})
                append_column(column)
                selection.mode = Gtk::SELECTION_SINGLE
                set_rules_hint(true)
                set_headers_visible(false)
              end

### Public Instance methods

add_fault(fault)

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 38
              def add_fault(fault)
                @faults.push(fault)
                iter = @model.append
                iter.set_value(0, (@faults.length - 1).to_s)
                iter.set_value(1, fault.short_display)
              end

clear()

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 49
              def clear
                model.clear
              end

get_fault(iter)

[Source]

    # File test/unit/ui/gtk2/testrunner.rb, line 45
              def get_fault(iter)
                @faults[iter.get_value(0).to_i]
              end

[Validate]