in reply to Gtk2: Message dialog

I'm not sure what you are trying to accomplish, but you are running into a basic design principle of Gtk2 timers. Timer callbacks must return a 1(TRUE) to continue, otherwise they stop (if you return 0 or FALSE).

Your script dosn't run for me, unless I add a return 1; to the timer callback. Of course, then I see your infinite loop printing happy, which is just caused by faulty loop design as roboticus pointed out.

sub dialog { if ( $magic == 2) { my $messagedialog_verification = Gtk2::MessageDialog->new( un +def, 'destroy-with-parent', 'question', 'yes-no', "Verify waypoints?" +); my $response = $messagedialog_verification->run; $messagedialog_verification->destroy; $magic = 1; } return 1; }

I'm not really a human, but I play one on earth. Cogito ergo sum a bum