diff options
-rwxr-xr-x | edit-urpm-sources.pl | 39 | ||||
-rw-r--r-- | rpmdrake.spec | 8 |
2 files changed, 30 insertions, 17 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl index 9f49b43c..e2fc0347 100755 --- a/edit-urpm-sources.pl +++ b/edit-urpm-sources.pl @@ -85,25 +85,34 @@ sub add_callback { } }))); }; + my $tips = Gtk2::Tooltips->new; + my $checkbut_entry = sub { + my ($name, $label, $visibility, $callback, $tip) = @_; + [ gtkpack_(Gtk2::HBox->new(0, 0), + 1, Gtk2::Label->new, + 0, gtksignal_connect($info->{$name.'_check'} = gtkset_tip($tips, Gtk2::CheckButton->new($label), $tip), + clicked => sub { $info->{$name.'_entry'}->set_sensitive($_[0]->get_active); + $callback and $callback->(@_); + })), + gtkset_visibility(gtkset_sensitive($info->{$name.'_entry'} = gtkentry(), 0), $visibility) ]; + }; my $loginpass_entries = sub { - map { my $entry_name = $_->[0]; - [ gtkpack_(Gtk2::HBox->new(0, 0), - 1, Gtk2::Label->new, - 0, gtksignal_connect($info->{$_->[0].'_check'} = Gtk2::CheckButton->new($_->[1]), - clicked => sub { $info->{$entry_name.'_entry'}->set_sensitive($_[0]->get_active); - $info->{pass_check}->set_active($_[0]->get_active); - $info->{login_check}->set_active($_[0]->get_active); - }), - 1, Gtk2::Label->new), - gtkset_visibility(gtkset_sensitive($info->{$_->[0].'_entry'} = gtkentry(), 0), $_->[2]) ] } - ([ 'login', N("Login:"), 1 ], [ 'pass', N("Password:"), 0 ]) + map { + $checkbut_entry->(@$_, sub { + $info->{pass_check}->set_active($_[0]->get_active); + $info->{login_check}->set_active($_[0]->get_active); + }) + } ([ 'login', N("Login:"), 1 ], [ 'pass', N("Password:"), 0 ]) }; my $nb = $count_nbs++; gtksignal_connect($_[1], 'clicked' => sub { $_[0]->get_active and $notebook->set_current_page($nb) }); $notebook->append_page(my $book = create_packtable({}, - [ N("Name:"), $info->{name_entry} = gtkentry($_[0] eq 'security' and 'update_source') ], - [ $info->{url}, $url_entry->() ], - [ N("Relative path to synthesis/hdlist:"), $info->{hdlist_entry} = gtkentry() ], + [ gtkset_alignment(Gtk2::Label->new(N("Name:")), 1, 0.5), + $info->{name_entry} = gtkentry($_[0] eq 'security' and 'update_source') ], + [ gtkset_alignment(Gtk2::Label->new($info->{url}), 1, 0.5), + $url_entry->() ], + $checkbut_entry->('hdlist', N("Relative path to synthesis/hdlist:"), 1, undef, + N("If left blank, synthesis/hdlist will be automatically probed")), if_($info->{loginpass}, $loginpass_entries->()))); $book->show; } \@radios_names_ordered, \@modes_buttons; @@ -152,7 +161,7 @@ really want to replace it?"), yesno => 1) or return 0; $urpm->remove_selected_media; } add_medium_and_check($urpm, N("Please wait, adding medium..."), - { probe_with_hdlist => $i{hdlist} eq '' }, + { probe_with_hdlist => $info->{hdlist_check}->get_active && $i{hdlist} eq '' }, $i{name}, $make_url{$type}, $i{hdlist}, update => $type eq 'security'); return 1; } diff --git a/rpmdrake.spec b/rpmdrake.spec index e05c7cde..3b199820 100644 --- a/rpmdrake.spec +++ b/rpmdrake.spec @@ -16,7 +16,7 @@ Release: %{release} License: GPL Source0: %name-%version.tar.bz2 Summary: Mandrake Linux graphical front end for choosing packages for installion/removal -Requires: perl-MDK-Common >= 1.0.4-13mdk urpmi >= 4.3-15mdk gurpmi >= 4.3-9mdk perl-URPM >= 0.90-7mdk drakxtools > 9.2-0.26mdk rpmtools >= 4.5 +Requires: perl-MDK-Common >= 1.0.4-13mdk urpmi >= 4.3-15mdk gurpmi >= 4.3-9mdk perl-URPM >= 0.90-7mdk drakxtools > 9.2-0.28mdk rpmtools >= 4.5 Requires: perl-Gtk2 >= 0.90-6mdk perl-Locale-gettext >= 1.01-7mdk BuildRequires: libcurl2-devel >= 7.10.3-2mdk gettext openssl-devel perl-devel BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot @@ -101,7 +101,7 @@ rm -rf $RPM_BUILD_ROOT %{perl_vendorarch}/*.pm %changelog -* Thu Aug 7 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-31mdk +* Fri Aug 8 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-31mdk - require root capability when run "Install Sofware" and add a new menu entry reading "Browse Available Software" - s/Medias/Media/ in the program name of the menu entry @@ -113,6 +113,10 @@ rm -rf $RPM_BUILD_ROOT - when updating media, if url is too long, don't display it because it enlarges much the dialog; better display only the basename and the medium name (#4338) +- edit-urpmi-media/add: + - right-align left labels + - use a checkbutton for "hdlist" so that user better understands + it's optional (and say in a tooltip that it is) * Mon Aug 4 2003 Guillaume Cottenceau <gc@mandrakesoft.com> 2.1-30mdk - revert "use checkboxes instead of icons" |