[libdazzle] shortcuts: ensure that theme resources are loaded



commit 4740ff7a7ea0d3bf8049286d45a9e5386bdcc90d
Author: Christian Hergert <chergert redhat com>
Date:   Sat Jun 17 01:11:50 2017 -0700

    shortcuts: ensure that theme resources are loaded
    
    We need to use the set_theme() API so that the new theme has it's
    resources loaded (for CSS extensions, etc).

 src/shortcuts/dzl-shortcut-manager.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index f0048f0..6ef8523 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -222,13 +222,15 @@ dzl_shortcut_manager_reload (DzlShortcutManager *self,
   if (theme_name != NULL)
     {
       theme = dzl_shortcut_manager_get_theme_by_name (self, theme_name);
-      g_set_object (&priv->theme, theme);
+      if (theme != NULL)
+        dzl_shortcut_manager_set_theme (self, theme);
     }
 
   if (priv->theme == NULL && parent_theme_name != NULL)
     {
       theme = dzl_shortcut_manager_get_theme_by_name (self, parent_theme_name);
-      g_set_object (&priv->theme, theme);
+      if (theme != NULL)
+        dzl_shortcut_manager_set_theme (self, theme);
     }
 
   /* Notify possibly changed properties */


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