diff --git a/CMakeLists.txt b/CMakeLists.txt index cbc10bfb3..75d2e953a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -235,6 +235,8 @@ if(DL_LIBRARY) list(APPEND EXTRA_LIBS dl) endif() +add_subdirectory(icons) + if(ENABLE_NLS) add_subdirectory(po) endif() @@ -299,9 +301,6 @@ if(CYGWIN) ) endif() -# icon -install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/weechat.png DESTINATION ${SHAREDIR}/icons/hicolor/32x32/apps) - # desktop file install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/weechat.desktop DESTINATION ${SHAREDIR}/applications) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index ff8cda978..56f5b65e7 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * core: add different icons sizes (16x16 to 512x512) (issue #1347) * core: add file weechat.desktop * core: add reverse of string for screen in evaluation of expressions with "revscr:" * core: add length of string (number of chars and on screen) in evaluation of expressions with "length:xxx" and "lengthscr:xxx" diff --git a/Makefile.am b/Makefile.am index 29d88d1b5..e653a0aa2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,7 +29,7 @@ if TESTS tests_dir = tests endif -SUBDIRS = po doc intl src $(tests_dir) +SUBDIRS = icons po doc intl src $(tests_dir) EXTRA_DIST = AUTHORS.adoc \ ChangeLog.adoc \ @@ -67,7 +67,6 @@ EXTRA_DIST = AUTHORS.adoc \ tools/makedist.sh \ version.sh \ weechat.desktop \ - weechat.png \ weechat.pc.in \ weechat.cygport.in @@ -76,9 +75,6 @@ ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = weechat.pc -icondir = $(datadir)/icons/hicolor/32x32/apps -icon_DATA = weechat.png - desktopdir = $(datadir)/applications desktop_DATA = weechat.desktop diff --git a/configure.ac b/configure.ac index a12b74cb9..b38347f92 100644 --- a/configure.ac +++ b/configure.ac @@ -1375,6 +1375,7 @@ AM_CONDITIONAL(MAN, test "$enable_man" = "yes") AM_CONDITIONAL(DOC, test "$enable_doc" = "yes") AC_OUTPUT([Makefile + icons/Makefile doc/Makefile doc/en/Makefile doc/fr/Makefile diff --git a/icons/128x128/weechat.png b/icons/128x128/weechat.png new file mode 100644 index 000000000..3f8694813 Binary files /dev/null and b/icons/128x128/weechat.png differ diff --git a/icons/16x16/weechat.png b/icons/16x16/weechat.png new file mode 100644 index 000000000..7044bba2f Binary files /dev/null and b/icons/16x16/weechat.png differ diff --git a/icons/256x256/weechat.png b/icons/256x256/weechat.png new file mode 100644 index 000000000..95f4ec74a Binary files /dev/null and b/icons/256x256/weechat.png differ diff --git a/icons/32x32/weechat.png b/icons/32x32/weechat.png new file mode 100644 index 000000000..d7b5b2da8 Binary files /dev/null and b/icons/32x32/weechat.png differ diff --git a/icons/512x512/weechat.png b/icons/512x512/weechat.png new file mode 100644 index 000000000..775648bab Binary files /dev/null and b/icons/512x512/weechat.png differ diff --git a/icons/64x64/weechat.png b/icons/64x64/weechat.png new file mode 100644 index 000000000..3b5b8837c Binary files /dev/null and b/icons/64x64/weechat.png differ diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt new file mode 100644 index 000000000..cf6afdbd6 --- /dev/null +++ b/icons/CMakeLists.txt @@ -0,0 +1,22 @@ +# +# Copyright (C) 2003-2019 Sébastien Helleu +# +# This file is part of WeeChat, the extensible chat client. +# +# WeeChat is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# WeeChat is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with WeeChat. If not, see . +# + +foreach(size 16 32 64 128 256 512) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${size}x${size}/weechat.png DESTINATION ${SHAREDIR}/icons/hicolor/${size}x${size}/apps) +endforeach() diff --git a/icons/Makefile.am b/icons/Makefile.am new file mode 100644 index 000000000..af7e29757 --- /dev/null +++ b/icons/Makefile.am @@ -0,0 +1,39 @@ +# +# Copyright (C) 2003-2019 Sébastien Helleu +# +# This file is part of WeeChat, the extensible chat client. +# +# WeeChat is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# WeeChat is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with WeeChat. If not, see . +# + +EXTRA_DIST = 16x16/weechat.png \ + 32x32/weechat.png \ + 64x64/weechat.png \ + 128x128/weechat.png \ + 256x256/weechat.png \ + 512x512/weechat.png + +icon16dir = $(datadir)/icons/hicolor/16x16/apps +icon32dir = $(datadir)/icons/hicolor/32x32/apps +icon64dir = $(datadir)/icons/hicolor/64x64/apps +icon128dir = $(datadir)/icons/hicolor/128x128/apps +icon256dir = $(datadir)/icons/hicolor/256x256/apps +icon512dir = $(datadir)/icons/hicolor/512x512/apps + +icon16_DATA = 16x16/weechat.png +icon32_DATA = 32x32/weechat.png +icon64_DATA = 64x64/weechat.png +icon128_DATA = 128x128/weechat.png +icon256_DATA = 256x256/weechat.png +icon512_DATA = 512x512/weechat.png diff --git a/weechat.png b/weechat.png deleted file mode 100644 index 7eca5c8d6..000000000 Binary files a/weechat.png and /dev/null differ diff --git a/weechat.spec b/weechat.spec index 88d00ebf6..da88d5fca 100644 --- a/weechat.spec +++ b/weechat.spec @@ -74,7 +74,12 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/%{name}/plugins/* %{_libdir}/pkgconfig/weechat.pc %{_includedir}/%{name}/weechat-plugin.h +%{_prefix}/share/icons/hicolor/16x16/apps/weechat.png %{_prefix}/share/icons/hicolor/32x32/apps/weechat.png +%{_prefix}/share/icons/hicolor/64x64/apps/weechat.png +%{_prefix}/share/icons/hicolor/128x128/apps/weechat.png +%{_prefix}/share/icons/hicolor/256x256/apps/weechat.png +%{_prefix}/share/icons/hicolor/512x512/apps/weechat.png %changelog * Sun Sep 08 2019 Sébastien Helleu 2.6-1