diff options
author | necoro <> | 2007-03-31 19:29:26 +0000 |
---|---|---|
committer | necoro <> | 2007-03-31 19:29:26 +0000 |
commit | 2d2f6823f5360a5287b4b19d035cad4a5611fa3a (patch) | |
tree | c108aee3dd9a34c1c7dbc68ed87ff4cc65078593 /portato/plugins | |
parent | 5138b1e23d34e0a72e0c2f4ae52256e14d825320 (diff) | |
download | portato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.tar.gz portato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.tar.bz2 portato-2d2f6823f5360a5287b4b19d035cad4a5611fa3a.zip |
Allowed Plugins to have a menu
Diffstat (limited to 'portato/plugins')
-rw-r--r-- | portato/plugins/etc_proposals.py | 14 |
1 files changed, 11 insertions, 3 deletions
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 <necoro@necoro.net> -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") |