glade-perl and killing a window



A gtk question, said in perl:

I have an app, push a button on its main window, a new window comes
up. The new window let's me do some stuff, then I dismiss it. I'm not
quitting the new window correctly.

Here's the code:

Press "pda" from main window:

    sub on_pda_button_clicked {
	my ($class, $data, $object, $instance, $event) = @_;
	my $me = __PACKAGE__."->on_button1_clicked";
	# Get ref to hash of all widgets on our form
	my $form = $__PACKAGE__::all_forms->{$instance};

	pda_window->run();
	return;
    }
    
Press "dismiss" from pda_window:

    Gtk->main_quit;
    $class->parent()->parent()->destroy();

That last is a kludge, because if the user hits dismiss twice from the
parent window, the whole app quits (kill two nested event loops).

Can someone point me in the right direction?

Thanks.

-- 
 Jeff

 Jeff Abrahamson  <http://www.purple.com/jeff/>
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]