Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix converting of multi-images icon files #10

Closed
wants to merge 6 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bin/fvwm-menu-desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Modification History

# Changed on 06/01/20 by Dominique Michel:
# - Fix converting of multi-images icon files;
# use the first one.

# Changed on 18/03/19 by Jaimos Skriletz:
# - Updated script for and require Python 3.
# - Drop support for Python 2.
Expand Down Expand Up @@ -629,7 +633,7 @@ def geticonfile(icon):
os.system("if test \\( \\( ! -f '%s' \\) -o \\( '%s' -nt '%s' \\) \\) -o \\( '%s' != '%s' \\); then convert -background none '%s' -resize %i '%s' ; fi"%
(iconfile, iconpath, iconfile, current_theme, previous_theme, iconpath, size, iconfile))
else:
os.system("if test \\( \\( ! -f '%s' \\) -o \\( '%s' -nt '%s' \\) \\) -o \\( '%s' != '%s' \\); then convert '%s' -resize %i '%s' ; fi"%
os.system("if test \\( \\( ! -f '%s' \\) -o \\( '%s' -nt '%s' \\) \\) -o \\( '%s' != '%s' \\); then convert '%s'[0] -resize %i '%s' ; fi"%
(iconfile, iconpath, iconfile, current_theme, previous_theme, iconpath, size, iconfile))
else:
sys.stderr.write("%s not found! Using default icon.\n" % iconpath)
Expand Down