From 2d2f6823f5360a5287b4b19d035cad4a5611fa3a Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sat, 31 Mar 2007 19:29:26 +0000 Subject: Allowed Plugins to have a menu --- portato/plugins/etc_proposals.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'portato/plugins/etc_proposals.py') diff --git a/portato/plugins/etc_proposals.py b/portato/plugins/etc_proposals.py index bf58c06..e830115 100644 --- a/portato/plugins/etc_proposals.py +++ b/portato/plugins/etc_proposals.py @@ -10,10 +10,12 @@ # # Written by René 'Necoro' Neumann -from portato.helper import debug +from portato.helper import debug, am_i_root from portato.backend import system -import os +from portato.gui.gtk.dialogs import not_root_dialog + +from subprocess import Popen from etcproposals.etcproposals_lib import EtcProposals class PortatoEtcProposals(EtcProposals): @@ -32,4 +34,10 @@ def etc_prop (*args, **kwargs): debug(l,"files to update") if l > 0: - os.system("etc-proposals") + Popen("etc-proposals") + +def etc_prop_menu (*args, **kwargs): + if not am_i_root(): + not_root_dialog() + else: + Popen("etc-proposals") -- cgit v1.2.3-54-g00ecf