Re: loading image resources from relative directories

Juan Pablo Ugarte <[email protected]> Wed, 28 Feb 2018 14:58:46 -0300
Newsgroups gmane.comp.gnome.glade.user
Message-ID <[email protected]>
--===============6086384521257649292==
Content-Type: multipart/alternative; boundary="=-ZHY7jdSbabY86cfbuyAP"


--=-ZHY7jdSbabY86cfbuyAP
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit

On Wed, 2018-02-28 at 16:56 +0100, Luca Bacci wrote:
> Hello, I have a problem regarding using glade with image data in
> subdirectories.
> 
> I have a .ui file in a directory, with a 'icons' subdirectory
> 
> ./example.ui
> ./icons/icon.svg
> ./icons/icon2.svg
> ...
> 
> I have many GtkImage where 'pixbuf' property is set to
> 'icons/icon.svg',  'icons/icon2.svg' ecc.
> 
> Finally, I have added this to the .ui definiton:
> 
> <requires lib="gtk+" version="3.20"/>
>   <!-- interface-local-resource-path . -->
>   ...
> 
> But Glade doesn't show icons. Is there a way to get this to work?

Current glade versions only load files from the same directory as the
.ui or the path you specify in the project preferences

This is fixed in master and glade-3-20 branches but I havent made a
release yet, but you should be able to use glade nightly

sudo flatpak remote-add gnome-nightly https://sdk.gnome.org/gnome-night
ly.flatpakrepo
sudo flatpak remote-add gnome-apps-nightly https://sdk.gnome.org/gnome-
apps-nightly.flatpakrepo
sudo flatpak install gnome-apps-nightly org.gnome.Glade

hope this helps

Juan Pablo


--=-ZHY7jdSbabY86cfbuyAP
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head></head><body><div>On Wed, 2018-02-28 at 16:56 +0100, Luca Bacci=
 wrote:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-l=
eft:2px #729fcf solid;padding-left:1ex"><div dir=3D"ltr"><div>Hello, I have=
 a problem regarding using glade with image data in subdirectories.</div><d=
iv><br></div><div>I have a .ui file in a directory, with a 'icons' subdirec=
tory<br></div><div><br></div><div>./example.ui</div><div>./icons/icon.svg</=
div><div>./icons/icon2.svg<br></div><div>...<br></div><div><br></div><div>I=
 have many GtkImage where 'pixbuf' property is set to 'icons/icon.svg',  'i=
cons/icon2.svg' ecc.<br></div><div><br></div><div>Finally, I have added thi=
s to the .ui definiton:</div><div><br></div><div>&lt;requires lib=3D"gtk+" =
version=3D"3.20"/&gt;<br>&nbsp; &lt;!-- interface-local-resource-path . --&=
gt;<br></div><div>&nbsp; ...</div><div><br></div><div>But Glade doesn't sho=
w icons. Is there a way to get this to work?</div></div></blockquote><div><=
br></div><div>Current glade versions only load files from the same director=
y as the .ui or the path you specify in the project preferences</div><div><=
br></div><div>This is fixed in master and glade-3-20 branches but I havent =
made a release yet, but you should be able to use glade nightly</div><div><=
br></div><div>sudo flatpak remote-add gnome-nightly <a href=3D"https://sdk.=
gnome.org/gnome-nightly.flatpakrepo">https://sdk.gnome.org/gnome-nightly.fl=
atpakrepo</a></div><div>sudo flatpak remote-add gnome-apps-nightly <a href=
=3D"https://sdk.gnome.org/gnome-apps-nightly.flatpakrepo">https://sdk.gnome=
.org/gnome-apps-nightly.flatpakrepo</a></div><div>sudo flatpak install gnom=
e-apps-nightly org.gnome.Glade</div><div><br></div><div>hope this helps</di=
v><div><br></div><div>Juan Pablo</div><div><br></div></body></html>
--=-ZHY7jdSbabY86cfbuyAP--


--===============6086384521257649292==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KR2xhZGUtdXNl
cnMgbWFpbGxpc3QgIC0gIEdsYWRlLXVzZXJzQGxpc3RzLmRvdC5uZXQKaHR0cDovL2xpc3RzLmRv
dC5uZXQvbWFpbG1hbi9saXN0aW5mby9nbGFkZS11c2Vycwo=

--===============6086384521257649292==--