diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-19 18:42:24 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2005-01-19 18:42:24 +0000 |
commit | 8c9c0efd525c984805edba83131a9e118952011e (patch) | |
tree | 550721cccec5275eb4120039acf7d3f015787b91 | |
parent | 36e4dcac8ecdefa80f313a8484d072d2deab22c9 (diff) | |
download | urpmi-8c9c0efd525c984805edba83131a9e118952011e.tar urpmi-8c9c0efd525c984805edba83131a9e118952011e.tar.gz urpmi-8c9c0efd525c984805edba83131a9e118952011e.tar.bz2 urpmi-8c9c0efd525c984805edba83131a9e118952011e.tar.xz urpmi-8c9c0efd525c984805edba83131a9e118952011e.zip |
Make gurpmi save srpms
-rw-r--r-- | gurpmi | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -116,12 +116,13 @@ Proceed?", join "\n", @all_rpms) my $file_dialog = Gtk2::FileSelection->new(N("Choose location to save file")); $file_dialog->set_modal(1); $file_dialog->set_position('center'); - $file_dialog->set_filename($rpms->[0]); #- TODO must work for srpms too + my $filename = @$srpms > 0 ? $srpms->[0] : $rpms->[0]; + $file_dialog->set_filename($filename); $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; + $location and exec '/bin/mv', '-f', $filename, $location; }); $file_dialog->cancel_button->signal_connect(clicked => \&quit); $file_dialog->show; |