projects
/
projects
/
chimara
/
chimara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve Python test program
[projects/chimara/chimara.git]
/
tests
/
testpeas.py
diff --git
a/tests/testpeas.py
b/tests/testpeas.py
index 02c5a38623d39549f93783ce7a68bcdea00fc30e..b6335df20283973ee3711b996837a1d8ec995488 100644
(file)
--- a/
tests/testpeas.py
+++ b/
tests/testpeas.py
@@
-1,14
+1,18
@@
+import os.path
from gi.repository import Gtk, Peas, PeasGtk, Chimara
c = Chimara.Glk()
e = Peas.Engine.get_default()
from gi.repository import Gtk, Peas, PeasGtk, Chimara
c = Chimara.Glk()
e = Peas.Engine.get_default()
-e.add_search_path('/Users/fliep/gtk/inst/lib/chimara', None)
+e.add_search_path(os.path.expanduser('~/gtk/inst/lib/chimara'),
+ os.path.expanduser('~/gtk/inst/lib/chimara/plugins'))
-f
or i in e.get_plugin_list():
-
print i.get_name(
)
+f
rotz_info = e.get_plugin_info('frotz')
+
e.load_plugin(frotz_info
)
w = Gtk.Window()
w = Gtk.Window()
-w.add(PeasGtk.PluginManager(e))
+m = PeasGtk.PluginManager(e)
+m.get_view().set_selected_plugin(frotz_info)
+w.add(m)
w.connect('destroy', Gtk.main_quit)
w.show_all()
w.connect('destroy', Gtk.main_quit)
w.show_all()