Gtk.MessageDialog.destroy() not working as intended
- From: Mohan R <mohan43u gmail com>
- To: javascript-list gnome org
- Subject: Gtk.MessageDialog.destroy() not working as intended
- Date: Thu, 25 Oct 2012 13:06:54 +0530
Hi,
Here is the script,
#!/usr/bin/env gjs
function eventCb(self, response_id) {
print(this + " " + self + " " + response_id);
}
var GLib = imports.gi.GLib;
var Gtk = imports.gi.Gtk;
var Lang = imports.lang;
Gtk.init(null, null);
message = new Gtk.MessageDialog({buttons:Gtk.ButtonsType.OK_CANCEL,
text:"hello world"});
message.connect("response", Lang.bind(this, eventCb));
message.run();
message.destroy();
GLib.usleep(5 * GLib.G_USEC_PER_SEC);
message.destroy() should close the dialog window, but instead the dialog
window freezes. I have to force-quit. This problem is not happening when
I remove GLib.usleep() line.
Is there any way to close the dialog window properly?
Thanks,
Mohan R
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]