Index: gedit/gedit-prefs-manager.c
===================================================================
--- gedit/gedit-prefs-manager.c	(revision 5425)
+++ gedit/gedit-prefs-manager.c	(working copy)
@@ -521,6 +521,58 @@
 		  GPM_CREATE_BACKUP_COPY,
 		  GPM_DEFAULT_CREATE_BACKUP_COPY)
 
+/* Create backups in current directory? */
+DEFINE_BOOL_PREF (backups_in_current_dir,
+		  GPM_BACKUPS_IN_CURRENT_DIR,
+		  GPM_DEFAULT_BACKUPS_IN_CURRENT_DIR)
+
+/* Backup copy directory */
+gchar *
+gedit_prefs_manager_get_backup_copy_directory (void)
+{
+	gchar *path;
+	gchar *home;
+	gchar *return_path;
+
+	gedit_debug (DEBUG_PREFS);
+
+	path = gedit_prefs_manager_get_string (GPM_BACKUP_COPY_DIRECTORY,
+					       GPM_DEFAULT_BACKUP_COPY_DIRECTORY);
+	home = g_strdup (g_get_home_dir ());
+
+	if ( (g_path_is_absolute (path) == TRUE) &&
+	     (g_file_test (path, G_FILE_TEST_EXISTS) == TRUE) &&
+	     (g_file_test (path, G_FILE_TEST_IS_DIR) == TRUE) )
+	{
+		return_path = path;
+		g_free (home);
+	}
+	else
+	{
+		return_path = home;
+		g_free (path);
+	}
+
+	return return_path;
+}
+
+void
+gedit_prefs_manager_set_backup_copy_directory (const gchar *dir)
+{
+	gedit_debug (DEBUG_PREFS);
+	
+	gedit_prefs_manager_set_string (GPM_BACKUP_COPY_DIRECTORY,
+					dir);
+}
+
+gboolean
+gedit_prefs_manager_backup_copy_directory_can_set (void)
+{
+	gedit_debug (DEBUG_PREFS);
+
+	return gedit_prefs_manager_key_is_writable (GPM_BACKUP_COPY_DIRECTORY);
+}
+
 /* Backup extension. This is configurable only using gconftool or gconf-editor */
 gchar *
 gedit_prefs_manager_get_backup_extension (void)
Index: gedit/gedit-prefs-manager.h
===================================================================
--- gedit/gedit-prefs-manager.h	(revision 5425)
+++ gedit/gedit-prefs-manager.h	(working copy)
@@ -54,6 +54,8 @@
 
 #define GPM_SAVE_DIR			GPM_PREFS_DIR  "/editor/save"
 #define GPM_CREATE_BACKUP_COPY  	GPM_SAVE_DIR "/create_backup_copy"
+#define GPM_BACKUPS_IN_CURRENT_DIR	GPM_SAVE_DIR "/backups_in_current_dir"
+#define GPM_BACKUP_COPY_DIRECTORY	GPM_SAVE_DIR "/backup_copy_directory"
 #define GPM_BACKUP_COPY_EXTENSION	GPM_SAVE_DIR "/backup_copy_extension"
 
 #define GPM_AUTO_SAVE			GPM_SAVE_DIR "/auto_save"
@@ -164,6 +166,8 @@
 #define GPM_DEFAULT_SELECTION_COLOR	(const gchar*) "#000000009c9c"
 
 #define GPM_DEFAULT_CREATE_BACKUP_COPY	1 /* TRUE */
+#define GPM_DEFAULT_BACKUPS_IN_CURRENT_DIR 1 /* TRUE */
+#define GPM_DEFAULT_BACKUP_COPY_DIRECTORY (const gchar*) ""
 #define GPM_DEFAULT_BACKUP_COPY_EXTENSION (const gchar*) "~"
 
 #define GPM_DEFAULT_AUTO_SAVE		0 /* FALSE */
@@ -293,6 +297,16 @@
 /* Backup extension. This is configurable only using gconftool or gconf-editor */
 gchar			*gedit_prefs_manager_get_backup_extension	(void);
 
+/* Backups in current dir */
+gboolean		 gedit_prefs_manager_get_backups_in_current_dir (void);
+void			 gedit_prefs_manager_set_backups_in_current_dir (gboolean bcd);
+gboolean		 gedit_prefs_manager_backups_in_current_dir_can_set (void);
+
+/* Backup copy directory */
+gchar			*gedit_prefs_manager_get_backup_copy_directory  (void);
+void			 gedit_prefs_manager_set_backup_copy_directory  (const gchar *directory);
+gboolean		 gedit_prefs_manager_backup_copy_directory_can_set (void);
+
 /* Auto save */
 gboolean		 gedit_prefs_manager_get_auto_save		(void);
 void			 gedit_prefs_manager_set_auto_save		(gboolean as);
Index: gedit/gedit-document-saver.c
===================================================================
--- gedit/gedit-document-saver.c	(revision 5425)
+++ gedit/gedit-document-saver.c	(working copy)
@@ -72,6 +72,7 @@
 	gboolean		  keep_backup;
 	gchar			 *backup_ext;
 	gboolean                  backups_in_curr_dir;
+	gchar			 *backup_dir;
 
 	time_t                    doc_mtime;
 	gchar                    *mime_type; //CHECK use FileInfo instead?
@@ -116,6 +117,7 @@
 		gnome_vfs_uri_unref (priv->vfs_uri);
 
 	g_free (priv->backup_ext);
+	g_free (priv->backup_dir);
 
 	g_free (priv->local_path);
 	g_free (priv->mime_type);
@@ -339,8 +341,28 @@
 	else
 		bak_ext = "~";
 
-	fname = g_strconcat (saver->priv->local_path, bak_ext, NULL);
+	/* Is there a backup dir set that we can use? */
+	if ((saver->priv->backup_dir != NULL) &&
+	    (saver->priv->backups_in_curr_dir == FALSE))
+	{
+		int ret;
+		gchar *dirname;
+		gchar *local_path;
 
+		local_path = g_build_filename (saver->priv->backup_dir, saver->priv->local_path, NULL);
+		dirname = g_path_get_dirname (local_path);
+		ret = g_mkdir_with_parents (dirname, 0777);
+		if (ret == -1)
+			fname = NULL;
+		else
+			fname = g_strconcat (local_path, bak_ext, NULL);
+
+		g_free (dirname);	
+		g_free (local_path);
+	}
+	else
+		fname = g_strconcat (saver->priv->local_path, bak_ext, NULL);
+
 	/* If we are not going to keep the backup file and fname
 	 * already exists, try to use another name.
 	 * Change one character, just before the extension.
@@ -1459,9 +1481,14 @@
 	else
 		saver->priv->keep_backup = gedit_prefs_manager_get_create_backup_copy ();
 
-	/* TODO: add support for configurable backup dir */
-	saver->priv->backups_in_curr_dir = TRUE;
+	/* is there a specified dir for backups */
+	saver->priv->backups_in_curr_dir = gedit_prefs_manager_get_backups_in_current_dir ();
 
+	if (saver->priv->backups_in_curr_dir == FALSE)
+		saver->priv->backup_dir = gedit_prefs_manager_get_backup_copy_directory ();
+	else
+		saver->priv->backup_dir = NULL;
+
 	if (encoding != NULL)
 		saver->priv->encoding = encoding;
 	else
Index: data/gedit.schemas.in
===================================================================
--- data/gedit.schemas.in	(revision 5425)
+++ data/gedit.schemas.in	(working copy)
@@ -117,6 +117,35 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/gedit-2/preferences/editor/save/backups_in_current_dir</key>
+      <applyto>/apps/gedit-2/preferences/editor/save/backups_in_current_dir</applyto>
+      <owner>gedit</owner>
+      <type>bool</type>
+      <default>TRUE</default>
+      <locale name="C">
+	<short>Backups In Current Directory</short>
+	<long>Whether gedit should create it's backups in the file's current
+	folder or in the folder specified by the "Backup Copy Directory"
+	option. This option only takes effect if "Create Backup Copies"
+	is true.</long>
+      </locale>
+    </schema>
+	
+    <schema>
+      <key>/schemas/apps/gedit-2/preferences/editor/save/backup_copy_directory</key>
+      <applyto>/apps/gedit-2/preferences/editor/save/backup_copy_directory</applyto>
+      <owner>gedit</owner>
+      <type>string</type>
+	  <default></default>
+	  <locale name="C">
+	<short>Backup Copy Directory</short>
+	<long>Path to use to store backup copies of files in. This will only
+	take effect if both the "Create Backup Copies" and "Backups In Current
+	Directory" options are on. Must be an absolute path.</long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/gedit-2/preferences/editor/save/backup_copy_extension</key>
       <applyto>/apps/gedit-2/preferences/editor/save/backup_copy_extension</applyto>
       <owner>gedit</owner>
