Browse Source

stop hardcoding .desktop icon

This commit is made based on the following implication:
  - Reportbug *will* always use debian-swirl as its icon
  - The standard icon for debian-swirl is from gnome-icon-theme
  - Reportbug is suitable to provide "places/debian-swirl" icon
    in fallback "hicolor" theme.

As a result, the following changes were made:
  - Do not install bundled debian-swirl.svg into private dir,
    as previously written in setup.py.
  + Instead, install SVG file into
    $prefix/icons/hicolor/scalable/places/ using dh_install.
  * On GNOME system when $prefix/icons/gnome/ dir exists, this svg
    file will be overridden by the icon provided by GNOME.
  * If *any* other icon theme (e.g., Numix, etc) provides the
    debian-swirl icon, that will override the svg file provided by
    reportbug.
  * If no other icon theme exists and GNOME is not installed, the
    fallback (hicolor theme) svg icon will be used.

I believe that is enough to fix Debian Bug #836253.

For more information, please refer to the Icon Theme Specification:
https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html.
tags/7.1.3
Boyuan Yang Sandro Tosi 4 years ago
parent
commit
16ce224934
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      debian/desktop
  2. +1
    -0
      debian/reportbug.install
  3. +1
    -2
      setup.py

+ 1
- 1
debian/desktop View File

@@ -11,7 +11,7 @@ GenericName[ru]=Отчёт об ошибке Reportbug
GenericName[zh_CN]=Debian 缺陷报告工具
X-GNOME-FullName[ru]=Отчёт об ошибке Reportbug
X-GNOME-FullName[zh_CN]=Debian 缺陷报告工具
Icon=/usr/share/reportbug/debian-swirl.svg
Icon=debian-swirl
TryExec=reportbug
Exec=reportbug --exit-prompt --ui gtk2
Categories=System;


+ 1
- 0
debian/reportbug.install View File

@@ -0,0 +1 @@
share/debian-swirl.svg /usr/share/icons/hicolor/scalable/places/

+ 1
- 2
setup.py View File

@@ -19,8 +19,7 @@ setup(name='reportbug', version=reportbug.VERSION_NUMBER,
author_email='reportbug-maint@lists.alioth.debian.org',
url='http://alioth.debian.org/projects/reportbug',
data_files=[('share/reportbug', ['share/handle_bugscript',
'share/reportbug.el',
'share/debian-swirl.svg']),
'share/reportbug.el',]),
('share/bug/reportbug', ['share/presubj', 'share/script',
'share/control'])],
license='MIT',


Loading…
Cancel
Save