totem r5166 - in trunk: . browser-plugin src src/backend



Author: pwithnall
Date: Thu Feb 21 21:30:51 2008
New Revision: 5166
URL: http://svn.gnome.org/viewvc/totem?rev=5166&view=rev

Log:
2008-02-21  Philip Withnall  <pwithnall svn gnome org>

	* browser-plugin/README.browser-plugin:
	* browser-plugin/totemPluginGlue.cpp:
	* src/backend/bacon-video-widget-xine.c: (setup_config),
	(bacon_video_widget_unrealize):
	* src/totem-uri.c: (totem_dot_dir): Change to use
	g_get_user_config_dir() instead of hardcoding the config
	directory. This breaks old configurations, which were
	in ~/.gnome2/Totem --- they're now in ~/.config/totem/, and
	use the XDG base directory spec. (Closes: #517717)



Modified:
   trunk/ChangeLog
   trunk/browser-plugin/README.browser-plugin
   trunk/browser-plugin/totemPluginGlue.cpp
   trunk/src/backend/bacon-video-widget-xine.c
   trunk/src/totem-uri.c

Modified: trunk/browser-plugin/README.browser-plugin
==============================================================================
--- trunk/browser-plugin/README.browser-plugin	(original)
+++ trunk/browser-plugin/README.browser-plugin	Thu Feb 21 21:30:51 2008
@@ -25,7 +25,7 @@
 This can be achieved using 2 files. They are:
 /etc/totem/browser-plugins.ini ($(sysconfdir)/totem/browser-plugins.ini)
 and
-~/.gnome2/Totem/browser-plugins.ini
+~/.config/totem/browser-plugins.ini
 
 The format is:
 [Plugins]

Modified: trunk/browser-plugin/totemPluginGlue.cpp
==============================================================================
--- trunk/browser-plugin/totemPluginGlue.cpp	(original)
+++ trunk/browser-plugin/totemPluginGlue.cpp	Thu Feb 21 21:30:51 2008
@@ -353,9 +353,8 @@
 	}
 
 	char *user_ini_file;
-	user_ini_file = g_build_filename (g_get_home_dir (),
-					  ".gnome2",
-					  "Totem",
+	user_ini_file = g_build_filename (g_get_user_config_dir (),
+					  "totem",
 					  "browser-plugins.ini",
 					  NULL);
 	if (g_key_file_load_from_file (user,

Modified: trunk/src/backend/bacon-video-widget-xine.c
==============================================================================
--- trunk/src/backend/bacon-video-widget-xine.c	(original)
+++ trunk/src/backend/bacon-video-widget-xine.c	Thu Feb 21 21:30:51 2008
@@ -63,7 +63,9 @@
 
 #define DEFAULT_HEIGHT 180
 #define DEFAULT_WIDTH 240
-#define CONFIG_FILE ".gnome2"G_DIR_SEPARATOR_S"Totem"G_DIR_SEPARATOR_S"xine_config"
+/* This is built into a path with g_get_user_config_dir(), so the full
+ * path is something like ~/.config/totem/xine_config */
+#define CONFIG_FILE "totem"G_DIR_SEPARATOR_S"xine_config"
 
 /* Signals */
 enum {
@@ -801,7 +803,7 @@
 	xine_cfg_entry_t entry;
 
 	path = g_build_path (G_DIR_SEPARATOR_S,
-			g_get_home_dir (), CONFIG_FILE, NULL);
+			g_get_user_config_dir (), CONFIG_FILE, NULL);
 	xine_config_load (bvw->priv->xine, path);
 	g_free (path);
 
@@ -1688,7 +1690,7 @@
 
 	/* save config */
 	configfile = g_build_path (G_DIR_SEPARATOR_S,
-			g_get_home_dir (), CONFIG_FILE, NULL);
+			g_get_user_config_dir (), CONFIG_FILE, NULL);
 	xine_config_save (bvw->priv->xine, configfile);
 	g_free (configfile);
 

Modified: trunk/src/totem-uri.c
==============================================================================
--- trunk/src/totem-uri.c	(original)
+++ trunk/src/totem-uri.c	Thu Feb 21 21:30:51 2008
@@ -68,9 +68,8 @@
 		return totem_dir;
 	}
 
-	totem_dir = g_build_filename (g_get_home_dir (),
-				      ".gnome2",
-				      "Totem",
+	totem_dir = g_build_filename (g_get_user_config_dir (),
+				      "totem",
 				      NULL);
 
 	totem_ensure_dot_dir (totem_dir);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]