[libdazzle] shortcuts: handle prefix of resource://
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] shortcuts: handle prefix of resource://
- Date: Thu, 15 Jun 2017 01:12:14 +0000 (UTC)
commit fe7fea055708c01fdbc23999a42d81f3e5110303
Author: Christian Hergert <chergert redhat com>
Date: Wed Jun 14 18:11:40 2017 -0700
shortcuts: handle prefix of resource://
Since changing to consistent use of resource:///path/to/item, we missed
adjusting our path for loading resources.
src/shortcuts/dzl-shortcut-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index 1d1871f..55b4e94 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -444,6 +444,9 @@ dzl_shortcut_manager_load_resources (DzlShortcutManager *self,
g_assert (g_str_has_prefix (resource_dir, "resource://"));
g_assert (!cancellable || G_IS_CANCELLABLE (cancellable));
+ if (g_str_has_prefix (resource_dir, "resource://"))
+ resource_dir += strlen ("resource://");
+
children = g_resources_enumerate_children (resource_dir, 0, NULL);
if (children != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]