[Vala] Gtk.Dialog.show crashes app
- From: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
- To: vala-list gnome org
- Subject: [Vala] Gtk.Dialog.show crashes app
- Date: Sat, 23 Jan 2010 10:39:23 +0800
I don't know if this is a vala bug or I have missed something.
In the following code I'm creating a Gtk.Dialog and keeping it
handy to be shown non-modal using show(). The trouble is, after
the dialog is closed, reopening it will crash the application
with "Segmentation fault" no less.
Replacing show() with run() & hide() fixes the problem, but
the dialog is now modal (even after dialog.set_modal).
Please, please tell me I miss something.
------
Gtk.Dialog dialog = null
public void show_dialog (Gtk.Window parent) {
if (dialog == null) {
dialog = new Gtk.Dialog ();
dialog.title = "Whatever";
dialog.delete_event.connect (() => {dialog.hide_on_delete ();});
dialog.transient_for = parent;
dialog.set_destroy_with_parent (true);
dialog.vbox.set_size_request (200, 300);
dialog.show_all ();
}
dialog.show (); // this will crash when invoked after closing
}
-----
hand
Nor Jaidi Tuah
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]