SF.net SVN: geany:[5430] trunk

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Nov 23 16:23:22 UTC 2010


Revision: 5430
          http://geany.svn.sourceforge.net/geany/?rev=5430&view=rev
Author:   ntrel
Date:     2010-11-23 16:23:22 +0000 (Tue, 23 Nov 2010)

Log Message:
-----------
Add gio_unsafe_save_backup hidden pref (patch by Lex Trotman,
thanks).

Modified Paths:
--------------
    trunk/ChangeLog
    trunk/doc/geany.html
    trunk/doc/geany.txt
    trunk/src/document.c
    trunk/src/document.h
    trunk/src/keyfile.c

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2010-11-23 13:43:36 UTC (rev 5429)
+++ trunk/ChangeLog	2010-11-23 16:23:22 UTC (rev 5430)
@@ -11,6 +11,10 @@
  * src/interface.c, doc/geany.txt, doc/geany.html, geany.glade:
    Don't use 'Enable' in pref labels when unnecessary.
    Rename XML/HTML tag autocompletion -> auto-closing.
+ * src/keyfile.c, src/document.c, src/document.h, doc/geany.txt,
+   doc/geany.html:
+   Add gio_unsafe_save_backup hidden pref (patch by Lex Trotman,
+   thanks).
 
 
 2010-11-22  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>

Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html	2010-11-23 13:43:36 UTC (rev 5429)
+++ trunk/doc/geany.html	2010-11-23 16:23:22 UTC (rev 5430)
@@ -4959,6 +4959,11 @@
 disk won't run out of free space.</td>
 <td>false</td>
 </tr>
+<tr><td>gio_unsafe_save_backup</td>
+<td>Make a backup when using GIO unsafe file
+saving. Backup is named <cite>filename~</cite>.</td>
+<td>false</td>
+</tr>
 <tr><td><strong>Search related</strong></td>
 <td> </td>
 <td> </td>
@@ -6367,7 +6372,7 @@
 <div class="footer">
 <hr class="footer" />
 <a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2010-11-23 13:39 UTC.
+Generated on: 2010-11-23 16:18 UTC.
 Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
 
 </div>

Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt	2010-11-23 13:43:36 UTC (rev 5429)
+++ trunk/doc/geany.txt	2010-11-23 16:23:22 UTC (rev 5430)
@@ -4225,6 +4225,8 @@
                                   break things seriously.
                                   The better approach would be to ensure your
                                   disk won't run out of free space.
+gio_unsafe_save_backup            Make a backup when using GIO unsafe file     false
+                                  saving. Backup is named `filename~`.
 **Search related**
 find_selection_type               See `Find selection`_.                       0
 **Build Menu related**

Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c	2010-11-23 13:43:36 UTC (rev 5429)
+++ trunk/src/document.c	2010-11-23 16:23:22 UTC (rev 5430)
@@ -1721,7 +1721,7 @@
 
 		/* Use GIO API to save file (GVFS-safe) */
 		fp = g_file_new_for_path(locale_filename);
-		g_file_replace_contents(fp, data, len, NULL, FALSE,
+		g_file_replace_contents(fp, data, len, NULL, file_prefs.gio_unsafe_save_backup,
 			G_FILE_CREATE_NONE, NULL, NULL, &error);
 		g_object_unref(fp);
 #else

Modified: trunk/src/document.h
===================================================================
--- trunk/src/document.h	2010-11-23 13:43:36 UTC (rev 5429)
+++ trunk/src/document.h	2010-11-23 16:23:22 UTC (rev 5430)
@@ -60,6 +60,7 @@
 	gboolean		cmdline_new_files;	/* New file if command-line filename doesn't exist */
 	gboolean		use_safe_file_saving;
 	gboolean		ensure_convert_new_lines;
+	gboolean		gio_unsafe_save_backup;
 }
 GeanyFilePrefs;
 

Modified: trunk/src/keyfile.c
===================================================================
--- trunk/src/keyfile.c	2010-11-23 13:43:36 UTC (rev 5429)
+++ trunk/src/keyfile.c	2010-11-23 16:23:22 UTC (rev 5430)
@@ -189,6 +189,8 @@
 		"complete_snippets_whilst_editing", FALSE);
 	stash_group_add_boolean(group, &file_prefs.use_safe_file_saving,
 		"use_safe_file_saving", FALSE);
+	stash_group_add_boolean(group, &file_prefs.gio_unsafe_save_backup,
+		"gio_unsafe_save_backup", FALSE);
 	/* for backwards-compatibility */
 	stash_group_add_integer(group, &editor_prefs.indentation->hard_tab_width,
 		"indent_hard_tab_width", 8);


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