summaryrefslogtreecommitdiffstats
path: root/gurpmi
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-19 17:26:20 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-01-19 17:26:20 +0000
commit15a4df468b0947e82056d7aebe0acb171309ffce (patch)
tree1f7eec541dcfb63390a637c3c4672649f2dce6fc /gurpmi
parentbb1bc9b3acafa3145afa732efd9e6914d0b63831 (diff)
downloadurpmi-15a4df468b0947e82056d7aebe0acb171309ffce.tar
urpmi-15a4df468b0947e82056d7aebe0acb171309ffce.tar.gz
urpmi-15a4df468b0947e82056d7aebe0acb171309ffce.tar.bz2
urpmi-15a4df468b0947e82056d7aebe0acb171309ffce.tar.xz
urpmi-15a4df468b0947e82056d7aebe0acb171309ffce.zip
perl_checker fixes
Diffstat (limited to 'gurpmi')
-rw-r--r--gurpmi24
1 files changed, 11 insertions, 13 deletions
diff --git a/gurpmi b/gurpmi
index 97dcc166..3d42b780 100644
--- a/gurpmi
+++ b/gurpmi
@@ -134,7 +134,13 @@ Proceed?", join "\n", @all_rpms)
my $save_button = @all_rpms == 1 ? Gtk2::Button->new(but N("_Save")) : undef;
my $ccel_button = Gtk2::Button->new(but N("_Cancel"));
- $inst_button->signal_connect(clicked => \&do_install);
+ $inst_button->signal_connect(clicked => sub {
+ #- performs installation.
+ quit;
+ #- we need to switch to root if we're not already (via consolehelper)
+ #- yes. hardcoded paths. safe.
+ exec $> ? '/usr/bin/gurpmi2' : '/usr/sbin/gurpmi2', @ARGV;
+ });
$save_button and $save_button->signal_connect(clicked => sub {
my $file_dialog = Gtk2::FileSelection->new(N("Choose location to save file"));
$file_dialog->set_modal(1);
@@ -142,10 +148,10 @@ Proceed?", join "\n", @all_rpms)
$file_dialog->set_filename($rpms->[0]); #- TODO must work for srpms too
$file_dialog->hide_fileop_buttons;
$file_dialog->ok_button->signal_connect(clicked => sub {
- my $location = $file_dialog->get_filename;
- quit;
- $location and exec '/bin/mv', '-f', $rpms->[0], $location;
- });
+ my $location = $file_dialog->get_filename;
+ quit;
+ $location and exec '/bin/mv', '-f', $rpms->[0], $location;
+ });
$file_dialog->cancel_button->signal_connect(clicked => \&quit);
$file_dialog->show;
});
@@ -155,11 +161,3 @@ Proceed?", join "\n", @all_rpms)
$mainw->show_all;
Gtk2->main;
-
-#- Performs installation.
-sub do_install {
- quit;
- #- we need to switch to root if we're not already (via consolehelper)
- #- yes. hardcoded paths. safe.
- exec $> ? '/usr/bin/gurpmi2' : '/usr/sbin/gurpmi2', @ARGV;
-}