[Reportbug-commits] [reportbug] 12/31: stop hardcoding .desktop icon

Sandro Tosi morph at moszumanska.debian.org
Mon Jan 16 01:36:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit 16ce2249341ec7d1cf20c81a466d05ce129b6cc6
Author: Boyuan Yang <073plan at gmail.com>
Date:   Sun Jan 15 01:12:42 2017 +0800

    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.
---
 debian/desktop           | 2 +-
 debian/reportbug.install | 1 +
 setup.py                 | 3 +--
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/debian/desktop b/debian/desktop
index c2ac03f..c40cf6e 100644
--- a/debian/desktop
+++ b/debian/desktop
@@ -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;
diff --git a/debian/reportbug.install b/debian/reportbug.install
new file mode 100644
index 0000000..38713f2
--- /dev/null
+++ b/debian/reportbug.install
@@ -0,0 +1 @@
+share/debian-swirl.svg /usr/share/icons/hicolor/scalable/places/
diff --git a/setup.py b/setup.py
index 691861f..9674b71 100755
--- a/setup.py
+++ b/setup.py
@@ -19,8 +19,7 @@ setup(name='reportbug', version=reportbug.VERSION_NUMBER,
       author_email='reportbug-maint at 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',

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list