diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-08-19 13:25:45 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-08-19 13:25:45 +0000 |
commit | cea52afa78bd7e14d8524a63c9e61fd55ada0eed (patch) | |
tree | 12b13813d8d915ded55ba620ae38154529f7b076 /perl-install | |
parent | 2152543d8f6d9b544db91a4f7212892a291418d6 (diff) | |
download | drakx-cea52afa78bd7e14d8524a63c9e61fd55ada0eed.tar drakx-cea52afa78bd7e14d8524a63c9e61fd55ada0eed.tar.gz drakx-cea52afa78bd7e14d8524a63c9e61fd55ada0eed.tar.bz2 drakx-cea52afa78bd7e14d8524a63c9e61fd55ada0eed.tar.xz drakx-cea52afa78bd7e14d8524a63c9e61fd55ada0eed.zip |
(create_okcancel) enable to get already initialized Gtk2::Buttons
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/ugtk2.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 3c7dbc2ba..890ce93b6 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -525,7 +525,9 @@ sub create_okcancel { my $wm = any::running_window_manager(); $wm_is_kde = !$::isInstall && ($wm eq "kwin" || $wm eq "compiz" && fuzzy_pidofs(qr/\bkde-window-decorator\b/)) || 0; } - my $f = sub { $w->{buttons}{$_[0][0]} = gtknew('Button', text => $_[0][0], clicked => $_[0][1]) }; + my $f = sub { $w->{buttons}{$_[0][0]} = ref($_[0][0]) =~ /Gtk2::Button/ ? + $_[0][0] : + gtknew('Button', text => $_[0][0], clicked => $_[0][1]) }; my @left = ((map { $f->($_) } grep { $_->[2] && !$_->[3] } @other), map { $f->($_) } grep { !$_->[2] && !$_->[3] } @other); my @right = ((map { $f->($_) } grep { $_->[2] && $_->[3] } @other), |