# HG changeset patch
# User Yuki KODAMA <endflow.net@gmail.com>
# Date 1252252661 -32400
# Node ID 0cd7e71b1214984b58fe1f9b3cf59bbcb833609c
# Parent  15847afbcddc76f639127407ea2873f9dff151e2
thgconfig: change options of confirm dialog on exit

diff --git a/hggtk/thgconfig.py b/hggtk/thgconfig.py
--- a/hggtk/thgconfig.py
+++ b/hggtk/thgconfig.py
@@ -673,12 +673,16 @@
 
     def should_live(self, *args):
         if self.dirty and not self.readonly:
-            ret = gdialog.Confirm(_('Confirm quit without saving?'), [], self,
-                            _('Yes to abandon changes, No to continue')).run()
-            if ret != gtk.RESPONSE_YES:
+            ret = gdialog.CustomPrompt(_('Confirm Exit'),
+                        _("Exit after saving changes?"), self,
+                        (_('&Yes'), _('&No (discard changes)'),
+                         _('&Cancel')), default=2, esc=2).run()
+            if ret == 2:
                 if len(args) != 0:
                    self.emit_stop_by_name('response')
                 return True
+            elif ret == 0:
+                self._apply_clicked()
         return False
 
     def focus_field(self, focusfield):
