summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-01-12 11:39:57 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-01-12 11:39:57 +0000
commitce0184af7c178f0064fa6792921b1035fddcb075 (patch)
treed197ccf266959fdfd76b07ced2cf1917fd13ef67 /perl-install
parent73358ccfa7f407a2afb6f4c87606c64f20e3f5a7 (diff)
downloaddrakx-ce0184af7c178f0064fa6792921b1035fddcb075.tar
drakx-ce0184af7c178f0064fa6792921b1035fddcb075.tar.gz
drakx-ce0184af7c178f0064fa6792921b1035fddcb075.tar.bz2
drakx-ce0184af7c178f0064fa6792921b1035fddcb075.tar.xz
drakx-ce0184af7c178f0064fa6792921b1035fddcb075.zip
fix applications layout:
- remove spurious empty boxes - fix layout (aka do not uselessly resize main window) - sanitize layout (put legal warning between title and application list) - "[X] label" packing looks quite a less uglier than "label [X]"
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakfont87
1 files changed, 30 insertions, 57 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index c4d728fd5..644acabde 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -643,70 +643,43 @@ sub help() {
sub appli_choice() {
my $choice_box;
- my $text = Gtk2::TextView->new;
+ my %checks;
gtkpack($font_box,
- $choice_box = gtkpack_(Gtk2::HBox->new(0, 10),
- 0, Gtk2::VBox->new(0, 10),
- 0, Gtk2::VBox->new(0, 10),
- 1, gtkpack_(Gtk2::VBox->new(0, 10),
- 1, gtkpack_(Gtk2::VBox->new(0, 10),
- 1, gtkpack(Gtk2::HBox->new(0, 10),
- Gtk2::HBox->new(0, 10),
- N("Choose the applications that will support the fonts:"),
- Gtk2::HBox->new(0, 10),
- ),
- 0, Gtk2::HBox->new(0, 10),
- 0, gtkpack_(Gtk2::HBox->new(0, 10),
- 0, N("Ghostscript"),
- 1, Gtk2::HBox->new(0, 10),
- 0, my $check11 = Gtk2::CheckButton->new(),
- ),
- 0, gtkpack_(Gtk2::HBox->new(0, 10),
- 0, N("StarOffice"),
- 1, Gtk2::HBox->new(0, 10),
- 0, my $check22 = Gtk2::CheckButton->new(),
- ),
- 0, gtkpack_(Gtk2::HBox->new(0, 10),
- 0, N("Abiword"),
- 1, Gtk2::HBox->new(0, 10),
- 0, my $check33 = Gtk2::CheckButton->new(),
- ),
- 0, gtkpack_(Gtk2::HBox->new(0, 10),
- 0, N("Generic Printers"),
- 1, Gtk2::HBox->new(0, 10),
- 0, my $check44 = Gtk2::CheckButton->new(),
- ),
- ),
- 0, gtkpack_(Gtk2::HBox->new(0, 10),
- 1, gtktext_insert(gtkset_editable($text, 0),
- [ [ N("Before installing any fonts, be sure that you have the right to use and install them on your system.\n\n-You can install the fonts the normal way. In rare cases, bogus fonts may hang up your X Server.") ] ]
- ),
- 0, Gtk2::VBox->new(0, 10),
- ),
- 0, gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'spread'),
- gtksignal_connect(Gtk2::Button->new(N("OK")),
- clicked => sub {
- $$central_widget->destroy;
- import_status();
- }),
- gtksignal_connect(Gtk2::Button->new(N("Cancel")),
- clicked => sub {
- @install = ();
- $$central_widget->destroy;
- create_fontsel();
- }),
- ),
+ $choice_box = gtkpack__(Gtk2::VBox->new,
+ N("Choose the applications that will support the fonts:"),
+ Gtk2::WrappedLabel->new(N("Before installing any fonts, be sure that you have the right to use and install them on your system.\n\n-You can install the fonts the normal way. In rare cases, bogus fonts may hang up your X Server.")),
+ (map {
+ gtkpack_(Gtk2::HBox->new,
+ 0, $_->[0],
+ 1, Gtk2::HBox->new,
+ 0, $checks{$_->[1]} = Gtk2::CheckButton->new,
+ ),
+ } ([ N("Ghostscript"), "11" ],
+ [ N("StarOffice"), "22" ],
+ [ N("Abiword"), "33" ],
+ [ N("Generic Printers"), "44" ],
),
- 0, Gtk2::VBox->new(0, 10),
- 0, Gtk2::VBox->new(0, 10),
- ),
+ ),
+ gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'spread'),
+ gtksignal_connect(Gtk2::Button->new(N("OK")),
+ clicked => sub {
+ $$central_widget->destroy;
+ import_status();
+ }),
+ gtksignal_connect(Gtk2::Button->new(N("Cancel")),
+ clicked => sub {
+ @install = ();
+ $$central_widget->destroy;
+ create_fontsel();
+ }),
+ ),
+ ),
);
- foreach ([ $check11, \$gs ], [ $check22, \$so ], [ $check33, \$abi ], [ $check44, \$printer ]) {
+ foreach ([ $checks{11}, \$gs ], [ $checks{22}, \$so ], [ $checks{33}, \$abi ], [ $checks{44}, \$printer ]) {
my $ref = $_->[1];
gtksignal_connect(gtkset_active($_->[0], $$ref), toggled => sub { $$ref = $$ref ? 0 : 1 });
}
$central_widget = \$choice_box;
- $font_box->show_all;
}
my $select_font_msg;