From 8cb709b21c9eb967300eed54858813e476c26cfe Mon Sep 17 00:00:00 2001 From: Angelo Naselli Date: Sun, 13 Mar 2016 21:24:03 +0100 Subject: Disabled apply button if user is not root --- modules/rpmdragora/rpmdragora | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/rpmdragora') diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora index 717d92b2..edab7f97 100755 --- a/modules/rpmdragora/rpmdragora +++ b/modules/rpmdragora/rpmdragora @@ -30,6 +30,7 @@ use File::ShareDir ':ALL'; use MDK::Common::Func qw(any if_ before_leaving); use utf8; +use English; use MDK::Common::DataStructure qw(uniq intersection); use MDK::Common::Various qw(to_bool first); @@ -654,6 +655,9 @@ sub _run_treeview_dialog { my $apply_button = $factory->createIconButton($hbox_footbar,"",$loc->N("&Apply")); $apply_button->setWeight(0,6); + # NOTE apply button is disabled if not root atm + # TODO use a method instead of testing uid # + $apply_button->setEnabled(0) if ($EUID != 0); my $QuitButton = $factory->createIconButton($hbox_footbar,"",$loc->N("&Quit")); $QuitButton->setWeight(0,6); -- cgit v1.2.1