Package: mypaint
Version: 0.7.1-1
Tags: patch upstream

No desktop icons are visible in mypaint_0.7.1-1 after installation because upstream's installer puts things in a strange place. No action needed to reproduce this problem other than installing the package on a clean system. Patch attached (Debian BTS permitting).


In addition, the upstream .desktop file incorrectly uses %U (multiple URLs) for its Exec field rather then the correct %f (one file only). Able to confirm with multiple existent files on the command line

  $ mypaint hello1.ora hello2.ora
  Cannot open more than one file!
  $

and with remote existent SSH URIs:

  $ mypaint ssh://projects/tmp/hello1.ora
  File ssh://projects/tmp/hello1.ora does not exist!
  $ mypaint ssh://projects/tmp/hello1.ora ssh://projects/tmp/hello2.ora
  File ssh://projects/tmp/hello1.ora does not exist!
  $

I've included this in the patch because not using %f might break some DEs, and will certainly confuse anyone trying to load multiple files at once.


I'm using stock Ubuntu 9.04 and GNOME, but these issues should be visible on all Debian-based systems.

--
Andrew Chadwick
diff -rU2 mypaint-0.7.1/debian/rules mypaint-0.7.1+iconfix/debian/rules
--- mypaint-0.7.1/debian/rules	2009-09-06 21:55:24.000000000 +0100
+++ mypaint-0.7.1+iconfix/debian/rules	2009-09-06 21:51:42.000000000 +0100
@@ -29,4 +29,19 @@
 	mv $(CURDIR)/debian/mypaint/usr/share/mypaint/backgrounds/* $(CURDIR)/debian/mypaint-data/usr/share/mypaint/backgrounds/
 	find $(CURDIR)/debian/mypaint/usr/share/mypaint/ -type d -empty -delete
+	# Dirty workaround for broken icons. Really, upstream should be patched
+	# to make this unnecessary.
+	for s in 16x16 22x22 24x24 32x32 48x48 scalable ; do \
+	  mkdir -p $(CURDIR)/debian/mypaint/usr/share/icons/hicolor/$$s/apps; \
+	done
+	for s in 16x16 22x22 24x24 32x32 48x48 scalable ; do \
+	  cp $(CURDIR)/debian/mypaint/usr/share/mypaint/desktop/$$s/*.* \
+	     $(CURDIR)/debian/mypaint/usr/share/icons/hicolor/$$s/apps/ ; \
+	done
+	mkdir -p $(CURDIR)/debian/mypaint/usr/share/pixmaps
+	cp $(CURDIR)/debian/mypaint/usr/share/mypaint/desktop/mypaint_48.png \
+	   $(CURDIR)/debian/mypaint/usr/share/pixmaps/mypaint.png
+	cp $(CURDIR)/debian/mypaint/usr/share/mypaint/desktop/mypaint.ico \
+	   $(CURDIR)/debian/mypaint/usr/share/pixmaps/
+	
 
 # Build architecture-independent files here.
@@ -46,4 +61,6 @@
 	dh_strip
 	dh_compress
+	dh_icons
+	dh_desktop
 	dh_fixperms
 	dh_installdeb
diff -rU2 mypaint-0.7.1/desktop/mypaint.desktop mypaint-0.7.1+iconfix/desktop/mypaint.desktop
--- mypaint-0.7.1/desktop/mypaint.desktop	2009-09-06 21:55:24.000000000 +0100
+++ mypaint-0.7.1+iconfix/desktop/mypaint.desktop	2009-09-06 21:35:11.000000000 +0100
@@ -2,10 +2,10 @@
 Version=1.0
 Name=MyPaint
-Exec=mypaint %U
+Exec=mypaint %f
 Comment=Paint images from scratch
 GenericName=Image Editor
 MimeType=image/openraster;image/png;image/jpeg;
 Type=Application
-Icon=mypaint_48
+Icon=mypaint
 Categories=Graphics;
 Terminal=false

Reply via email to