# File core/mui/gtk_listlist.rb, line 8 def column_schemer [{:kind => :active, :widget => :boolean, :type => TrueClass, :label => '表示'}, {:kind => :text, :type => String, :label => 'リスト名'}, {:type => UserList}, ].freeze end
「自分」のアカウントが関係するTwitterリストでこのリストビューを埋める。
真なら自分が作成したTwitterリストのみをこのリストビューに入れる 偽なら自分が作成したものと自分がフォローしているTwitterリストも入れる
self
# File core/mui/gtk_listlist.rb, line 22 def set_auto_getter(plugin, own = false, &proc) type_strict plugin => Plugin, proc => Proc add_hook(Service.primary, own, UserLists.new(Plugin.filtering(:following_lists, UserLists.new).first), &proc) create = plugin.add_event(:list_created) { |service, lists| add_hook(service, own, lists, &proc) } destroy = plugin.add_event(:list_destroy){ |service, list_ids| unless destroyed? each{ |model, path, iter| remove(iter) if list_ids.include?(iter[2][:id]) } end } signal_connect('destroy-event'){ |w, event| plugin.detach(create).detach(destroy) } self end