← Back to team overview

openshot.developers team mailing list archive

Re: Determining system's pixmap path

 

Yes this helps, thanks.  I don't think I need to use the python-xdg, since
I'm not using the icon at /usr/share/pixmaps in the actual program.  I have
the same icon available inside the OpenShot code which is loaded as a
relative path on all of gtk windows, etc...

And yes, I understand that only a few things should be located in the user's
home folder, such as the Thumbnail folder and Queue folder (which are both
temp runtime folders).

By the way, I've committed your patch for the .desktop file to the trunk
last night.

Thanks!
-Jonathan


On Wed, Aug 26, 2009 at 4:24 AM, TJ <ubuntu@xxxxxxxxxxx> wrote:

> On Tue, 2009-08-25 at 23:10 -0500, Jonathan Thomas wrote:
> > So, here is the question.  If I understand correctly, the OpenShot
> > icon should go in the ~/.icons folder.
>
> No, the debian package will install the icon (via the
> "debian/openshot.install" file) to the system
> location /usr/share/pixmaps/.
>
> I did some more digging this morning and found that there is a Python
> package on Ubuntu - "python-xdg" - that wraps the Free Desktop XDG
> specifications nicely - I assume it'll be available widely for Python on
> other distros since it comes from:
>
> http://www.freedesktop.org/wiki/Software/pyxdg
>
> dpkg-query -L python-xdg
>
> shows it includes some useful examples including one specifically for
> Icons:
>
> /usr/share/doc/python-xdg/examples/test-icon.py
>
> Which contains:
>
> #!/usr/bin/python
> from xdg.IconTheme import *
>
> print getIconPath("opera")
>
> Using this I did a test (after having installed the openshot package I'm
> developing) which shows it works using getIconPath():
>
> $ python
> Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
> [GCC 4.3.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from xdg.IconTheme import *
> >>> print getIconPath("openshot_logo")
> /usr/share/pixmaps/openshot_logo.png
> >>> print getIconPath("openshot")
> None
> >>>
>
> I can have the openshot package depend on python-xdg so you can rely on
> it being available if that is something you want to do?
>
> The only objects that should go in the user's folder are per-user,
> per-session settings and (temporary) resources related to the
> application configuration or projects.
>
> Don't let me confuse you into thinking anything related to the core
> application and its resources should be anywhere other than in sytem
> locations!
>
> Hope this helps.
>
>

Follow ups

References