Wireshark-bugs: [Wireshark-bugs] [Bug 10737] Wireshark should be installing icons as part of "ma
Date: Tue, 02 Dec 2014 00:06:03 +0000

Comment # 6 on bug 10737 from
(This is all for UNIX+{X11,Wayland,Mir} desktops; on OS X and Windows desktops,
Wireshark should do what's appropriate for those desktops.)

The freedesktop.org icon theme specification at

   
http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

says, in the "Directory Layout" section:

    Icons and themes are looked for in a set of directories. By default, apps
should look in $HOME/.icons (for backwards compatibility), in
$XDG_DATA_DIRS/icons and in /usr/share/pixmaps (in that order). Applications
may further add their own icon directories to this list, and users may extend
or change the list (in application/desktop specific ways).In each of these
directories themes are stored as subdirectories. A theme can be spread across
several base directories by having subdirectories of the same name. This way
users can extend and override system themes.

    In order to have a place for third party applications to install their
icons there should always exist a theme called "hicolor" [1]. The data for the
hicolor theme is available for download at:
http://www.freedesktop.org/software/icon-theme/. Implementations are required
to look in the "hicolor" theme if an icon was not found in the current theme.

    Each theme is stored as subdirectories of the base directories. The
internal name of the theme is the name of the subdirectory, although the
user-visible name as specified by the theme may be different. Hence, theme
names are case sensitive, and are limited to ASCII characters. Theme names may
also not contain comma or space.

    In at least one of the theme directories there must be a file called
index.theme that describes the theme. The first index.theme found while
searching the base directories in order is used. This file describes the
general attributes of the theme.

    In the theme directory are also a set of subdirectories containing image
files. Each directory contains icons designed for a certain nominal icon size,
as described by the index.theme file. The subdirectories are allowed to be
several levels deep, e.g. the subdirectory "48x48/apps" in the theme "hicolor"
would end up at $basedir/hicolor/48x48/apps.

    The image files must be one of the types: PNG, XPM, or SVG, and the
extension must be ".png", ".xpm", or ".svg" (lower case). The support for SVG
files is optional. Implementations that do not support SVGs should just ignore
any ".svg" files. In addition to this there may be an additional file with
extra icon-data for each file. It should have the same basename as the image
file, with the extension ".icon". e.g. if the icon file is called
"mime_source_c.png" the corresponding file would be named "mime_source_c.icon".

The latest XDG Base Directory Specification at

    http://standards.freedesktop.org/basedir-spec/latest/ar01s02.html

and

    http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html

(sigh, no all-on-one-page single HTML file):

    There is a set of preference ordered base directories relative to which
data files should be searched. This set of directories is defined by the
environment variable $XDG_DATA_DIRS.

and

    $XDG_DATA_DIRS defines the preference-ordered set of base directories to
search for data files in addition to the $XDG_DATA_HOME base directory. The
directories in $XDG_DATA_DIRS should be seperated with a colon ':'.

    If $XDG_DATA_DIRS is either not set or empty, a value equal to
/usr/local/share/:/usr/share/ should be used.

share/icons/Makefile.am in the current Inkscape source contains:

    SUBDIRS = application

    iconsdir = $(datadir)/inkscape/icons

    pixmaps = \
        (list of icons, most of which are PNGs or SVGs)

    icons_DATA = \
            $(pixmaps) \
            inkscape.svg \
            \
            icons.svg \
            tango_icons.svg \
            \
            inkscape.file.svg \
            inkscape.file.png \
            README

    EXTRA_DIST = \
            $(icons_DATA) \
            hicolor/index.theme

and share/icons/application/Makefile.am contains:

    SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256

    gtk_update_icon_cache = gtk-update-icon-cache -f -t
$(datadir)/icons/hicolor

    install-data-hook: update-icon-cache
    uninstall-hook: update-icon-cache

    update-icon-cache:
            @-if test -z "$(DESTDIR)"; then \
            echo "Updating Gtk icon cache."; \
            $(gtk_update_icon_cache); \
            else \
            echo "*** Icon cache not updated. After (un)install, run this:"; \
            echo "*** $(gtk_update_icon_cache)"; \
            fi

share/icons/hicolor/index.theme is, for what it's worth, empty.

The automake manual says, in section 2.2.3 "Standard Directory Variables"

        The GNU Coding Standards also specify a hierarchy of variables to
denote installation directories. Some of these are:

        Directory variable    Default value
        prefix    /usr/local
          exec_prefix    ${prefix}
            bindir    ${exec_prefix}/bin
            libdir    ${exec_prefix}/lib
            …
          includedir    ${prefix}/include
          datarootdir    ${prefix}/share
            datadir    ${datarootdir}
            mandir    ${datarootdir}/man
            infodir    ${datarootdir}/info
            docdir    ${datarootdir}/doc/${PACKAGE}

so it would appear that Inkscape, by default, would install the icons in
/usr/local/share/inkscape/icons.

So I guess what Inkscape is doing is the "Applications may further add their
own icon directories to this list" part of the spec, adding
/usr/local/share/inkscape/icons to the list.  Presumably, for icons it doesn't
supply itself, it relies on the standard search path.

Perhaps Wireshark should install its icons in $(datadir)/wireshark/icons.


You are receiving this mail because:
  • You are watching all bug changes.