aboutsummaryrefslogtreecommitdiffstats
path: root/modules/rpmdragora
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2016-03-13 21:24:03 +0100
committerAngelo Naselli <anaselli@linux.it>2016-03-13 21:24:03 +0100
commit8cb709b21c9eb967300eed54858813e476c26cfe (patch)
tree9e7efb7ec33665256987805ef27a935d7da96114 /modules/rpmdragora
parent060de5a447f3e308af4ebee260b5cc2768edd156 (diff)
downloadmanatools-8cb709b21c9eb967300eed54858813e476c26cfe.tar
manatools-8cb709b21c9eb967300eed54858813e476c26cfe.tar.gz
manatools-8cb709b21c9eb967300eed54858813e476c26cfe.tar.bz2
manatools-8cb709b21c9eb967300eed54858813e476c26cfe.tar.xz
manatools-8cb709b21c9eb967300eed54858813e476c26cfe.zip
Disabled apply button if user is not root
Diffstat (limited to 'modules/rpmdragora')
-rwxr-xr-xmodules/rpmdragora/rpmdragora4
1 files changed, 4 insertions, 0 deletions
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);