Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-04-30 15:39:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-04-30 15:43:11 +0400
commit7829ef0051a16c1af88f72d99c329f5c75dd3eea (patch)
tree10513154ed31554c44286ebbb653edb64656b0a5 /source/blender/editors/space_text/text_ops.c
parent3803c646d8e8277d4d51473b03ac3153646a3493 (diff)
Report when saving images and text
also fix bug where text saving would strip last newline
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r--source/blender/editors/space_text/text_ops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 4835ef711e9..7b4481cfc7f 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -472,18 +472,18 @@ static void txt_write_file(Text *text, ReportList *reports)
return;
}
- tmp = text->lines.first;
- while (tmp) {
- if (tmp->next) fprintf(fp, "%s\n", tmp->line);
- else fprintf(fp, "%s", tmp->line);
-
- tmp = tmp->next;
+ for (tmp = text->lines.first; tmp; tmp = tmp->next) {
+ fputs(tmp->line, fp);
+ fputc('\n', fp);
}
fclose(fp);
if (BLI_stat(filepath, &st) == 0) {
text->mtime = st.st_mtime;
+
+ /* report since this can be called from key-shortcuts */
+ BKE_reportf(reports, RPT_INFO, "Saved Text '%s'", filepath);
}
else {
text->mtime = 0;