Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

thgconfig: apply changes before editing file

Make sure we don't quit when there are unsaved changes in the
dialog. It seems like it might be better to turn the dialog
question around and ask them if they would like to save changes,
rather than asking to ask without saving. That way a yes would
save and then edit. But... this may confuse our current users.

Changeset 987e62d426f2

Parent 8bab71d06373

by Steve Borho

Changes to one file · Browse files at 987e62d426f2 Showing diff from parent 8bab71d06373 Diff from another changeset...

 
428
429
430
 
 
 
 
 
431
432
433
 
452
453
454
455
456
457
458
459
460
461
462
463
 
428
429
430
431
432
433
434
435
436
437
438
 
457
458
459
 
 
 
 
 
 
460
461
462
@@ -428,6 +428,11 @@
  self.dirty = False     def should_live(self, *args): + if self.dirty: + if question_dialog(self, _('Quit without saving?'), + _('Yes to abandon changes, No to continue')) != gtk.RESPONSE_YES: + self.emit_stop_by_name('response') + return True   if len(args) == 2 and args[1] == gtk.RESPONSE_YES:   def doedit():   util.system("%s \"%s\"" % (editor, self.fn)) @@ -452,12 +457,6 @@
  thread = threading.Thread(target=doedit, name='edit config')   thread.setDaemon(True)   thread.start() - return False - if self.dirty: - if question_dialog(self, _('Quit without saving?'), - _('Yes to abandon changes, No to continue')) != gtk.RESPONSE_YES: - self.emit_stop_by_name('response') - return True   return False     def focus_field(self, focusfield):