SF.net SVN: geany:[2810] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Thu Jul 24 12:12:47 UTC 2008


Revision: 2810
          http://geany.svn.sourceforge.net/geany/?rev=2810&view=rev
Author:   ntrel
Date:     2008-07-24 12:12:47 +0000 (Thu, 24 Jul 2008)

Log Message:
-----------
Rename document_new_file() argument to utf8_filename.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/document.c
    trunk/src/plugindata.h

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-07-24 12:01:30 UTC (rev 2809)
+++ trunk/ChangeLog	2008-07-24 12:12:47 UTC (rev 2810)
@@ -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>

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2008-07-24 12:01:30 UTC (rev 2809)
+++ trunk/src/document.c	2008-07-24 12:12:47 UTC (rev 2810)
@@ -533,18 +533,19 @@
 
 
 /**
- *  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 @@
 	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 */

Modified: trunk/src/plugindata.h
===================================================================
--- trunk/src/plugindata.h	2008-07-24 12:01:30 UTC (rev 2809)
+++ trunk/src/plugindata.h	2008-07-24 12:12:47 UTC (rev 2810)
@@ -202,7 +202,7 @@
 /* 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);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list