Fix file saving behavior with "allow_always_save"

This preference should only be used for UI action, not for other file
saving triggering.
This commit is contained in:
Quentin Glidic 2012-12-01 23:37:21 +01:00 committed by Colomban Wendling
parent 8f96498323
commit 8c4db25396
2 changed files with 2 additions and 2 deletions

View File

@ -173,7 +173,7 @@ G_MODULE_EXPORT void on_save1_activate(GtkMenuItem *menuitem, gpointer user_data
if (doc != NULL && cur_page >= 0)
{
document_save_file(doc, FALSE);
document_save_file(doc, ui_prefs.allow_always_save);
}
}

View File

@ -1701,7 +1701,7 @@ gboolean document_save_file(GeanyDocument *doc, gboolean force)
}
/* the "changed" flag should exclude the "readonly" flag, but check it anyway for safety */
if (! force && ! ui_prefs.allow_always_save && (! doc->changed || doc->readonly))
if (! force && (! doc->changed || doc->readonly))
return FALSE;
fp = project_get_file_prefs();