From d83bccb64d612034be471c0724edd129519c3584 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sat, 16 Mar 2019 11:19:20 +0100 Subject: GEN png icons from hicolor_apps_scalable_mate.svg Update icon cache and avoid conflict with mate theme: PNG icons are created if they are not present in icon folder. To remove png icons: cd icons; make clean-png-icons $ cat test.py import gtk screen = gtk.gdk.screen_get_default() icon_theme = gtk.icon_theme_get_for_screen(screen) print icon_theme.lookup_icon("mate-desktop", 16, 0).get_filename() print icon_theme.lookup_icon("mate-desktop", 22, 0).get_filename() print icon_theme.lookup_icon("mate-desktop", 24, 0).get_filename() print icon_theme.lookup_icon("mate-desktop", 32, 0).get_filename() print icon_theme.lookup_icon("mate-desktop", 48, 0).get_filename() print icon_theme.lookup_icon("mate-desktop", 128, 0).get_filename() print icon_theme.lookup_icon("mate-desktop", 256, 0).get_filename() print icon_theme.lookup_icon("mate", 16, 0).get_filename() print icon_theme.lookup_icon("mate", 22, 0).get_filename() print icon_theme.lookup_icon("mate", 24, 0).get_filename() print icon_theme.lookup_icon("mate", 32, 0).get_filename() print icon_theme.lookup_icon("mate", 48, 0).get_filename() print icon_theme.lookup_icon("mate", 128, 0).get_filename() print icon_theme.lookup_icon("mate", 256, 0).get_filename() print icon_theme.lookup_icon("mate", 1000, 0).get_filename() $ python test.py /usr/share/icons/hicolor/16x16/apps/mate-desktop.png /usr/share/icons/hicolor/22x22/apps/mate-desktop.png /usr/share/icons/hicolor/24x24/apps/mate-desktop.png /usr/share/icons/hicolor/32x32/apps/mate-desktop.png /usr/share/icons/hicolor/48x48/apps/mate-desktop.png /usr/share/icons/hicolor/128x128/apps/mate-desktop.png /usr/share/icons/hicolor/scalable/apps/mate-desktop.svg /usr/share/icons/mate/16x16/apps/mate.png /usr/share/icons/mate/22x22/apps/mate.png /usr/share/icons/mate/24x24/apps/mate.png /usr/share/icons/mate/32x32/apps/mate.png /usr/share/icons/mate/48x48/apps/mate.png /usr/share/icons/mate/scalable/apps/mate.svg /usr/share/icons/mate/scalable/apps/mate.svg /usr/share/icons/mate/scalable/apps/mate.svgT --- .travis.yml | 4 + configure.ac | 6 + icons/Makefile.am | 49 ++++-- icons/hicolor_apps_128x128_mate-desktop.png | Bin 0 -> 14624 bytes icons/hicolor_apps_16x16_mate-desktop.png | Bin 0 -> 893 bytes icons/hicolor_apps_16x16_mate.png | Bin 774 -> 0 bytes icons/hicolor_apps_22x22_mate-desktop.png | Bin 0 -> 1383 bytes icons/hicolor_apps_22x22_mate.png | Bin 1323 -> 0 bytes icons/hicolor_apps_24x24_mate-desktop.png | Bin 0 -> 1586 bytes icons/hicolor_apps_24x24_mate.png | Bin 1511 -> 0 bytes icons/hicolor_apps_256x256_mate.png | Bin 31357 -> 0 bytes icons/hicolor_apps_32x32_mate-desktop.png | Bin 0 -> 2390 bytes icons/hicolor_apps_32x32_mate.png | Bin 2180 -> 0 bytes icons/hicolor_apps_48x48_mate-desktop.png | Bin 0 -> 4223 bytes icons/hicolor_apps_48x48_mate.png | Bin 4164 -> 0 bytes ...hicolor_apps_scalable_mate-desktop-symbolic.svg | 24 +++ icons/hicolor_apps_scalable_mate-desktop.svg | 178 +++++++++++++++++++++ icons/hicolor_apps_scalable_mate-symbolic.svg | 24 --- icons/hicolor_apps_scalable_mate.svg | 178 --------------------- mate-about/mate-about.h | 2 +- 20 files changed, 251 insertions(+), 214 deletions(-) create mode 100644 icons/hicolor_apps_128x128_mate-desktop.png create mode 100644 icons/hicolor_apps_16x16_mate-desktop.png delete mode 100644 icons/hicolor_apps_16x16_mate.png create mode 100644 icons/hicolor_apps_22x22_mate-desktop.png delete mode 100644 icons/hicolor_apps_22x22_mate.png create mode 100644 icons/hicolor_apps_24x24_mate-desktop.png delete mode 100644 icons/hicolor_apps_24x24_mate.png delete mode 100644 icons/hicolor_apps_256x256_mate.png create mode 100644 icons/hicolor_apps_32x32_mate-desktop.png delete mode 100644 icons/hicolor_apps_32x32_mate.png create mode 100644 icons/hicolor_apps_48x48_mate-desktop.png delete mode 100644 icons/hicolor_apps_48x48_mate.png create mode 100644 icons/hicolor_apps_scalable_mate-desktop-symbolic.svg create mode 100644 icons/hicolor_apps_scalable_mate-desktop.svg delete mode 100644 icons/hicolor_apps_scalable_mate-symbolic.svg delete mode 100644 icons/hicolor_apps_scalable_mate.svg diff --git a/.travis.yml b/.travis.yml index 188b9a1..75954b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,6 +65,7 @@ requires: - gtk3 - intltool - iso-codes + - librsvg - make - mate-common - startup-notification @@ -86,6 +87,7 @@ requires: - libglib2.0-doc - libgtk-3-dev - libgtk-3-doc + - librsvg2-bin - libstartup-notification0-dev - libx11-dev - libxml2-dev @@ -105,6 +107,7 @@ requires: - gtk3-devel - iso-codes-devel - itstool + - librsvg2-tools - make - mate-common - redhat-rpm-config @@ -124,6 +127,7 @@ requires: - libglib2.0-doc - libgtk-3-dev - libgtk-3-doc + - librsvg2-bin - libstartup-notification0-dev - libx11-dev - libxml2-dev diff --git a/configure.ac b/configure.ac index 1e14e3c..45b20b6 100644 --- a/configure.ac +++ b/configure.ac @@ -228,6 +228,12 @@ AC_SEARCH_LIBS([sqrt], [m]) # check for gtk-doc GTK_DOC_CHECK([1.4]) +dnl ICONS: convert svg to png +AC_PATH_PROG(RSVG_CONVERT, rsvg-convert) +if test x$RSVG_CONVERT = x ; then + AC_MSG_ERROR([could not locate rsvg-convert]) +fi + AC_CONFIG_FILES([ Makefile mate-about/Makefile diff --git a/icons/Makefile.am b/icons/Makefile.am index 6fc233a..8c0bb75 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -1,27 +1,37 @@ NULL = public_icons_themes = \ - hicolor \ + hicolor \ + $(NULL) + +png_icons = \ + hicolor_apps_16x16_mate-desktop.png \ + hicolor_apps_22x22_mate-desktop.png \ + hicolor_apps_24x24_mate-desktop.png \ + hicolor_apps_32x32_mate-desktop.png \ + hicolor_apps_48x48_mate-desktop.png \ + hicolor_apps_128x128_mate-desktop.png \ $(NULL) public_icons = \ - hicolor_apps_16x16_mate.png \ - hicolor_apps_22x22_mate.png \ - hicolor_apps_24x24_mate.png \ - hicolor_apps_32x32_mate.png \ - hicolor_apps_48x48_mate.png \ - hicolor_apps_256x256_mate.png \ - hicolor_apps_scalable_mate.svg \ - hicolor_apps_scalable_mate-symbolic.svg \ + $(png_icons) \ + hicolor_apps_scalable_mate-desktop.svg \ + hicolor_apps_scalable_mate-desktop-symbolic.svg \ $(NULL) +hicolor_apps_%.png: hicolor_apps_scalable_mate-desktop.svg + $(RSVG_CONVERT) \ + -w $(word 1, $(subst x, ,$(word 1,$(subst _, ,$*)))) \ + -h $(word 2, $(subst x, ,$(word 1,$(subst _, ,$*)))) \ + $^ -o $@ + EXTRA_DIST = \ - $(public_icons) \ + $(public_icons) \ $(NULL) ############################################################################### -install-icons: +install-icons: $(public_icons) for icon in $(public_icons); do \ THEME=`echo $$icon | cut -d_ -f1`; \ CONTEXT=`echo $$icon | cut -d_ -f2`; \ @@ -43,3 +53,20 @@ uninstall-icons: install-data-local: install-icons uninstall-local: uninstall-icons + +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: $(public_icons) + @-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 + +.PHONY: clean-png-icons +clean-png-icons: + rm -f $(png_icons) diff --git a/icons/hicolor_apps_128x128_mate-desktop.png b/icons/hicolor_apps_128x128_mate-desktop.png new file mode 100644 index 0000000..d1fa3fb Binary files /dev/null and b/icons/hicolor_apps_128x128_mate-desktop.png differ diff --git a/icons/hicolor_apps_16x16_mate-desktop.png b/icons/hicolor_apps_16x16_mate-desktop.png new file mode 100644 index 0000000..dd853cc Binary files /dev/null and b/icons/hicolor_apps_16x16_mate-desktop.png differ diff --git a/icons/hicolor_apps_16x16_mate.png b/icons/hicolor_apps_16x16_mate.png deleted file mode 100644 index 0a34149..0000000 Binary files a/icons/hicolor_apps_16x16_mate.png and /dev/null differ diff --git a/icons/hicolor_apps_22x22_mate-desktop.png b/icons/hicolor_apps_22x22_mate-desktop.png new file mode 100644 index 0000000..5e942ee Binary files /dev/null and b/icons/hicolor_apps_22x22_mate-desktop.png differ diff --git a/icons/hicolor_apps_22x22_mate.png b/icons/hicolor_apps_22x22_mate.png deleted file mode 100644 index 1fd92a8..0000000 Binary files a/icons/hicolor_apps_22x22_mate.png and /dev/null differ diff --git a/icons/hicolor_apps_24x24_mate-desktop.png b/icons/hicolor_apps_24x24_mate-desktop.png new file mode 100644 index 0000000..18c6555 Binary files /dev/null and b/icons/hicolor_apps_24x24_mate-desktop.png differ diff --git a/icons/hicolor_apps_24x24_mate.png b/icons/hicolor_apps_24x24_mate.png deleted file mode 100644 index 2065bea..0000000 Binary files a/icons/hicolor_apps_24x24_mate.png and /dev/null differ diff --git a/icons/hicolor_apps_256x256_mate.png b/icons/hicolor_apps_256x256_mate.png deleted file mode 100644 index 9708cdd..0000000 Binary files a/icons/hicolor_apps_256x256_mate.png and /dev/null differ diff --git a/icons/hicolor_apps_32x32_mate-desktop.png b/icons/hicolor_apps_32x32_mate-desktop.png new file mode 100644 index 0000000..334f47a Binary files /dev/null and b/icons/hicolor_apps_32x32_mate-desktop.png differ diff --git a/icons/hicolor_apps_32x32_mate.png b/icons/hicolor_apps_32x32_mate.png deleted file mode 100644 index 2a6a192..0000000 Binary files a/icons/hicolor_apps_32x32_mate.png and /dev/null differ diff --git a/icons/hicolor_apps_48x48_mate-desktop.png b/icons/hicolor_apps_48x48_mate-desktop.png new file mode 100644 index 0000000..f19a96c Binary files /dev/null and b/icons/hicolor_apps_48x48_mate-desktop.png differ diff --git a/icons/hicolor_apps_48x48_mate.png b/icons/hicolor_apps_48x48_mate.png deleted file mode 100644 index d00c802..0000000 Binary files a/icons/hicolor_apps_48x48_mate.png and /dev/null differ diff --git a/icons/hicolor_apps_scalable_mate-desktop-symbolic.svg b/icons/hicolor_apps_scalable_mate-desktop-symbolic.svg new file mode 100644 index 0000000..776a8dd --- /dev/null +++ b/icons/hicolor_apps_scalable_mate-desktop-symbolic.svg @@ -0,0 +1,24 @@ + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + diff --git a/icons/hicolor_apps_scalable_mate-desktop.svg b/icons/hicolor_apps_scalable_mate-desktop.svg new file mode 100644 index 0000000..ee60800 --- /dev/null +++ b/icons/hicolor_apps_scalable_mate-desktop.svg @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + diff --git a/icons/hicolor_apps_scalable_mate-symbolic.svg b/icons/hicolor_apps_scalable_mate-symbolic.svg deleted file mode 100644 index 776a8dd..0000000 --- a/icons/hicolor_apps_scalable_mate-symbolic.svg +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/icons/hicolor_apps_scalable_mate.svg b/icons/hicolor_apps_scalable_mate.svg deleted file mode 100644 index ee60800..0000000 --- a/icons/hicolor_apps_scalable_mate.svg +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/mate-about/mate-about.h b/mate-about/mate-about.h index 026cf70..ad9dd08 100644 --- a/mate-about/mate-about.h +++ b/mate-about/mate-about.h @@ -28,7 +28,7 @@ const char* program_name = "MATE Desktop Environment"; const char* version = PACKAGE_VERSION; -const char* icon = "mate"; +const char* icon = "mate-desktop"; const char* website = "http://www.mate-desktop.org/"; const char* copyright = "" -- cgit v1.2.1