Re: cancel gtk_main_quit and return to the main window
- From: Emanoil Kotsev <deloptes yahoo com>
- To: gtk-perl-list gnome org
- Subject: Re: cancel gtk_main_quit and return to the main window
- Date: Fri, 23 Jan 2009 23:30:36 +0100
muppet wrote:
show an empty gray window appears.
You have the return value's meaning backwards.
not quite sure ... I didn't post it but I use
use Glib qw{ TRUE FALSE };
I was thinking it means what it says
sub window1::gtk_main_quit {
# TODO: recreate the SaveAllWindow on destroy
if ( ! quit() ) {
$Gtk2->{MainWindow}->show();
$Gtk2->{SaveAllWindow}->hide();
return Gtk2::EVENT_STOP; # true
} else {
Gtk2->main_quit();
return Gtk2::EVENT_PROPAGATE; # false
}
}
and it ought to work as you wanted.
Bareword "Gtk2::EVENT_STOP" not allowed while "strict subs" in use
at ./testing line 354.
Bareword "Gtk2::EVENT_PROPAGATE" not allowed while "strict subs" in use
at ./testing line 357.
Execution of ./testing aborted due to compilation errors.
That doesn't really work with stuff created by glade. Once you
destroy it, you must reload it from the xml file. So, people
typically just hide their glade-created windows instead of destroying
them.
yeah already proved this :-), so what try next, I'm out of ideas.
thanks and regards
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]