diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-10-06 19:21:53 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-10-06 19:21:53 +0000 |
commit | dd270712ddaeaff4f1a4afd9c3447824b8fc7317 (patch) | |
tree | a0f5c82831485cc0e6919a04ce3db17da090e40f | |
parent | a4aca13e1a42b4db1c958f879721ca9abb03086f (diff) | |
download | rpmdrake-dd270712ddaeaff4f1a4afd9c3447824b8fc7317.tar rpmdrake-dd270712ddaeaff4f1a4afd9c3447824b8fc7317.tar.gz rpmdrake-dd270712ddaeaff4f1a4afd9c3447824b8fc7317.tar.bz2 rpmdrake-dd270712ddaeaff4f1a4afd9c3447824b8fc7317.tar.xz rpmdrake-dd270712ddaeaff4f1a4afd9c3447824b8fc7317.zip |
(run_drakbug) factorize code
-rw-r--r-- | Rpmdrake/edit_urpm_sources.pm | 2 | ||||
-rwxr-xr-x | rpmdrake | 2 | ||||
-rw-r--r-- | rpmdrake.pm | 6 |
3 files changed, 8 insertions, 2 deletions
diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index d4d31887..a17a4c77 100644 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -964,7 +964,7 @@ sub mainwindow() { [ N("/_Options") . N("/P_roxy"), N("<control>R"), \&proxy_callback, undef, '<Item>' ], if_($0 =~ /edit-urpm-sources/, [ N("/_Help"), undef, undef, undef, '<Branch>' ], - [ N("/_Help") . N("/_Report Bug"), undef, sub { run_program::raw({ detach => 1 }, 'drakbug', '--report', 'edit-urpm-sources.pl') }, undef, '<Item>' ], + [ N("/_Help") . N("/_Report Bug"), undef, sub { run_drakbug('edit-urpm-sources.pl') }, undef, '<Item>' ], [ N("/_Help") . N("/_Help"), undef, sub { rpmdrake::open_help('sources') }, undef, '<Item>' ], [ N("/_Help") . N("/_About..."), undef, sub { my $license = formatAlaTeX(translate($::license)); @@ -567,7 +567,7 @@ sub run_treeview_dialog { [ N("/_View") . '/' . $modes{$_}, undef, sub { $view_callback->($val) }, 0, $type ]; } qw(flat by_group by_leaves by_presence by_selection by_size by_source)), [ N("/_Help"), undef, undef, undef, '<Branch>' ], - [ N("/_Help") . N("/_Report Bug"), undef, sub { run_program::raw({ detach => 1 }, 'drakbug', '--report', 'rpmdrake') }, undef, '<Item>' ], + [ N("/_Help") . N("/_Report Bug"), undef, sub { run_drakbug('rpmdrake') }, undef, '<Item>' ], [ N("/_Help") . N("/_Help"), undef, sub { rpmdrake::open_help('') }, undef, '<Item>' ], [ N("/_Help") . N("/_About..."), undef, sub { my $license = formatAlaTeX(translate($::license)); diff --git a/rpmdrake.pm b/rpmdrake.pm index 0c3ac574..aa3e6241 100644 --- a/rpmdrake.pm +++ b/rpmdrake.pm @@ -75,6 +75,7 @@ our @EXPORT = qw( myexit readconf remove_wait_msg + run_drakbug show_urpm_progress slow_func slow_func_statusbar @@ -944,6 +945,11 @@ sub open_help { statusbar_msg(N("The help window has been started, it should appear shortly on your desktop."), 1); } +sub run_drakbug { + my ($id) = @_; + run_program::raw({ detach => 1 }, 'drakbug', '--report', $id); +} + sub strip_first_underscore { join '', map { s/_//; $_ } @_ } 1; |