Change 17660: Fix long-standing bug with popup menus not working in dialogs

[email protected] (Chris Nandor) Mon, 29 Jul 2002 15:55:33 -0400
Newsgroups perl.perl5.changes.mac
Message-ID <p05111b12b96b4e232ec7@[10.0.1.177]>
Change 17660 by pudge@pudge-mobile on 2002/07/29 18:20:12

	Fix long-standing bug with popup menus not working in dialogs

Affected files ...

.... //depot/maint-5.6/macperl/macos/ext/Mac/Dialogs/Dialogs.pm#3 edit

Differences ...

==== //depot/maint-5.6/macperl/macos/ext/Mac/Dialogs/Dialogs.pm#3 (text) ====
Index: macperl/macos/ext/Mac/Dialogs/Dialogs.pm
--- macperl/macos/ext/Mac/Dialogs/Dialogs.pm#2~12323~	Wed Oct  3 11:42:37 2001
+++ macperl/macos/ext/Mac/Dialogs/Dialogs.pm	Mon Jul 29 11:20:12 2002
@@ -475,9 +475,16 @@
 
 =cut
 sub click {
-    my($handled);
-    defined($handled = $_[0]->callhook("click", @_)) and return 1;
-    _dialogselect(@_);
+	my($self, $pt) = @_;
+	for my $pane (@{$self->{panes}}) { 
+		if ($pane->click($self, $pt)) {
+			$self->advance_focus($pane);
+			return 1; 
+		}
+	};
+	my($handled);
+	defined($handled = $self->callhook("click", @_)) and return 1;
+	_dialogselect(@_);
 }
 
 =item modal [FILTER]
@@ -523,7 +530,7 @@
 	$CurrentEvent->what(0);
 	&_dialogselect;
 	$CurrentEvent->what($savedwhat);
-    &MacWindow::idle;
+	&MacWindow::idle;
 }
 
 =item KIND = item_kind ITEM
End of Patch.
-- 
Chris Nandor                      [email protected]    http://pudge.net/
Open Source Development Network    [email protected]     http://osdn.com/