[webkit-gtk] rendering page from gresource

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Sun Mar 21 12:28:44 PDT 2021


Hi all

I'm playing a bit with Alexa and gtkmm and I'm trying to do really
simple things. Read from the resource index.html and main...js

<?xml version="1.0" encoding="UTF-8"?>
<gresources>
  <gresource prefix="@APPLICATION_PREFIX@">
    <file preprocess="xml-stripblanks">ui/window.glade</file>
    <file preprocess="xml-stripblanks">ui/headerbar.glade</file>
    <file preprocess="xml-stripblanks">ui/preferences.glade</file>
    <file preprocess="xml-stripblanks">ui/menu.glade</file>
    <file>alexa/index.html</file>
    <file>alexa/main.bundle.js</file>
    <file>icons/48x48/icon.png</file>
  </gresource>
</gresources>

Things are inside the resource and

webview->load_uri(projectdefinitions::getApplicationPrefix() +
"alexa/index.html");
webview->set_visible();

This does not fail but:
gtk_on_load_changed(WebKitWebView* webView, WebKitLoadEvent loadEvent,
gpointer userData)

this is not triggered. If I load from a local file things are ok. Can
anyone knows what is going on?

Michael


More information about the webkit-gtk mailing list