Please review this at http://codereview.appspot.com/4280043/

Affected files:
  M tryton/wizard/main.py


Index: tryton/wizard/main.py
===================================================================
--- a/tryton/wizard/main.py
+++ b/tryton/wizard/main.py
@@ -25,8 +25,9 @@
         self.dia = gtk.Dialog(_('Wizard'), parent,
             gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT)
         self.dia.set_position(gtk.WIN_POS_CENTER_ON_PARENT)
-        if hasattr(self.dia, 'set_deletable') and os.name != 'nt':
+        if hasattr(self.dia, 'set_deletable'):
             self.dia.set_deletable(False)
+        self.dia.connect('close', self.close)

         self.accel_group = gtk.AccelGroup()
         self.dia.add_accel_group(self.accel_group)
@@ -145,6 +146,10 @@
             self.parent.present()
             return False

+    def close(self, widget, event=None):
+        widget.emit_stop_by_name('close')
+        return True
+
     def destroy(self):
         self.dia.destroy()




-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpksB44xhhhD.pgp
Description: PGP signature

Reply via email to