Class: SumPanelButton
- Inherits:
-
Gtk::ToggleButton
- Object
- Gtk::ToggleButton
- SumPanelButton
- Includes:
- Conf
- Defined in:
- lib/ListHolder/ListButtonHolder/SumPanelButton.rb
Instance Attribute Summary collapse
-
#list_holder ⇒ Object
Returns the value of attribute list_holder.
Instance Method Summary collapse
-
#initialize(list_holder) ⇒ SumPanelButton
constructor
A new instance of SumPanelButton.
- #update ⇒ Object
Methods included from Conf
#get_conf, #load_conf, #save_conf, #set_conf
Constructor Details
#initialize(list_holder) ⇒ SumPanelButton
Returns a new instance of SumPanelButton.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/ListHolder/ListButtonHolder/SumPanelButton.rb', line 8 def initialize(list_holder) @list_holder=list_holder super() set_relief(Gtk::ReliefStyle::NONE) set_image(Gtk::Image.new(Gtk::Stock::ZOOM_IN,Gtk::IconSize.from_name(get_conf(0,0,"button-size")))) signal_connect('toggled'){|me| me.list_holder.list_panel.set_visibility set_conf(list_holder.list.get_id,0,"sum-panel",me.active?.to_s) } end |
Instance Attribute Details
#list_holder ⇒ Object
Returns the value of attribute list_holder.
18 19 20 |
# File 'lib/ListHolder/ListButtonHolder/SumPanelButton.rb', line 18 def list_holder @list_holder end |
Instance Method Details
#update ⇒ Object
20 21 22 |
# File 'lib/ListHolder/ListButtonHolder/SumPanelButton.rb', line 20 def update set_active(get_conf(list_holder.list.list_id,0,"sum-panel")=="true") end |