From 12ca44ab517108c69d7b3cbb9e282526099c4291 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 4 Jul 2006 12:07:20 +0000 Subject: nicer alignment --- edit-urpm-sources.pl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl index 32a8fa2d..4d28697f 100755 --- a/edit-urpm-sources.pl +++ b/edit-urpm-sources.pl @@ -139,6 +139,8 @@ sub add_callback { my $notebook = Gtk2::Notebook->new; $notebook->set_show_tabs(0); $notebook->set_show_border(0); my ($count_nbs, %pages); + my $size_group = Gtk2::SizeGroup->new('horizontal'); + my ($cb1, $cb2); map { my $info = $radios_infos{$_}; my $url_entry = sub { @@ -157,7 +159,7 @@ sub add_callback { my $tips = Gtk2::Tooltips->new; my $checkbut_entry = sub { my ($name, $label, $visibility, $callback, $tip) = @_; - [ gtksignal_connect( + my $w = [ gtksignal_connect( $info->{$name . '_check'} = gtkset_tip($tips, Gtk2::CheckButton->new($label), $tip), clicked => sub { $info->{$name . '_entry'}->set_sensitive($_[0]->get_active); @@ -165,6 +167,8 @@ sub add_callback { }, ), gtkset_visibility(gtkset_sensitive($info->{$name . '_entry'} = gtkentry(), 0), $visibility) ]; + $size_group->add_widget($info->{$name . '_check'}); + $w; }; my $loginpass_entries = sub { map { @@ -194,7 +198,7 @@ sub add_callback { if_($info->{loginpass}, $loginpass_entries->()), sub { [ gtksignal_connect( - $info->{distrib_check} = Gtk2::CheckButton->new(N("Create media for a whole distribution")), + $info->{distrib_check} = $cb1 = Gtk2::CheckButton->new(N("Create media for a whole distribution")), clicked => sub { if ($_[0]->get_active) { $info->{hdlist_entry}->set_sensitive(0); @@ -205,11 +209,12 @@ sub add_callback { ]; }->(), sub { - [ $info->{update_check} = Gtk2::CheckButton->new(N("Search this media for updates")) ]; + [ $info->{update_check} = $cb2 = Gtk2::CheckButton->new(N("Search this media for updates")) ]; }->(), )) ); } @radios_names_ordered; + $size_group->add_widget($_) foreach $cb1, $cb2; my $checkok = sub { my $info = $radios_infos{$radios_names_ordered[$notebook->get_current_page]}; -- cgit v1.2.1