Revision: 5234 http://geany.svn.sourceforge.net/geany/?rev=5234&view=rev Author: ntrel Date: 2010-09-16 14:52:04 +0000 (Thu, 16 Sep 2010)
Log Message: ----------- Prompt for reloading if the document has an undo stack to avoid losing undo ability on accidental reloading (patch by Colomban Wendling, thanks).
Modified Paths: -------------- trunk/ChangeLog trunk/src/callbacks.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-09-15 17:11:30 UTC (rev 5233) +++ trunk/ChangeLog 2010-09-16 14:52:04 UTC (rev 5234) @@ -6,6 +6,10 @@ doc/geany.html, TODO: Use a separate socket per workspace on X (patch by Erik de Castro Lopo, thanks). + * src/callbacks.c: + Prompt for reloading if the document has an undo stack to avoid + losing undo ability on accidental reloading (patch by Colomban + Wendling, thanks).
2010-09-14 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/callbacks.c =================================================================== --- trunk/src/callbacks.c 2010-09-15 17:11:30 UTC (rev 5233) +++ trunk/src/callbacks.c 2010-09-16 14:52:04 UTC (rev 5234) @@ -485,7 +485,8 @@ charset = doc->encoding;
base_name = g_path_get_basename(doc->file_name); - if (!doc->changed || + /* don't prompt if file hasn't been edited at all */ + if ((!doc->changed && !document_can_undo(doc) && !document_can_redo(doc)) || dialogs_show_question_full(NULL, _("_Reload"), GTK_STOCK_CANCEL, _("Any unsaved changes will be lost."), _("Are you sure you want to reload '%s'?"), base_name))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.