[epiphany] Fix loading of GTK+ theming CSS resources in webapp mode



commit f3de658c067bbee3b9eb5735fe96e8053e3c97c3
Author: Adrian Perez de Castro <aperez igalia com>
Date:   Sat Jun 2 03:42:06 2018 +0100

    Fix loading of GTK+ theming CSS resources in webapp mode
    
    In webapp mode a different application identifier is used, which causes
    DzlCssProvider to derive the wrong resource paths and causes Epiphany's
    CSS stylesheets to not be loaded. This manually adds the resource path
    "/org/gnome/Epiphany" when running in webapp mode, which results in the
    CSS snippets being loaded correctly.
    
    Note that the resource path "/org/gnome/Epiphany/WebApp" is not removed,
    but this is not a problem because DzlCssProvider tries all the registered
    resource paths. As a side effect, we could add different GTK+ styling for
    webapp mode by placing CSS style sheets in this resource path, if desired.

 src/ephy-shell.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index d55d9424f..917b82388 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -633,6 +633,11 @@ ephy_shell_constructed (GObject *object)
     g_application_set_flags (G_APPLICATION (object), flags);
   }
 
+  if (ephy_embed_shell_get_mode (EPHY_EMBED_SHELL (object)) == EPHY_EMBED_SHELL_MODE_APPLICATION) {
+    dzl_application_add_resources (DZL_APPLICATION (object),
+                                   "resource:///org/gnome/Epiphany");
+  }
+
   /* FIXME: not sure if this is the best place to put this stuff. */
   ephy_shell_get_lockdown (EPHY_SHELL (object));
 


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