[libdazzle] app: load icons when dzl_application_add_resource_path()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] app: load icons when dzl_application_add_resource_path()
- Date: Mon, 5 Jun 2017 21:33:12 +0000 (UTC)
commit 7257d3a7eb58ae7aa9512f7d9093ec9dbc0f8c4c
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 5 14:33:00 2017 -0700
app: load icons when dzl_application_add_resource_path()
We want to ensure that $resource_path/icons/ is used to locate icons
during application runtime.
src/app/dzl-application.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/app/dzl-application.c b/src/app/dzl-application.c
index 949c023..927e114 100644
--- a/src/app/dzl-application.c
+++ b/src/app/dzl-application.c
@@ -55,6 +55,7 @@ dzl_application_real_add_resource_path (DzlApplication *self,
g_autoptr(GError) error = NULL;
g_autofree gchar *menu_path = NULL;
g_autofree gchar *keythemes_path = NULL;
+ g_autofree gchar *icons_path = NULL;
guint merge_id;
g_assert (DZL_IS_APPLICATION (self));
@@ -86,6 +87,14 @@ dzl_application_real_add_resource_path (DzlApplication *self,
*/
keythemes_path = g_build_filename (resource_path, "keythemes", NULL);
dzl_shortcut_manager_append_search_path (priv->shortcut_manager, keythemes_path);
+
+ /*
+ * We want to allow loading icons from $resource_path/icons/ just like Gtk
+ * will do for the base application. However, we cannot remove these once
+ * they've been added, so remove_resource_path() does nothing.
+ */
+ icons_path = g_build_filename (resource_path, "icons", NULL);
+ gtk_icon_theme_add_resource_path (gtk_icon_theme_get_default (), icons_path);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]