aboutsummaryrefslogtreecommitdiffstats
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
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
-rw-r--r--Changes1
-rwxr-xr-xmodules/rpmdragora/rpmdragora4
2 files changed, 5 insertions, 0 deletions
diff --git a/Changes b/Changes
index 4a567b0b..bbd018db 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,4 @@
+ - rpmdragora - disabled apply button if user is not root
- rpmdragora - fixed icons (removed rpmdrake deps)
- rpmdragora - Show details on first selected package also
- rpmdragora - when a new filter is given now packages are shown
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);