diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-01-15 16:51:23 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-01-15 16:51:23 +0000 |
commit | cf38b5b6fc6b667f10b405a41952b790cd761b88 (patch) | |
tree | 55219d5f36cc5823ea17c3ec46a512bcd9bea15e | |
parent | 548ea2cdcdb1f3704b92a41663ed9baefb92089c (diff) | |
download | drakx-cf38b5b6fc6b667f10b405a41952b790cd761b88.tar drakx-cf38b5b6fc6b667f10b405a41952b790cd761b88.tar.gz drakx-cf38b5b6fc6b667f10b405a41952b790cd761b88.tar.bz2 drakx-cf38b5b6fc6b667f10b405a41952b790cd761b88.tar.xz drakx-cf38b5b6fc6b667f10b405a41952b790cd761b88.zip |
- move set_main_window_size() from ugtk2 to mygtk2
- call it in MagicWindow creation
-rw-r--r-- | perl-install/interactive/gtk.pm | 2 | ||||
-rw-r--r-- | perl-install/mygtk2.pm | 8 | ||||
-rw-r--r-- | perl-install/ugtk2.pm | 10 |
3 files changed, 9 insertions, 11 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 8c4c3b6b4..0457991d4 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -597,7 +597,7 @@ sub ask_fromW { $mainw->{box_allow_grow} = 1; my $pack = create_box_with_title($mainw, @{$common->{messages}}); - ugtk2::set_main_window_size($mainw->{rwindow}) if $mainw->{pop_it} && (@$l || $mainw->{box_size} == 200); + mygtk2::set_main_window_size($mainw->{rwindow}) if $mainw->{pop_it} && (@$l || $mainw->{box_size} == 200); my @before_widgets_advanced = ( (map { { grow => 0, real_w => Gtk2::WrappedLabel->new($_) } } @{$common->{advanced_messages}}), diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index 3f6897899..fe6a0c629 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -481,6 +481,9 @@ sub _gtk__MagicWindow { %$opts = (); } + set_main_window_size($::WizardWindow); + $sub_child->set_border_width(10); + $w = $::WizardWindow; gtkadd($::WizardTable, children_loose => [ $sub_child ]); } @@ -788,6 +791,11 @@ sub _text_insert { $textview; } +sub set_main_window_size { + my ($window) = @_; + my ($width, $height) = $::isInstall ? ($::real_windowwidth, $::real_windowheight) : $::isWizard ? (540, 360) : (600, 400); + $window->set_size_request($width, $height); +} my @icon_paths; sub add_icon_path { push @icon_paths, @_ } diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 4e9aaa765..24b0ab6f5 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -826,7 +826,6 @@ sub wrap_paragraph { sub new { my ($type, $title, %opts) = @_; - my $o = bless { %opts }, $type; while (my $e = shift @tempory::objects) { $e->destroy } @@ -843,17 +842,8 @@ sub new { $o->{rwindow} = $o->{window} = $window; $o->{pop_it} = $window->{pop_it}; - if (!$o->{pop_it}) { - set_main_window_size($o->{window}); - $o->{window}->set_border_width(10); - } $o; } -sub set_main_window_size { - my ($window) = @_; - my ($width, $height) = $::isInstall ? ($::real_windowwidth, $::real_windowheight) : $::isWizard ? (540, 360) : (600, 400); - $window->set_size_request($width, $height); -} sub main { my ($o, $o_completed, $o_canceled) = @_; |