diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-01-16 10:06:29 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-01-16 10:06:29 +0000 |
commit | ed3155ca30f20826bc945dd629e7bf8b92b8f096 (patch) | |
tree | c452e744db91a351ae7f173244f667774bdc40f1 /perl-install | |
parent | c35a2b86abf97d731357119fafda7db4670e35ca (diff) | |
download | drakx-backup-do-not-use-ed3155ca30f20826bc945dd629e7bf8b92b8f096.tar drakx-backup-do-not-use-ed3155ca30f20826bc945dd629e7bf8b92b8f096.tar.gz drakx-backup-do-not-use-ed3155ca30f20826bc945dd629e7bf8b92b8f096.tar.bz2 drakx-backup-do-not-use-ed3155ca30f20826bc945dd629e7bf8b92b8f096.tar.xz drakx-backup-do-not-use-ed3155ca30f20826bc945dd629e7bf8b92b8f096.zip |
MagicWindow:
- hide is done on the window if popped
- show is done on both the window and the child
(to handle initial show on the window, and show after a hide on the child)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/mygtk2.pm | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index fe6a0c629..b3d5eace6 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -616,20 +616,23 @@ sub _gtknew_handle_children { #- * if the {child} doesn't handle the method, we try with the {real_window} #- (eg : add_accel_group set_position set_default_size #- * a few methods are handled specially -my %for_real_window = map { $_ => 1 } qw(show); +my %for_real_window = map { $_ => 1 } qw(); sub mygtk2::MagicWindow::AUTOLOAD { my ($w, @args) = @_; my ($meth) = $mygtk2::MagicWindow::AUTOLOAD =~ /mygtk2::MagicWindow::(.*)/; - my $s = $meth eq 'destroy' && $w->{pop_it} || - $for_real_window{$meth} || + my @s = $meth eq 'show' + ? ('real_window', 'child') : + $w->{pop_it} && ($meth eq 'destroy' || $meth eq 'hide') || + $for_real_window{$meth} || !$w->{child}->can($meth) - ? 'real_window' : 'child'; + ? 'real_window' + : 'child'; -#- warn "mygtk2::MagicWindow::$meth on $s (@args)\n"; +#- warn "mygtk2::MagicWindow::$meth", first($w =~ /HASH(.*)/), " on $s (@args)\n"; - $w->{$s}->$meth(@args); + $w->{$_}->$meth(@args) foreach @s; } sub _create_Window { |