[Geany] Patch for the "file went missing" dialog box

Dominik Stadler dominik.stadler at xxxxx
Sun Dec 20 20:54:14 UTC 2009


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.

Thanks for the quick reply! Dominik.

2009/12/20 Enrico Tröger <enrico.troeger at uvena.de>

> On Sun, 20 Dec 2009 10:08:13 +0100, Dominik wrote:
> >Hi,
> >
> >I have created a patch for the feature request I reported at [1],
> >unfortunately I did not log in before submitting so I cannot add the
> >patch to the ticket myself, therefore I am providing it here.
> No problem.
> Though I didn't realise until now that the feature request was
> submitted by you, so my comment in the tracker sounds a bit weird
> now :).
> Anyway, thanks for your patch.
> >It adds a button "Close" to the message box that is shown when an
> >opened file is not available on the disk any more. Currently it only
> >allows to "Save" or "Cancel". However most of the time I would like to
> >simply close the file in such a case as I deleted it on-purpose. This
> >case was a bit cumbersome at the moment in Geany.
> I fully agree, should be better now.
> >The patch is quite simple, but surely a bit "crude" at the moment, I
> >do not know GTK/GNOME development at all, so I just duplicated the
> >related methods to create an instance of dialogs_show_question which
> >takes a third argument and use that to show the message box. I also
> >had to duplicate the code that actually closes the file in order to
> I did it a bit different:
> I modifed dialogs_show_prompt to take also response codes, not only
> button (stock) names. This way it was quite easy to add the additional
> button.
> I'm not sure why you duplicated the code to close a document,
> document_close() already exists. I changed the logic a bit and now we
> mark the document only as changed if it isn't closed.
> >Maybe someone with more rights can attach this to the feature request?
> I committed the changes to SVN, I guess that's enough :).
> Thanks,
> Enrico
> --
> Get my GPG key from http://www.uvena.de/pub.asc
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20091220/a74b7642/attachment.html>

More information about the Users mailing list