From 69c297fe956f174af2525ea94c07a17833674548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20=27Necoro=27=20Neumann?= Date: Sun, 5 Jul 2009 03:01:29 +0200 Subject: Also ported EbuildDetail --- plugins/package_details.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'plugins/package_details.py') diff --git a/plugins/package_details.py b/plugins/package_details.py index 2ae9f56..49a88ad 100644 --- a/plugins/package_details.py +++ b/plugins/package_details.py @@ -56,7 +56,19 @@ class ChangelogDetail (ScrolledDetail): _widget_name_ = "Changelog" def widget_init (self): - self._view_ = HighlightView(lambda p: os.path.join(p.get_package_path(), "ChangeLog"), ["changelog"]) + self._view_ = HighlightView(self.view_update, ["changelog"]) ScrolledDetail.widget_init(self) + def view_update (self, pkg): + return os.path.join(pkg.get_package_path(), "Changelog") + +class EbuildDetail (ScrolledDetail): + __description__ = "Shows the ebuild of a package" + _widget_name_ = "Ebuild" + + def widget_init(self): + self._view_ = HighlightView(lambda p: p.get_ebuild_path(), ["gentoo", "sh"]) + ScrolledDetail.widget_init(self) + +register(EbuildDetail) register(ChangelogDetail) -- cgit v1.2.3