Rename document_new_file() argument to utf8_filename.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2810 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2008-07-24 12:12:47 +00:00
parent f180f2f9fd
commit 1580203f8a
3 changed files with 9 additions and 6 deletions

View File

@ -7,6 +7,8 @@
the plugin API.
* src/ui_utils.c:
Add dox for all UIUtilsFuncs.
* src/plugindata.h, src/document.c:
Rename document_new_file() argument to utf8_filename.
2008-07-23 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>

View File

@ -533,18 +533,19 @@ GeanyDocument *document_new_file_if_non_open()
/**
* Creates a new %document.
* Creates a new document.
* After all, the "document-new" signal is emitted for plugins.
*
* @param filename The file name in UTF-8 encoding, or @c NULL to open a file as "untitled".
* @param utf8_filename The file name in UTF-8 encoding, or @c NULL to open a file as "untitled".
* @param ft The filetype to set or @c NULL to detect it from @a filename if not @c NULL.
* @param text The initial content of the file (in UTF-8 encoding), or @c NULL.
*
* @return The new document.
**/
GeanyDocument *document_new_file(const gchar *filename, GeanyFiletype *ft, const gchar *text)
GeanyDocument *document_new_file(const gchar *utf8_filename, GeanyFiletype *ft,
const gchar *text)
{
GeanyDocument *doc = document_create(filename);
GeanyDocument *doc = document_create(utf8_filename);
g_assert(doc != NULL);
@ -571,7 +572,7 @@ GeanyDocument *document_new_file(const gchar *filename, GeanyFiletype *ft, const
store_saved_encoding(doc);
/*document_set_filetype(idx, (ft == NULL) ? filetypes[GEANY_FILETYPES_NONE] : ft);*/
if (ft == NULL && filename != NULL) /* guess the filetype from the filename if one is given */
if (ft == NULL && utf8_filename != NULL) /* guess the filetype from the filename if one is given */
ft = filetypes_detect_from_document(doc);
document_set_filetype(doc, ft); /* also clears taglist */

View File

@ -202,7 +202,7 @@ GeanyFunctions;
/* See document.h */
typedef struct DocumentFuncs
{
struct GeanyDocument* (*new_file) (const gchar *filename, struct GeanyFiletype *ft,
struct GeanyDocument* (*new_file) (const gchar *utf8_filename, struct GeanyFiletype *ft,
const gchar *text);
struct GeanyDocument* (*get_current) (void);
struct GeanyDocument* (*get_from_page) (guint page_num);