mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 15:41:40 +00:00
3ab1993b1f
When deja-dup is installed, Nautilus segfaults on start due to the missing gsettings schemas. This commit hardcodes path to the compiled schemas file to the extension.
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
--- a/deja-dup/nautilus/NautilusExtension.c
|
|
+++ b/deja-dup/nautilus/NautilusExtension.c
|
|
@@ -24,6 +24,8 @@
|
|
#include <glib/gi18n-lib.h>
|
|
|
|
GList *dirs = NULL;
|
|
+GSettingsSchemaSource *schema_source = NULL;
|
|
+GSettingsSchema *schema = NULL;
|
|
GSettings *settings = NULL;
|
|
|
|
// This will treat a < b iff a is 'lower' in the file tree than b
|
|
@@ -313,7 +315,13 @@
|
|
bindtextdomain(GETTEXT_PACKAGE, LOCALE_DIR);
|
|
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
|
|
|
|
- settings = g_settings_new("org.gnome.DejaDup");
|
|
+ schema_source = g_settings_schema_source_new_from_directory ("@DEJA_DUP_GSETTINGS_PATH@",
|
|
+ g_settings_schema_source_get_default (), TRUE, NULL);
|
|
+
|
|
+ schema = g_settings_schema_source_lookup (schema_source,
|
|
+ "org.gnome.DejaDup", FALSE);
|
|
+
|
|
+ settings = g_settings_new_full (schema, NULL, NULL);
|
|
g_signal_connect(settings, "changed::include-list",
|
|
update_include_excludes, NULL);
|
|
g_signal_connect(settings, "changed::exclude-list",
|
|
@@ -329,7 +337,11 @@
|
|
|
|
void nautilus_module_shutdown(void)
|
|
{
|
|
+ g_settings_schema_source_unref(schema_source);
|
|
+ g_settings_schema_unref(schema);
|
|
g_object_unref(settings);
|
|
+ schema_source = NULL;
|
|
+ schema = NULL;
|
|
settings = NULL;
|
|
|
|
update_include_excludes(); /* will clear it now that settings is NULL */
|