SF.net SVN: geany: [1817] trunk

eht16 at users.sourceforge.net eht16 at xxxxx
Thu Aug 23 17:59:22 UTC 2007


Revision: 1817
          http://geany.svn.sourceforge.net/geany/?rev=1817&view=rev
Author:   eht16
Date:     2007-08-23 10:59:22 -0700 (Thu, 23 Aug 2007)

Log Message:
-----------
Fix invalid filetype setting when using Save All and files with filetype None (thanks to Omair Eshkenazi for reporting).

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

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-08-23 15:22:13 UTC (rev 1816)
+++ trunk/ChangeLog	2007-08-23 17:59:22 UTC (rev 1817)
@@ -1,3 +1,10 @@
+2007-08-23  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/document.c: Fix invalid filetype setting when using Save All and
+                   files with filetype None (thanks to Omair Eshkenazi
+                   for reporting).
+
+
 2007-08-23  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
 
  * plugins/export.c, src/templates.c, src/build.c, src/utils.c,

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2007-08-23 15:22:13 UTC (rev 1816)
+++ trunk/src/document.c	2007-08-23 17:59:22 UTC (rev 1817)
@@ -1023,7 +1023,7 @@
 	if (editor_prefs.trail_space) document_strip_trailing_spaces(idx);
 	// ensure the file has a newline at the end
 	if (editor_prefs.new_line) document_ensure_final_newline(idx);
-	// ensure there a really the same EOL chars
+	// ensure there are really the same EOL chars
 	sci_convert_eols(doc_list[idx].sci, sci_get_eol_mode(doc_list[idx].sci));
 
 	len = sci_get_length(doc_list[idx].sci) + 1;
@@ -1124,7 +1124,12 @@
 		if (FILETYPE_ID(doc_list[idx].file_type) == GEANY_FILETYPES_ALL)
 		{
 			doc_list[idx].file_type = filetypes_detect_from_file(idx);
-			filetypes_select_radio_item(doc_list[idx].file_type);
+			if (document_get_cur_idx() == idx)
+			{
+				app->ignore_callback = TRUE;
+				filetypes_select_radio_item(doc_list[idx].file_type);
+				app->ignore_callback = FALSE;
+			}
 		}
 		document_set_filetype(idx, doc_list[idx].file_type);
 		tm_workspace_update(TM_WORK_OBJECT(app->tm_workspace), TRUE, TRUE, FALSE);


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