summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-12 14:30:50 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-12 14:30:50 +0000
commit035cb5489a0115eca20ca0891ea0dde602449c79 (patch)
tree886847cdf52fb8a8bc697cdb06869e6af47c92c9 /perl-install/diskdrake
parentdc773b20f235a616789b6bb2bf38e53e623d840a (diff)
downloaddrakx-backup-do-not-use-035cb5489a0115eca20ca0891ea0dde602449c79.tar
drakx-backup-do-not-use-035cb5489a0115eca20ca0891ea0dde602449c79.tar.gz
drakx-backup-do-not-use-035cb5489a0115eca20ca0891ea0dde602449c79.tar.bz2
drakx-backup-do-not-use-035cb5489a0115eca20ca0891ea0dde602449c79.tar.xz
drakx-backup-do-not-use-035cb5489a0115eca20ca0891ea0dde602449c79.zip
(per_entry_action_box)
- sanitieze buttons packing (do not eat extra space) - get rid of groupby2
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r--perl-install/diskdrake/smbnfs_gtk.pm20
1 files changed, 11 insertions, 9 deletions
diff --git a/perl-install/diskdrake/smbnfs_gtk.pm b/perl-install/diskdrake/smbnfs_gtk.pm
index 8c414f9d5..5e5d114cf 100644
--- a/perl-install/diskdrake/smbnfs_gtk.pm
+++ b/perl-install/diskdrake/smbnfs_gtk.pm
@@ -76,16 +76,18 @@ sub per_entry_action_box {
if_($entry->{mntpoint} && !$entry->{isMounted}, N_("Mount"))) if $entry;
my @l = (
- if_($entry, N_("Mount point") => \&raw_hd_mount_point),
- if_($entry && $entry->{mntpoint}, N_("Options") => \&raw_hd_options),
- N_("Cancel") => sub {},
- N_("Done") => \&done,
- );
+ if_([ $entry, N_("Mount point") => \&raw_hd_mount_point ]),
+ if_([ $entry && $entry->{mntpoint}, N_("Options") => \&raw_hd_options ]),
+ [ N_("Cancel") => sub {} ],
+ [ "" ],
+ [ N_("Done") => \&done ],
+ );
push @buttons, map {
- my ($txt, $f) = @$_;
- gtksignal_connect(Gtk2::Button->new(translate($txt)), clicked => sub { try_($kind, $txt, $f, $entry) });
- } group_by2(@l);
-
+ my ($txt, $f) = @$_;
+ $f ? gtksignal_connect(Gtk2::Button->new(translate($txt)), clicked => sub { try_($kind, $txt, $f, $entry) })
+ : Gtk2::Label->new("");
+ } @l;
+
gtkadd($box, gtkpack(Gtk2::HBox->new(0,0), @buttons));
}