Re: loading image resources from relative directories

Luca Bacci <[email protected]> Wed, 28 Feb 2018 21:44:53 +0100
Newsgroups gmane.comp.gnome.glade.user
Message-ID <CAJSEPt1MCGSaduUjawZAVivUW=A+xtHQ10AZesbhT0nsWx0_nA@mail.gmail.com>
--===============5710091910158048978==
Content-Type: multipart/alternative; boundary="001a1144298ec1e28b05664bd088"

--001a1144298ec1e28b05664bd088
Content-Type: text/plain; charset="UTF-8"

Awesome, thanks!

Il 28/feb/2018 18:58, "Juan Pablo Ugarte" <[email protected]> ha
scritto:

> 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-
> nightly.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
>
>

--001a1144298ec1e28b05664bd088
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">Awesome, thanks! </p>
<div class=3D"gmail_extra"><br><div class=3D"gmail_quote">Il 28/feb/2018 18=
:58, &quot;Juan Pablo Ugarte&quot; &lt;<a href=3D"mailto:juanpablougarte@gm=
ail.com">[email protected]</a>&gt; ha scritto:<br type=3D"attributi=
on"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
t:1px #ccc solid;padding-left:1ex"><div><div>On Wed, 2018-02-28 at 16:56 +0=
100, Luca Bacci wrote:</div><blockquote type=3D"cite" style=3D"margin:0 0 0=
 .8ex;border-left:2px #729fcf solid;padding-left:1ex"><div dir=3D"ltr"><div=
>Hello, I have a problem regarding using glade with image data in subdirect=
ories.</div><div><br></div><div>I have a .ui file in a directory, with a &#=
39;icons&#39; subdirectory<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 &#39;pixbuf&#39; property i=
s set to &#39;icons/icon.svg&#39;,  &#39;icons/icon2.svg&#39; ecc.<br></div=
><div><br></div><div>Finally, I have added this to the .ui definiton:</div>=
<div><br></div><div>&lt;requires lib=3D&quot;gtk+&quot; version=3D&quot;3.2=
0&quot;/&gt;<br>=C2=A0 &lt;!-- interface-local-resource-path . --&gt;<br></=
div><div>=C2=A0 ...</div><div><br></div><div>But Glade doesn&#39;t show ico=
ns. 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 directory 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" target=3D"_blank">https://sdk.gnome.org/gno=
me-<wbr>nightly.flatpakrepo</a></div><div>sudo flatpak remote-add gnome-app=
s-nightly <a href=3D"https://sdk.gnome.org/gnome-apps-nightly.flatpakrepo" =
target=3D"_blank">https://sdk.gnome.org/gnome-<wbr>apps-nightly.flatpakrepo=
</a></div><div>sudo flatpak install gnome-apps-nightly org.gnome.Glade</div=
><div><br></div><div>hope this helps</div><div><br></div><div>Juan Pablo</d=
iv><div><br></div></div></blockquote></div></div>

--001a1144298ec1e28b05664bd088--

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

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KR2xhZGUtdXNl
cnMgbWFpbGxpc3QgIC0gIEdsYWRlLXVzZXJzQGxpc3RzLmRvdC5uZXQKaHR0cDovL2xpc3RzLmRv
dC5uZXQvbWFpbG1hbi9saXN0aW5mby9nbGFkZS11c2Vycwo=

--===============5710091910158048978==--