aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-06-28 09:12:42 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-06-28 09:12:42 +0000
commit788bac9959099d28eea6daedb1fae6edb6525996 (patch)
treea61e252b5c51e8b800d2eaa09dddc3a70d61160c
parentabf22756cd8ef55278e6f348760f44a0e0d6a72b (diff)
downloadrpmdrake-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-xrpmdrake8
1 files changed, 6 insertions, 2 deletions
diff --git a/rpmdrake b/rpmdrake
index 49b08159..9af16e23 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -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;