[nautilus-python] As of nautilus 2.32, there will no longer be a ~/.nautilus folder, so we should take this opportunit
- From: Adam Plumb <adamplumb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-python] As of nautilus 2.32, there will no longer be a ~/.nautilus folder, so we should take this opportunit
- Date: Tue, 18 May 2010 17:57:02 +0000 (UTC)
commit c97253104e7d6b88803cbef529bd9e298fa8d9e3
Author: Adam Plumb <adamplumb gmail com>
Date: Tue May 18 13:56:57 2010 -0400
As of nautilus 2.32, there will no longer be a ~/.nautilus folder, so we should take this opportunity to start looking for extensions in the more correct ( or )/nautilus-python/extensions folders. We will continue to look in the old folders to keep the migration comfortable for developers/users
src/nautilus-python.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-python.c b/src/nautilus-python.c
index 8dd0c18..aad10a1 100644
--- a/src/nautilus-python.c
+++ b/src/nautilus-python.c
@@ -353,11 +353,22 @@ nautilus_module_initialize(GTypeModule *module)
all_types = g_array_new(FALSE, FALSE, sizeof(GType));
- nautilus_python_load_dir(module, NAUTILUS_EXTENSION_DIR "/python");
- user_extensions_dir = g_strdup_printf("%s/.nautilus/python-extensions/",
- g_get_home_dir());
+ // Look in the new global path, $DATADIR/nautilus-python/extensions
+ nautilus_python_load_dir(module, DATADIR "/nautilus-python/extensions");
+
+ // Look in XDG_DATA_DIR, ~/.local/share/nautilus-python/extensions
+ user_extensions_dir = g_build_filename(g_get_user_data_dir(),
+ "nautilus-python", "extensions", NULL);
+ nautilus_python_load_dir(module, user_extensions_dir);
+
+ // Look in the old local path, ~/.nautilus/python-extensions
+ user_extensions_dir = g_build_filename(g_get_home_dir(),
+ ".nautilus", "python-extensions", NULL);
nautilus_python_load_dir(module, user_extensions_dir);
g_free(user_extensions_dir);
+
+ // Look in the old global path, /usr/lib(64)/nautilus/extensions-2.0/python
+ nautilus_python_load_dir(module, NAUTILUS_EXTENSION_DIR "/python");
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]