Re: GLib doesn't find the ui resource


I can tell from C API perspective.

When you are using gtk-builder-add-from-resource ( system is looking for path from resource file compiled by glib-compile-resources (

Format for resource file is in

e.g. (in this case path is "data/splashscreen.png" - it is not real file only path to resource in compiled file - this path is use in call to gtk-builder-add-from-resource)

<?xml version="1.0" encoding="UTF-8"?>
  <gresource prefix="/org/gtk/Example">
    <file compressed="true">dialog.ui</file>
    <file preprocess="xml-stripblanks">menumarkup.xml</file>

It you want to load real ui (created by glade) file from filestystem you shoud use gtk-builder-add-from-file

Maybe in python you should use another method from api therefore,


W dniu 2017-08-30 o 15:48, Sascha Manns pisze:
Hello list,

i have written some ui files which are compiled through make [1]. I
installed the compiled file in /usr/share/gnome-publisher.

Also i used this lines to add stuff from the resource:
builder = Gtk.Builder()

builder.add_from_resource("/org/gnome/Publisher/ui/main_intro.ui") [2]

But if i'm running my app, i'm getting:

Traceback (most recent call last):
line 54, in do_startup
GLib.Error: g-resource-error-quark: The resource at
“/org/gnome/Publisher/gtk/app_menu.ui” does not exist (0)
Traceback (most recent call last):
line 96, in do_activate
GLib.Error: g-resource-error-quark: The resource at
“/org/gnome/Publisher/ui/main_intro.ui” does not exist (0)

But where the GLib searches for the file?


gtk-list mailing list
gtk-list gnome org

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