Debian Codegraph @

plugin/activity_gtk/activity_view.rb

raw symbols SCIP
1 # frozen_string_literal: true
2
3 module Plugin::ActivityGtk
4 class ActivityView < Gtk::CompatListView
5 include ::Gtk::TreeViewPrettyScroll
6
7 ICON = 0
8 KIND = 1
9 TITLE = 2
10 DATE = 3
11 MODEL = 4
12 URI = 5
13
14 def initialize(plugin)
15 type_strict plugin => Plugin
16 @plugin = plugin
17 super()
18 end
19
20 def column_schemer
21 [
22 { kind: :pixbuf, type: GdkPixbuf::Pixbuf, label: 'icon' }, # ICON
23 { kind: :text, type: String, label: _('種類') }, # KIND
24 { kind: :text, type: String, label: _('説明') }, # TITLE
25 { kind: :text, type: String, label: _('時刻') }, # DATE
26 { type: Plugin::Activity::Activity }, # Activity Model
27 { type: String } # URI
28 ].freeze
29 end
30
31 def method_missing(...)
32 @plugin.__send__(...)
33 end
34
35 def respond_to_missing?(...)
36 @plugin.respond_to?(...)
37 end
38 end
39 end