diff options
author | Gaute Hope <eg@gaute.vetsj.com> | 2016-06-16 10:02:15 +0200 |
---|---|---|
committer | Gaute Hope <eg@gaute.vetsj.com> | 2016-07-08 14:21:02 +0200 |
commit | 6ac1b4fff181602a800d424f9a40ff48d1578924 (patch) | |
tree | 7c558480fb8966eac720148ec5d843d6dbb896c5 /examples | |
parent | 5c08b07913939ac015a9e04365dc357933b04f9f (diff) |
plugin examples: link to tests
Diffstat (limited to 'examples')
l---------[-rw-r--r--] | examples/plugins/basic.plugin | 12 | ||||
l---------[-rw-r--r--] | examples/plugins/basic.py | 33 | ||||
l---------[-rw-r--r--] | examples/plugins/tagformat.plugin | 12 | ||||
l---------[-rwxr-xr-x] | examples/plugins/tagformat.py | 26 |
4 files changed, 4 insertions, 79 deletions
diff --git a/examples/plugins/basic.plugin b/examples/plugins/basic.plugin index 22acee2..957e0da 100644..120000 --- a/examples/plugins/basic.plugin +++ b/examples/plugins/basic.plugin @@ -1,11 +1 @@ -[Plugin] -Module=basic -Depends= -Loader=python3 -Name=basic plugin -Description=plugin -Authors=Gaute Hope -Copyright= -Website= -Help= -Hidden=false +../../test/test_home/plugins/basic.plugin
\ No newline at end of file diff --git a/examples/plugins/basic.py b/examples/plugins/basic.py index fda0d3c..30521a1 100644..120000 --- a/examples/plugins/basic.py +++ b/examples/plugins/basic.py @@ -1,32 +1 @@ -import gi -gi.require_version ('Astroid', '0.1') -from gi.repository import GObject, Astroid - -print ("basic: plugin loading..") - -class BasicPlugin (GObject.Object, Astroid.Activatable): - object = GObject.property (type=GObject.Object) - - def do_activate (self): - print ('basic: activate') - - def do_deactivate (self): - print ('basic: deactivate') - - def do_ask (self, n): - print (repr(n)) - print ("got ask:", n) - - from IPython import embed - # embed () - - - n = n.replace ("hello", "asdf") - print (n) - - return n - - def do_get_avatar_uri (self, email, tpe, size): - print ("getting avatar uri", email, tpe, size) - return "" - +../../test/test_home/plugins/basic.py
\ No newline at end of file diff --git a/examples/plugins/tagformat.plugin b/examples/plugins/tagformat.plugin index 0b4fb81..7e6c101 100644..120000 --- a/examples/plugins/tagformat.plugin +++ b/examples/plugins/tagformat.plugin @@ -1,11 +1 @@ -[Plugin] -Module=tagformat -Depends= -Loader=python3 -Name=tagformat -Description=plugin -Authors=Gaute Hope -Copyright= -Website= -Help= -Hidden=false +../../test/test_home/plugins/tagformat.plugin
\ No newline at end of file diff --git a/examples/plugins/tagformat.py b/examples/plugins/tagformat.py index afcc712..2ac258f 100755..120000 --- a/examples/plugins/tagformat.py +++ b/examples/plugins/tagformat.py @@ -1,25 +1 @@ -import gi -gi.require_version ('Astroid', '0.1') -from gi.repository import GObject, Gtk, Astroid - -print ("tagformat: plugin loading..") - -class TagFormatPlugin (GObject.Object, Astroid.ThreadIndexActivatable): - object = GObject.property (type=GObject.Object) - # listview = GObject.property (type = Gtk.TreeView) - - def do_activate (self): - print ('tagformat: activate') - - def do_deactivate (self): - print ('tagformat: deactivate') - - def do_format_tags (self, tags): - - from IPython import embed - # embed () - - print ("got tags: ", tags) - - return ", ".join (tags) - +../../test/test_home/plugins/tagformat.py
\ No newline at end of file |