<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'># HG changeset patch<br># User K. Arvanitis <<a href="mailto:kosta@alumni.uvic.ca">kosta@alumni.uvic.ca</a>><br># Date 1422250708 28800<br># Sun Jan 25 21:38:28 2015 -0800<br># Node ID ed3c35ee774f2d76cf6443ff604574c19e0c3686<br># Parent b25606106a9c0cd78f3cc5f602475da64cde081d<br>[PATCH] Dismissing save confirmation dialog was closing tab<BR>A typical gtk Dialog will return a response of RESPONSE_DELETE_EVENT<br>when the dialog window is dismissed.<BR>As a result dismissing the save confirmation dialog was performing similarly<br>to the user selecting the NO button (RESPONSE_NO)<BR>This created a situation where a person could possibly loose their changes<br>should they dismiss the save confirmation dialog without using the cancel<br>button.<BR>The fix essentially handles both the CANCEL and DELETE_EVENT responses as<br>the same.<BR>Bug #2255<BR>diff -r b25606106a9c -r ed3c35ee774f chirpui/mainapp.py<br>--- a/chirpui/mainapp.py Wed Jan 21 23:30:19 2015 -0800<br>+++ b/chirpui/mainapp.py Sun Jan 25 21:38:28 2015 -0800<br>@@ -731,9 +731,10 @@<br> dlg.set_text(_("File is modified, save changes before closing?"))<br> res = dlg.run()<br> dlg.destroy()<br>+<br> if res == gtk.RESPONSE_YES:<br> self.do_save(eset)<br>- elif res == gtk.RESPONSE_CANCEL:<br>+ elif res != gtk.RESPONSE_NO:<br> raise ModifiedError()<br> <br> eset.rthread.stop()<br> <BR> </div></body>
</html>