Hi, <br><br>Surely your way of doing it is better as my approach. Your implementation is also functionally  better as it will still ask the user for closing if he did some modifications in the file inside geany, which sound as the expected behavior to me, i.e. do not warn if the file is not changed in geany, but warn if the file was changed.<br>
<br>Thanks for the quick reply! Dominik.<br><br><div class="gmail_quote">2009/12/20 Enrico Tröger <span dir="ltr"><<a href="mailto:enrico.troeger@uvena.de">enrico.troeger@uvena.de</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Sun, 20 Dec 2009 10:08:13 +0100, Dominik wrote:<br>
<br>
>Hi,<br>
><br>
>I have created a patch for the feature request I reported at [1],<br>
>unfortunately I did not log in before submitting so I cannot add the<br>
>patch to the ticket myself, therefore I am providing it here.<br>
<br>
</div>No problem.<br>
Though I didn't realise until now that the feature request was<br>
submitted by you, so my comment in the tracker sounds a bit weird<br>
now :).<br>
Anyway, thanks for your patch.<br>
<div class="im"><br>
<br>
>It adds a button "Close" to the message box that is shown when an<br>
>opened file is not available on the disk any more. Currently it only<br>
>allows to "Save" or "Cancel". However most of the time I would like to<br>
>simply close the file in such a case as I deleted it on-purpose. This<br>
>case was a bit cumbersome at the moment in Geany.<br>
<br>
</div>I fully agree, should be better now.<br>
<div class="im"><br>
<br>
>The patch is quite simple, but surely a bit "crude" at the moment, I<br>
>do not know GTK/GNOME development at all, so I just duplicated the<br>
>related methods to create an instance of dialogs_show_question which<br>
>takes a third argument and use that to show the message box. I also<br>
>had to duplicate the code that actually closes the file in order to<br>
<br>
</div>I did it a bit different:<br>
I modifed dialogs_show_prompt to take also response codes, not only<br>
button (stock) names. This way it was quite easy to add the additional<br>
button.<br>
I'm not sure why you duplicated the code to close a document,<br>
document_close() already exists. I changed the logic a bit and now we<br>
mark the document only as changed if it isn't closed.<br>
<div class="im"><br>
<br>
>Maybe someone with more rights can attach this to the feature request?<br>
<br>
</div>I committed the changes to SVN, I guess that's enough :).<br>
<br>
<br>
Thanks,<br>
Enrico<br>
<font color="#888888"><br>
--<br>
Get my GPG key from <a href="http://www.uvena.de/pub.asc" target="_blank">http://www.uvena.de/pub.asc</a><br>
</font><br>_______________________________________________<br>
Geany mailing list<br>
<a href="mailto:Geany@uvena.de">Geany@uvena.de</a><br>
<a href="http://lists.uvena.de/cgi-bin/mailman/listinfo/geany" target="_blank">http://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a><br>
<br></blockquote></div><br>