SF.net SVN: geany: [611] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Sun Jul 23 15:45:20 UTC 2006


Revision: 611
Author:   eht16
Date:     2006-07-23 08:45:05 -0700 (Sun, 23 Jul 2006)
ViewCVS:  http://svn.sourceforge.net/geany/?rev=611&view=rev

Log Message:
-----------
Renamed document element unicode_bom in has_bom.

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/src/dialogs.c
    trunk/src/document.c
    trunk/src/geany.h
    trunk/src/utils.c
    trunk/src/utils.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2006-07-23 13:14:23 UTC (rev 610)
+++ trunk/ChangeLog	2006-07-23 15:45:05 UTC (rev 611)
@@ -2,6 +2,8 @@
 
  * src/build.c: Search terminal program in PATH (closes #1527203).
  * src/documents.c: Fixed some mistakes from last commit.
+ * src/dialogs.c, src/utils.c, src/document.c, src/geany.h:
+   Renamed document element unicode_bom in has_bom.
 
 
 2006-07-22  Nick Treleaven  <nick.treleaven at btinternet.com>

Modified: trunk/src/dialogs.c
===================================================================
--- trunk/src/dialogs.c	2006-07-23 13:14:23 UTC (rev 610)
+++ trunk/src/dialogs.c	2006-07-23 15:45:05 UTC (rev 611)
@@ -1567,7 +1567,7 @@
 
 	enctext = g_strdup_printf("%s %s",
 	doc_list[idx].encoding,
-	(utils_is_unicode_charset(doc_list[idx].encoding)) ? ((doc_list[idx].unicode_bom) ? _("(with BOM)") : _("(without BOM)")) : "");
+	(utils_is_unicode_charset(doc_list[idx].encoding)) ? ((doc_list[idx].has_bom) ? _("(with BOM)") : _("(without BOM)")) : "");
 
 	label = gtk_label_new(enctext);
 	g_free(enctext);

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2006-07-23 13:14:23 UTC (rev 610)
+++ trunk/src/document.c	2006-07-23 15:45:05 UTC (rev 611)
@@ -193,7 +193,7 @@
 		doc_list[i].file_type = NULL;
 		doc_list[i].tm_file = NULL;
 		doc_list[i].encoding = NULL;
-		doc_list[i].unicode_bom = FALSE;
+		doc_list[i].has_bom = FALSE;
 		doc_list[i].sci = NULL;
 	}
 }
@@ -319,7 +319,7 @@
 		doc_list[idx].file_name = NULL;
 		doc_list[idx].file_type = NULL;
 		doc_list[idx].encoding = NULL;
-		doc_list[idx].unicode_bom = FALSE;
+		doc_list[idx].has_bom = FALSE;
 		doc_list[idx].tm_file = NULL;
 		if (gtk_notebook_get_n_pages(GTK_NOTEBOOK(app->notebook)) == 0)
 		{
@@ -593,7 +593,7 @@
 	doc_list[idx].changed = FALSE;
 	doc_list[idx].file_name = g_strdup(utf8_filename);
 	doc_list[idx].encoding = enc;
-	doc_list[idx].unicode_bom = bom;
+	doc_list[idx].has_bom = bom;
 
 	sci_goto_pos(doc_list[idx].sci, pos, TRUE);
 
@@ -699,7 +699,7 @@
 	sci_convert_eols(doc_list[idx].sci, sci_get_eol_mode(doc_list[idx].sci));
 
 	len = sci_get_length(doc_list[idx].sci) + 1;
-	if (doc_list[idx].unicode_bom && utils_is_unicode_charset(doc_list[idx].encoding))
+	if (doc_list[idx].has_bom && utils_is_unicode_charset(doc_list[idx].encoding))
 	{
 		data = (gchar*) g_malloc(len + 3);	// 3 chars for BOM
 		data[0] = 0xef;

Modified: trunk/src/geany.h
===================================================================
--- trunk/src/geany.h	2006-07-23 13:14:23 UTC (rev 610)
+++ trunk/src/geany.h	2006-07-23 15:45:05 UTC (rev 611)
@@ -97,7 +97,7 @@
 	// the filename is encoded in UTF-8, but every GLibC function expect the locale representation
 	gchar 			*file_name;
 	gchar 			*encoding;
-	gboolean		 unicode_bom;
+	gboolean		 has_bom;
 	filetype		*file_type;
 	TMWorkObject	*tm_file;
 	ScintillaObject	*sci;

Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c	2006-07-23 13:14:23 UTC (rev 610)
+++ trunk/src/utils.c	2006-07-23 15:45:05 UTC (rev 611)
@@ -141,7 +141,7 @@
 			(doc_list[idx].readonly) ? ", read only" : "",
 			cur_tag,
 			(doc_list[idx].encoding) ? doc_list[idx].encoding : _("unknown"),
-			(utils_is_unicode_charset(doc_list[idx].encoding)) ? ((doc_list[idx].unicode_bom) ? _("(with BOM)") : _("(without BOM)")) : "",
+			(utils_is_unicode_charset(doc_list[idx].encoding)) ? ((doc_list[idx].has_bom) ? _("(with BOM)") : _("(without BOM)")) : "",
 			(doc_list[idx].file_type) ? doc_list[idx].file_type->title : _("unknown"));
 		utils_set_statusbar(text, TRUE); //can be overridden by status messages
 		g_free(text);
@@ -1993,6 +1993,10 @@
 {
 	GtkWidget *widget;
 
+/*	geany_debug("\nSidebar: %s\nSymbol: %s\nFiles: %s", utils_btoa(app->sidebar_visible),
+					utils_btoa(app->sidebar_symbol_visible), utils_btoa(app->sidebar_openfiles_visible));
+*/
+
 	if (! force && ! app->sidebar_visible && (app->sidebar_openfiles_visible ||
 		app->sidebar_symbol_visible))
 	{
@@ -2572,7 +2576,7 @@
 }
 
 
-gchar *utils_scan_unicode_bom(gchar *string)
+gchar *utils_scan_unicode_bom(const gchar *string)
 {
 	if ((unsigned char)string[0] == 0xef && (unsigned char)string[1] == 0xbb &&
 		(unsigned char)string[2] == 0xbf)
@@ -2606,7 +2610,7 @@
 }
 
 
-gboolean utils_is_unicode_charset(gchar *string)
+gboolean utils_is_unicode_charset(const gchar *string)
 {
 	if (string != NULL && (strncmp(string, "UTF", 3) == 0 || strncmp(string, "UCS", 3) == 0))
 	{

Modified: trunk/src/utils.h
===================================================================
--- trunk/src/utils.h	2006-07-23 13:14:23 UTC (rev 610)
+++ trunk/src/utils.h	2006-07-23 15:45:05 UTC (rev 611)
@@ -222,8 +222,8 @@
  * Replaces \\, \r, \n, \t and \uXXX by their real counterparts */
 gboolean utils_str_replace_escape(gchar *string);
 
-gchar *utils_scan_unicode_bom(gchar *string);
+gchar *utils_scan_unicode_bom(const gchar *string);
 
-gboolean utils_is_unicode_charset(gchar *string);
+gboolean utils_is_unicode_charset(const gchar *string);
 
 #endif


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