From c56e88127138703089603e35795e4463526a3e68 Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Fri, 12 Oct 2012 14:17:07 +0200 Subject: [PATCH] Improve Python test program to make testing easier --- tests/testpeas.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/testpeas.py b/tests/testpeas.py index 02c5a38..b6335df 100644 --- 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() -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')) -for i in e.get_plugin_list(): - print i.get_name() +frotz_info = e.get_plugin_info('frotz') +e.load_plugin(frotz_info) 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() -- 2.30.2