Debian Codegraph @

tests/test_home/plugins/threadindexplugin.py

raw
1 import gi
2 gi.require_version ('Astroid', '0.2')
3 gi.require_version ('Gtk', '3.0')
4 from gi.repository import GObject, Gtk, Astroid
5
6 print ("threadindexplugin: plugin loading..")
7
8 class ThreadIndexPlugin (GObject.Object, Astroid.ThreadIndexActivatable):
9 thread_index = GObject.property (type = Gtk.Box)
10
11 def do_activate (self):
12 print ('tagformat: activate')
13 self.label = Gtk.Label ("Hullu!")
14 self.thread_index.pack_end (self.label, True, True, 5)
15
16
17 def do_deactivate (self):
18 print ('tagformat: deactivate')
19
20 def do_format_tags (self, bg, tags, selected):
21
22 from IPython import embed
23 # embed ()
24
25 print ("got tags: ", tags)
26
27 return ", ".join (tags)
28