[libdazzle] shortcuts: allow NULL for self in set_theme_name



commit b21b40d68ac2b1323702aa19a49bc4d05537c98b
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jun 16 14:34:56 2017 -0700

    shortcuts: allow NULL for self in set_theme_name

 src/shortcuts/dzl-shortcut-manager.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index d8db57a..6b8e4b6 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -744,9 +744,12 @@ void
 dzl_shortcut_manager_set_theme_name (DzlShortcutManager *self,
                                      const gchar        *name)
 {
-  DzlShortcutManagerPrivate *priv = dzl_shortcut_manager_get_instance_private (self);
+  DzlShortcutManagerPrivate *priv;
 
-  g_return_if_fail (DZL_IS_SHORTCUT_MANAGER (self));
+  if (self == NULL)
+    self = dzl_shortcut_manager_get_default ();
+
+  priv = dzl_shortcut_manager_get_instance_private (self);
 
   if (name == NULL)
     name = "default";


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