class ArchiveButton
this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint(dpblnt@gmail.com)
Attributes
list_holder[RW]
Public Class Methods
new(list_holder)
click to toggle source
Calls superclass method
# File lib/ListHolder/ListButtonHolder/ArchiveButton.rb, line 8 def initialize(list_holder) @list_holder=list_holder @auto_update=false super() set_relief(Gtk::ReliefStyle::NONE) set_image(Gtk::Image.new(Gtk::Stock::BOLD,Gtk::IconSize.from_name(get_conf(0,0,"button-size")))) signal_connect('toggled'){|me| me.list_holder.list.list_model.set_show_archive(me.active?) if @auto_update set_conf(list_holder.list.get_id,0,"archive",me.active?.to_s) @list_holder.notebook.lists{|list| list.archive_button.set_active(me.active?) } if @list_holder.notebook @list_holder.list.update(self) end } end
Public Instance Methods
to_s()
click to toggle source
# File lib/ListHolder/ListButtonHolder/ArchiveButton.rb, line 34 def to_s "ArchiveButton of #{@list_holder}" end
update()
click to toggle source
# File lib/ListHolder/ListButtonHolder/ArchiveButton.rb, line 27 def update @auto_update=false set_no_show_all(@list_holder.list.list_model.archive_key.nil?) set_visible(!@list_holder.list.list_model.archive_key.nil?) set_active(get_conf(@list_holder.list.list_id,0,"archive")=="true") @auto_update=true end