[geany/geany] 1032d0: Export: use `DOC_FILENAME()` instead of re-implementing it manually

Colomban Wendling git-noreply at xxxxx
Wed Apr 9 16:07:58 UTC 2014


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Wed, 09 Apr 2014 16:07:58 UTC
Commit:      1032d0fc68fa8cf3005d00fc2579b1e79f84c751
             https://github.com/geany/geany/commit/1032d0fc68fa8cf3005d00fc2579b1e79f84c751

Log Message:
-----------
Export: use `DOC_FILENAME()` instead of re-implementing it manually


Modified Paths:
--------------
    plugins/export.c

Modified: plugins/export.c
10 files changed, 2 insertions(+), 8 deletions(-)
===================================================================
@@ -551,10 +551,7 @@ static void write_latex_file(GeanyDocument *doc, const gchar *filename,
 	utils_string_replace_all(latex, "{export_content}", body->str);
 	utils_string_replace_all(latex, "{export_styles}", cmds->str);
 	utils_string_replace_all(latex, "{export_date}", date);
-	if (doc->file_name == NULL)
-		utils_string_replace_all(latex, "{export_filename}", GEANY_STRING_UNTITLED);
-	else
-		utils_string_replace_all(latex, "{export_filename}", doc->file_name);
+	utils_string_replace_all(latex, "{export_filename}", DOC_FILENAME(doc));
 
 	write_data(filename, latex->str);
 
@@ -729,10 +726,7 @@ static void write_html_file(GeanyDocument *doc, const gchar *filename,
 	utils_string_replace_all(html, "{export_date}", date);
 	utils_string_replace_all(html, "{export_content}", body->str);
 	utils_string_replace_all(html, "{export_styles}", css->str);
-	if (doc->file_name == NULL)
-		utils_string_replace_all(html, "{export_filename}", GEANY_STRING_UNTITLED);
-	else
-		utils_string_replace_all(html, "{export_filename}", doc->file_name);
+	utils_string_replace_all(html, "{export_filename}", DOC_FILENAME(doc));
 
 	write_data(filename, html->str);
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list