From 9c3f2927cd33c5a905397d0caf9e4287c52f1359 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 31 Aug 2005 15:42:44 +0000 Subject: handle hide_ref and show_ref --- perl-install/mygtk2.pm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'perl-install/mygtk2.pm') diff --git a/perl-install/mygtk2.pm b/perl-install/mygtk2.pm index 504325003..5c79c5848 100644 --- a/perl-install/mygtk2.pm +++ b/perl-install/mygtk2.pm @@ -118,6 +118,13 @@ sub _gtk { $global_tooltips->set_tip($w, $tip); } + #- WARNING: hide_ref and show_ref are not effective until you gtkval_modify the ref + if (my $hide_ref = delete $opts->{hide_ref}) { + gtkval_register($w, $hide_ref, sub { $$hide_ref ? $w->hide : $w->show }); + } elsif (my $show_ref = delete $opts->{show_ref}) { + gtkval_register($w, $show_ref, sub { $$show_ref ? $w->show : $w->hide }); + } + if (%$opts && !$opts->{allow_unknown_options}) { internal_error("$action $class: unknown option(s) " . join(', ', keys %$opts)); } -- cgit v1.2.1