diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-06-28 09:12:42 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2004-06-28 09:12:42 +0000 |
commit | 788bac9959099d28eea6daedb1fae6edb6525996 (patch) | |
tree | a61e252b5c51e8b800d2eaa09dddc3a70d61160c | |
parent | abf22756cd8ef55278e6f348760f44a0e0d6a72b (diff) | |
download | rpmdrake-788bac9959099d28eea6daedb1fae6edb6525996.tar rpmdrake-788bac9959099d28eea6daedb1fae6edb6525996.tar.gz rpmdrake-788bac9959099d28eea6daedb1fae6edb6525996.tar.bz2 rpmdrake-788bac9959099d28eea6daedb1fae6edb6525996.tar.xz rpmdrake-788bac9959099d28eea6daedb1fae6edb6525996.zip |
Don't show the "Update Media" button if we're not root
-rwxr-xr-x | rpmdrake | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -848,8 +848,12 @@ or you already installed all of them.")); } my $menu_treeview = Gtk2::Menu->new; - my @menu_treeview_actions = ([ 'reset_selection', N("Reset the selection") ], [ 'reload_pkg', N("Reload the packages list") ]); - $MODE ne 'remove' and push @menu_treeview_actions, [ 'update_sources', N("Update media") ]; + my @menu_treeview_actions = ( + [ 'reset_selection', N("Reset the selection") ], + [ 'reload_pkg', N("Reload the packages list") ], + ); + $MODE ne 'remove' && $> == 0 + and push @menu_treeview_actions, [ 'update_sources', N("Update media") ]; foreach (@menu_treeview_actions) { my ($action, $text) = @$_; my %action2fun; |