? bug119922.patch
? bug166211.patch
? defer.patch
? depcomp
? idl.patch
? intltool-extract.in
? intltool-merge.in
? intltool-update.in
? patch122433.patch
? savecopy.patch
? tmp.patch
? data/gedit-2.8.pc
? gedit/gedit-document.c.clean-up
? plugins/savecopy/savecopy.c.paolo
Index: gedit/ChangeLog
===================================================================
RCS file: /cvs/gnome/gedit/gedit/ChangeLog,v
retrieving revision 1.749
diff -u -p -r1.749 ChangeLog
--- gedit/ChangeLog	26 Feb 2005 11:59:11 -0000	1.749
+++ gedit/ChangeLog	27 Feb 2005 16:11:54 -0000
@@ -1,3 +1,14 @@
+2005-02-27  Paolo Maggi  <paolo@gnome.org>
+
+	* gedit-document.c (update_document_contents): fixes bug #167867 (Autosave
+	should not save unmodified files). Call gedit_document_set_readonly after
+	gedit_document_set_uri to activate autosaving also if the document has never
+	been saved before.
+
+	* gedit-encodings.c (gedit_encoding_to_string)
+	(gedit_encoding_get_charset) (gedit_encoding_get_name): fixes some
+	broken preconditions
+
 2005-02-26  Paolo Borelli  <pborelli@katamail.com>
 
 	* gedit-mdi.c: be smarter about ellipsizing the window title when
Index: gedit/gedit-document.c
===================================================================
RCS file: /cvs/gnome/gedit/gedit/gedit-document.c,v
retrieving revision 1.110
diff -u -p -r1.110 gedit-document.c
--- gedit/gedit-document.c	21 Feb 2005 14:01:40 -0000	1.110
+++ gedit/gedit-document.c	27 Feb 2005 16:11:55 -0000
@@ -893,24 +893,12 @@ update_document_contents (GeditDocument 
 	else
 		encoding = gedit_encoding_get_utf8 ();
 
-	if (gedit_utils_is_uri_read_only (uri))
-	{
-		gedit_debug (DEBUG_DOCUMENT, "READ-ONLY");
-
-		gedit_document_set_readonly (doc, TRUE);
-	}
-	else
-	{
-		gedit_debug (DEBUG_DOCUMENT, "NOT READ-ONLY");
+	gedit_document_set_uri (doc, uri);
+	gedit_document_set_encoding (doc, encoding);
 
-		gedit_document_set_readonly (doc, FALSE);
-	}
+	gedit_document_set_readonly (doc, gedit_utils_is_uri_read_only (uri));
 
 	gtk_text_buffer_set_modified (GTK_TEXT_BUFFER (doc), FALSE);
-
-	gedit_document_set_uri (doc, uri);
-
-	gedit_document_set_encoding (doc, encoding);
 
 	g_get_current_time (&doc->priv->time_of_last_save_or_load);
 	
Index: gedit/gedit-encodings.c
===================================================================
RCS file: /cvs/gnome/gedit/gedit/gedit-encodings.c,v
retrieving revision 1.17
diff -u -p -r1.17 gedit-encodings.c
--- gedit/gedit-encodings.c	13 Nov 2004 12:53:34 -0000	1.17
+++ gedit/gedit-encodings.c	27 Feb 2005 16:11:55 -0000
@@ -396,10 +396,11 @@ gchar *
 gedit_encoding_to_string (const GeditEncoding* enc)
 {
 	g_return_val_if_fail (enc != NULL, NULL);
-	g_return_val_if_fail (enc->charset != NULL, NULL);
-
+	
 	gedit_encoding_lazy_init ();
 
+	g_return_val_if_fail (enc->charset != NULL, NULL);
+
 	if (enc->name != NULL)
 	    	return g_strdup_printf ("%s (%s)", enc->name, enc->charset);
 	else
@@ -415,10 +416,11 @@ const gchar *
 gedit_encoding_get_charset (const GeditEncoding* enc)
 {
 	g_return_val_if_fail (enc != NULL, NULL);
-	g_return_val_if_fail (enc->charset != NULL, NULL);
 
 	gedit_encoding_lazy_init ();
 
+	g_return_val_if_fail (enc->charset != NULL, NULL);
+
 	return enc->charset;
 }
 
@@ -426,7 +428,6 @@ const gchar *
 gedit_encoding_get_name (const GeditEncoding* enc)
 {
 	g_return_val_if_fail (enc != NULL, NULL);
-	g_return_val_if_fail (enc->name != NULL, NULL);
 
 	gedit_encoding_lazy_init ();
 
