aboutsummaryrefslogtreecommitdiffstats
path: root/edit-urpm-sources.pl
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-23 03:01:42 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-08-23 03:01:42 +0000
commitb77ca44b239a9a8458c96576d5f1f60cfcca3d00 (patch)
treed576e2fbc8cb01840b17f0cf79b02631c4dc8b0b /edit-urpm-sources.pl
parente31c4c5be1a77b44c8461dbf18b860488ae2b430 (diff)
downloadrpmdrake-b77ca44b239a9a8458c96576d5f1f60cfcca3d00.tar
rpmdrake-b77ca44b239a9a8458c96576d5f1f60cfcca3d00.tar.gz
rpmdrake-b77ca44b239a9a8458c96576d5f1f60cfcca3d00.tar.bz2
rpmdrake-b77ca44b239a9a8458c96576d5f1f60cfcca3d00.tar.xz
rpmdrake-b77ca44b239a9a8458c96576d5f1f60cfcca3d00.zip
Fix bug #10878: invert buttons in add media and edit media dialogs
Diffstat (limited to 'edit-urpm-sources.pl')
-rwxr-xr-xedit-urpm-sources.pl66
1 files changed, 38 insertions, 28 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl
index b9243814..1751abcb 100755
--- a/edit-urpm-sources.pl
+++ b/edit-urpm-sources.pl
@@ -135,30 +135,40 @@ really want to replace it?"), yesno => 1) or return 0;
};
my ($type, $probe, %i, %make_url);
- gtkadd($w->{window},
- gtkpack(Gtk2::VBox->new(0,5),
- Gtk2::Label->new(N("Adding a medium:")),
- gtkpack__(Gtk2::HBox->new(0, 0), Gtk2::Label->new(but(N("Type of medium:"))), @modes_buttons),
- $notebook,
- Gtk2::HSeparator->new,
- gtkpack(create_hbox(),
- gtksignal_connect(Gtk2::Button->new(N("Ok")), clicked => sub {
- if ($checkok->()) {
- $w->{retval} = { nb => $notebook->get_current_page };
- $type = $radios_names_ordered[$w->{retval}{nb}];
- my $info = $radios_infos{$type};
- %i = (name => $info->{name_entry}->get_text, url => $info->{url_entry}->get_text, hdlist => $info->{hdlist_entry}->get_text);
- %make_url = (local => "file:/$i{url}", http => $i{url}, security => $i{url}, removable => "removable:/$i{url}");
- $i{url} =~ s|^ftp://||;
- $make_url{ftp} = sprintf "ftp://%s%s", $info->{login_check}->get_active
- ? ($info->{login_entry}->get_text.':'.$info->{pass_entry}->get_text.'@')
- : '',
- $i{url};
- $probe = $info->{hdlist_check}->get_active == 0 || $i{hdlist} eq '';
- Gtk2->main_quit;
- }
- }),
- gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }))));
+ gtkadd(
+ $w->{window},
+ gtkpack(
+ Gtk2::VBox->new(0,5),
+ Gtk2::Label->new(N("Adding a medium:")),
+ gtkpack__(Gtk2::HBox->new(0, 0), Gtk2::Label->new(but(N("Type of medium:"))), @modes_buttons),
+ $notebook,
+ Gtk2::HSeparator->new,
+ gtkpack(
+ create_hbox(),
+ gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $w->{retval} = 0; Gtk2->main_quit }),
+ gtksignal_connect(
+ Gtk2::Button->new(N("Ok")), clicked => sub {
+ if ($checkok->()) {
+ $w->{retval} = { nb => $notebook->get_current_page };
+ $type = $radios_names_ordered[$w->{retval}{nb}];
+ my $info = $radios_infos{$type};
+ %i = (name => $info->{name_entry}->get_text, url => $info->{url_entry}->get_text, hdlist => $info->{hdlist_entry}->get_text);
+ %make_url = (local => "file:/$i{url}", http => $i{url}, security => $i{url}, removable => "removable:/$i{url}");
+ $i{url} =~ s|^ftp://||;
+ $make_url{ftp} = sprintf "ftp://%s%s",
+ $info->{login_check}->get_active
+ ? ($info->{login_entry}->get_text.':'.$info->{pass_entry}->get_text.'@')
+ : '',
+ $i{url};
+ $probe = $info->{hdlist_check}->get_active == 0 || $i{hdlist} eq '';
+ Gtk2->main_quit;
+ }
+ },
+ ),
+ ),
+ ),
+ );
+
if ($w->main) {
if (member($i{name}, map { $_->{name} } @{$urpm->{media}})) {
standalone::explanations("Removing medium $i{name}");
@@ -211,6 +221,10 @@ sub edit_callback {
0, gtkpack(
create_hbox(),
gtksignal_connect(
+ Gtk2::Button->new(N("Cancel")),
+ clicked => sub { $w->{retval} = 0; Gtk2->main_quit },
+ ),
+ gtksignal_connect(
Gtk2::Button->new(N("Save changes")),
clicked => sub {
$w->{retval} = 1;
@@ -219,10 +233,6 @@ sub edit_callback {
},
),
gtksignal_connect(
- Gtk2::Button->new(N("Cancel")),
- clicked => sub { $w->{retval} = 0; Gtk2->main_quit },
- ),
- gtksignal_connect(
Gtk2::Button->new(N("Proxy...")),
clicked => sub { proxy_callback($medium) },
),