[libdazzle] shortcuts: set manager before merging themes
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] shortcuts: set manager before merging themes
- Date: Tue, 13 Jun 2017 06:48:35 +0000 (UTC)
commit 6b06f1500ef492a01129f2e5a580f3d56d07d10b
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 12 19:05:08 2017 -0700
shortcuts: set manager before merging themes
src/shortcuts/dzl-shortcut-manager.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index f8ea532..55d52cb 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -175,6 +175,7 @@ dzl_shortcut_manager_reload (DzlShortcutManager *self,
"title", _("Default Shortcuts"),
"parent-name", "__internal__",
NULL));
+ _dzl_shortcut_theme_set_manager (g_ptr_array_index (priv->themes, 0), self);
g_list_model_items_changed (G_LIST_MODEL (self), 0, previous_len, 1);
/*
@@ -376,9 +377,11 @@ dzl_shortcut_manager_load_directory (DzlShortcutManager *self,
theme = dzl_shortcut_theme_new (NULL);
if (dzl_shortcut_theme_load_from_path (theme, path, cancellable, &local_error))
- dzl_shortcut_manager_merge (self, theme);
- else
- g_warning ("%s", local_error->message);
+ {
+ _dzl_shortcut_theme_set_manager (theme, self);
+ dzl_shortcut_manager_merge (self, theme);
+ }
+ else g_warning ("%s", local_error->message);
}
}
@@ -414,7 +417,10 @@ dzl_shortcut_manager_load_resources (DzlShortcutManager *self,
theme = dzl_shortcut_theme_new (NULL);
if (dzl_shortcut_theme_load_from_data (theme, data, len, &local_error))
- dzl_shortcut_manager_merge (self, theme);
+ {
+ _dzl_shortcut_theme_set_manager (theme, self);
+ dzl_shortcut_manager_merge (self, theme);
+ }
else
g_warning ("%s", local_error->message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]