aboutsummaryrefslogtreecommitdiffstats
path: root/edit-urpm-sources.pl
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-07-04 12:06:26 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-07-04 12:06:26 +0000
commitd7047aebbaac58a612b953971d6e214a758ef379 (patch)
treebf664c3180aec6517ee46da12fc8f7c72fe1f7c6 /edit-urpm-sources.pl
parent486a34293d3debe9544a1ae4622e21ae52009382 (diff)
downloadrpmdrake-d7047aebbaac58a612b953971d6e214a758ef379.tar
rpmdrake-d7047aebbaac58a612b953971d6e214a758ef379.tar.gz
rpmdrake-d7047aebbaac58a612b953971d6e214a758ef379.tar.bz2
rpmdrake-d7047aebbaac58a612b953971d6e214a758ef379.tar.xz
rpmdrake-d7047aebbaac58a612b953971d6e214a758ef379.zip
(add_callback) simplify and fix layout (#17716)
Diffstat (limited to 'edit-urpm-sources.pl')
-rwxr-xr-xedit-urpm-sources.pl33
1 files changed, 11 insertions, 22 deletions
diff --git a/edit-urpm-sources.pl b/edit-urpm-sources.pl
index 0c06fc77..239fb386 100755
--- a/edit-urpm-sources.pl
+++ b/edit-urpm-sources.pl
@@ -157,16 +157,12 @@ 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(
+ [ 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) ];
};
@@ -182,25 +178,23 @@ sub add_callback {
};
my $nb = $count_nbs++;
gtksignal_connect($_[1], 'clicked' => sub { $_[0]->get_active and $notebook->set_current_page($nb) });
- my $with_hdlist_checkbut_entry = $checkbut_entry->(
+ my $with_hdlist_checkbut_entry;
+ $with_hdlist_checkbut_entry = $checkbut_entry->(
'hdlist', N("Relative path to synthesis/hdlist:"), 1,
sub { $info->{distrib_check} and $_[0]->get_active and $info->{distrib_check}->set_active(0) },
N("If left blank, synthesis/hdlist will be automatically probed"),
);
$notebook->append_page(
- my $book = create_packtable(
- {},
- [ gtkset_alignment(Gtk2::Label->new(N("Name:")), 1, 0.5),
+ gtkshow(create_packtable(
+ { xpadding => , ypadding => 0 },
+ [ gtkset_alignment(Gtk2::Label->new(N("Name:")), 0, 0.5),
$info->{name_entry} = gtkentry('') ],
- [ gtkset_alignment(Gtk2::Label->new($info->{url}), 1, 0.5),
+ [ gtkset_alignment(Gtk2::Label->new($info->{url}), 0, 0.5),
$url_entry->() ],
$with_hdlist_checkbut_entry,
if_($info->{loginpass}, $loginpass_entries->()),
sub {
- [ gtkpack_(
- Gtk2::HBox->new(0, 0),
- 1, Gtk2::Label->new,
- 0, gtksignal_connect(
+ [ gtksignal_connect(
$info->{distrib_check} = Gtk2::CheckButton->new(N("Create media for a whole distribution")),
clicked => sub {
if ($_[0]->get_active) {
@@ -209,18 +203,13 @@ sub add_callback {
}
},
)
- ) ];
+ ];
}->(),
sub {
- [ gtkpack_(
- Gtk2::HBox->new(0, 0),
- 1, Gtk2::Label->new,
- 0, ($info->{update_check} = Gtk2::CheckButton->new(N("Search this media for updates"))),
- ) ];
+ [ $info->{update_check} = Gtk2::CheckButton->new(N("Search this media for updates")) ];
}->(),
- )
+ ))
);
- $book->show;
} \@radios_names_ordered, \@modes_buttons;
my $checkok = sub {