totem r5459 - in trunk: . src src/plugins
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem r5459 - in trunk: . src src/plugins
- Date: Tue, 10 Jun 2008 10:20:58 +0000 (UTC)
Author: hadess
Date: Tue Jun 10 10:20:58 2008
New Revision: 5459
URL: http://svn.gnome.org/viewvc/totem?rev=5459&view=rev
Log:
2008-06-10 Bastien Nocera <hadess hadess net>
* src/plugins/totem-plugin.c (totem_get_plugin_paths):
* src/totem-uri.c (totem_ensure_dir), (totem_dot_dir),
(totem_data_dot_dir):
* src/totem-uri.h: Use ~/.local/share/totem/plugins/ for user-plugins
Modified:
trunk/ChangeLog
trunk/src/plugins/totem-plugin.c
trunk/src/totem-uri.c
trunk/src/totem-uri.h
Modified: trunk/src/plugins/totem-plugin.c
==============================================================================
--- trunk/src/plugins/totem-plugin.c (original)
+++ trunk/src/plugins/totem-plugin.c Tue Jun 10 10:20:58 2008
@@ -251,7 +251,7 @@
client = gconf_client_get_default ();
if (gconf_client_get_bool (client, GCONF_PREFIX"/disable_user_plugins", NULL) == FALSE) {
- path = g_build_filename (totem_dot_dir (), "plugins", NULL);
+ path = g_build_filename (totem_data_dot_dir (), "plugins", NULL);
paths = g_list_prepend (paths, path);
}
Modified: trunk/src/totem-uri.c
==============================================================================
--- trunk/src/totem-uri.c (original)
+++ trunk/src/totem-uri.c Tue Jun 10 10:20:58 2008
@@ -50,7 +50,7 @@
}
static void
-totem_ensure_dot_dir (const char *path)
+totem_ensure_dir (const char *path)
{
if (g_file_test (path, G_FILE_TEST_IS_DIR) != FALSE)
return;
@@ -64,7 +64,7 @@
static char *totem_dir = NULL;
if (totem_dir != NULL) {
- totem_ensure_dot_dir (totem_dir);
+ totem_ensure_dir (totem_dir);
return totem_dir;
}
@@ -72,7 +72,26 @@
"totem",
NULL);
- totem_ensure_dot_dir (totem_dir);
+ totem_ensure_dir (totem_dir);
+
+ return (const char *)totem_dir;
+}
+
+const char *
+totem_data_dot_dir (void)
+{
+ static char *totem_dir = NULL;
+
+ if (totem_dir != NULL) {
+ totem_ensure_dir (totem_dir);
+ return totem_dir;
+ }
+
+ totem_dir = g_build_filename (g_get_user_data_dir (),
+ "totem",
+ NULL);
+
+ totem_ensure_dir (totem_dir);
return (const char *)totem_dir;
}
Modified: trunk/src/totem-uri.h
==============================================================================
--- trunk/src/totem-uri.h (original)
+++ trunk/src/totem-uri.h Tue Jun 10 10:20:58 2008
@@ -30,6 +30,7 @@
G_BEGIN_DECLS
const char * totem_dot_dir (void);
+const char * totem_data_dot_dir (void);
char * totem_pictures_dir (void);
char * totem_create_full_path (const char *path);
GMount * totem_get_mount_for_media (const char *uri);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]