Only prompt for reloading if the document has unsaved changes

(patch by Jiří Techet, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5190 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-08-23 15:16:39 +00:00
parent 71ac86cc88
commit 437d6bc7f7
2 changed files with 6 additions and 2 deletions

View File

@ -4,9 +4,12 @@
scintilla/include/SciLexer.h, scintilla/include/Scintilla.iface,
scintilla/KeyWords.cxx, scintilla/Makefile.am, src/highlighting.c,
data/filetypes.txt2tags, wscript:
Add lexer for Txt2Tags (patch by Forgeot Eric, #3020632).
Add lexer for Txt2Tags (patch by Forgeot Eric, thanks - #3020632).
* m4, m4/intltool.m4, configure.ac, Makefile.am:
Use AC_CONFIG_MACRO_DIR (patch by Erik de Castro Lopo, thanks).
* src/callbacks.c:
Only prompt for reloading if the document has unsaved changes
(patch by Jiří Techet, thanks).
2010-08-21 Frank Lanitz <frank@frank.uvena.de>

View File

@ -485,7 +485,8 @@ on_reload_as_activate (GtkMenuItem *menuitem,
charset = doc->encoding;
base_name = g_path_get_basename(doc->file_name);
if (dialogs_show_question_full(NULL, _("_Reload"), GTK_STOCK_CANCEL,
if (!doc->changed ||
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))
{