diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-12-29 07:48:32 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-12-29 07:48:32 +0000 |
commit | cfc6a1583b5d21d799f84f0539a8674b5986c10f (patch) | |
tree | 93e71ddc1a4b0349d4854af137734b0970f154e6 /perl-install/interactive | |
parent | 285341e1db0de6a88bf80636cd457f4e6a314d6a (diff) | |
download | drakx-cfc6a1583b5d21d799f84f0539a8674b5986c10f.tar drakx-cfc6a1583b5d21d799f84f0539a8674b5986c10f.tar.gz drakx-cfc6a1583b5d21d799f84f0539a8674b5986c10f.tar.bz2 drakx-cfc6a1583b5d21d799f84f0539a8674b5986c10f.tar.xz drakx-cfc6a1583b5d21d799f84f0539a8674b5986c10f.zip |
try to have a better layout (at least when embedded): let's have only one
scrollbar that scroll the whole window (in non embedded case, there's the
problem of the scrolled window size...)
Diffstat (limited to 'perl-install/interactive')
-rw-r--r-- | perl-install/interactive/gtk.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 5988d2091..39463e47e 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -632,19 +632,21 @@ sub ask_fromW { my $has = $wantedwidth > $width || $wantedheight > $height; $has_scroll ||= $has; - $has ? create_scrolled_window($w) : $w; + $has && !$::no_scroll ? create_scrolled_window($w) : $w; }; my $always_pack = $create_widgets->($always_total_size, @widgets_always); my $has_scroll_always = $has_scroll; my @adv = map { warp_text($_) } @{$common->{advanced_messages}}; + { local $::no_scroll = 1; $advanced_pack = gtkpack_(Gtk2::VBox->new(0,0), 0, '', (map { (0, Gtk2::Label->new($_)) } @adv), 0, Gtk2::HSeparator->new, 1, $create_widgets->($advanced_total_size, @widgets_advanced)); + } my @help = if_($common->{interactive_help}, [ N("Help"), sub { @@ -658,7 +660,7 @@ sub ask_fromW { my $buttons_pack = ($common->{ok} || !exists $common->{ok}) && $mainw->create_okcancel($common->{ok}, $common->{cancel}, '', @help, if_(@$l2, $advanced_button)); $pack->pack_start(gtkshow($always_pack), 1, 1, 0); - $advanced_pack = create_scrolled_window($advanced_pack, [ 'never', 'automatic' ], 'none'); + $advanced_pack = create_scrolled_window($advanced_pack, [ 'never', 'automatic' ], 'none') if !$::isEmbedded; $pack->pack_start($advanced_pack, 1, 1, 0) if @widgets_advanced; if ($buttons_pack) { if ($::isWizard && !$mainw->{pop_it} && $::isInstall) { @@ -667,7 +669,7 @@ sub ask_fromW { } $pack->pack_start(gtkshow($buttons_pack), 0, 0, 0); } - gtkadd($mainw->{window}, $pack); + gtkadd($mainw->{window}, $::isEmbedded ? create_scrolled_window($pack, [ 'automatic', 'automatic' ], 'none') : $pack); $set_default_size->() if $has_scroll_always; $set_advanced->($common->{advanced_state}); |