| 1 |
|
| 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' }, |
| 23 |
{ kind: :text, type: String, label: _('種類') }, KIND |
| 24 |
{ kind: :text, type: String, label: _('説明') }, ITLE |
| 25 |
{ kind: :text, type: String, label: _('時刻') }, DATE |
| 26 |
{ type: Plugin::Activity::Activity }, |
| 27 |
{ type: String } |
| 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 |