Class: MyFRendererText

Inherits:
Gtk::Entry
  • Object
show all
Includes:
Conf
Defined in:
lib/ListHolder/ListPanel/ListFilter/FRenderer/Text.rb

Overview

this file is part of manqod manqod is distributed under the CDDL licence the author of manqod is Dobai-Pataky Balint([email protected])

Instance Method Summary collapse

Methods included from Conf

#get_conf, #load_conf, #save_conf, #set_conf

Constructor Details

#initialize(caller, header) ⇒ MyFRendererText

Returns a new instance of MyFRendererText.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer/Text.rb', line 7

def initialize(caller,header)
	@to_filter=0
	super()
	set_has_frame(true)
	set_editable(true)
	set_text(get_conf(caller.list.get_id,header["id"],"filter") || "")
	self.signal_connect("changed",caller,header){|me,caller,header|
 set_conf(caller.list.get_id,header["id"],"filter",me.text)
 @to_filter=@to_filter+1
 Gtk.timeout_add(1000){
@to_filter=@to_filter-1
caller.list.refilter if @to_filter==0
false
}
	}
end

Instance Method Details

#update(newtext = "") ⇒ Object



23
24
25
# File 'lib/ListHolder/ListPanel/ListFilter/FRenderer/Text.rb', line 23

def update(newtext="")
	set_text(newtext)
end