Re: signals pending
- From: Ross McFarland <rwmcfa1 neces com>
- To: Gtk-Perl-List <gtk-perl-list gnome org>
- Subject: Re: signals pending
- Date: Wed, 25 Aug 2004 22:02:30 -0400
On Wed, 2004-08-25 at 22:52, Jorge P Costa wrote:
And I want to ignore the "focus out event" when closing the window. How can I
do it??
i can't test it since i don't get a focus out event when closing
(probably due to wmaker rather than gnome.) but the following may work
if you get the destroy before the focus_out_event.
use Gtk2 '-init';
use Glib qw/TRUE FALSE/;
my $entry = Gtk2::Entry->new;
my $foe = $entry->signal_connect('focus_out_event' => sub{ print "focus
out\n" });
my $window = Gtk2::Window->new('toplevel');
$window->signal_connect('destroy' => sub{ Glib::Source->remove
($foe);
print "destroy\n"; Gtk2->main_quit });
$window->show_all;
Gtk2->main;
exit 0;
--
-rm
http://www.neces.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]