Class: ChooserListRow
- Inherits:
-
Gtk::ListBoxRow
- Object
- Gtk::ListBoxRow
- ChooserListRow
- Defined in:
- lib/terminal_chooser.rb
Instance Attribute Summary collapse
-
#close_button ⇒ Object
readonly
Returns the value of attribute close_button.
Instance Method Summary collapse
- #action_button ⇒ Object
- #generate_new_action_button(label) ⇒ Object
-
#initialize(term, index, notebook) ⇒ ChooserListRow
constructor
A new instance of ChooserListRow.
Constructor Details
#initialize(term, index, notebook) ⇒ ChooserListRow
Returns a new instance of ChooserListRow.
187 188 189 190 191 192 193 194 |
# File 'lib/terminal_chooser.rb', line 187 def initialize(term, index, notebook) super() @notebook = notebook @hbox = Gtk::Box.new(:horizontal, 6) fill_hbox_list_box_row(term, index) add(@hbox) end |
Instance Attribute Details
#close_button ⇒ Object (readonly)
Returns the value of attribute close_button.
186 187 188 |
# File 'lib/terminal_chooser.rb', line 186 def @close_button end |
Instance Method Details
#action_button ⇒ Object
196 197 198 |
# File 'lib/terminal_chooser.rb', line 196 def @hbox.children[4] end |
#generate_new_action_button(label) ⇒ Object
200 201 202 203 204 205 206 207 208 |
# File 'lib/terminal_chooser.rb', line 200 def (label) = Gtk::Button.new(:label => label) .valign = :center . = false @hbox.remove() @hbox.pack_start(, :expand => false, :fill => false, :padding => 6) show_all end |