Created
February 15, 2014 08:15
-
-
Save rhenium/9016048 to your computer and use it in GitHub Desktop.
mikutter のライセンスに準じます
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Plugin.create :filter_track do | |
querybox = ::Gtk::Entry.new() | |
querycont = ::Gtk::VBox.new(false, 0) | |
searchbtn = ::Gtk::Button.new(_('検索')) | |
querycont. | |
closeup(::Gtk::HBox.new(false, 0). | |
pack_start(querybox). | |
closeup(searchbtn)) | |
tab(:filter_track, _("フィルター")) do | |
set_icon Skin.get("search.png") | |
shrink | |
nativewidget querycont | |
expand | |
timeline :filter_track | |
end | |
searchbtn.signal_connect('clicked'){ |elm| | |
filter_filter_stream_track {|str| | |
[querybox.text.to_s] } | |
Plugin.call(:filter_stream_force_retry) | |
ss = querybox.text.split(",") | |
on_appear do |messages| | |
messages.each {|message| | |
timeline(:filter_track) << message if ss.any? {|s| message.to_s.include?(s) } } end } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment