[Python-Dev] Minor: Unix icons for 2.5?
Georg Brandl
g.brandl at gmx.net
Tue Jul 11 19:25:49 CEST 2006
Anthony Baxter wrote:
> There's an open PEP-356 issue for "update the icons to the newer
> shinier ones" for Unix. As far as I can see, there's the 14x15 GIF
> images used for Idle and the documentation. Note that for me at least,
> idle comes up without an icon _anyway_.
>
> Are there any others I missed?
In case we add a Python .desktop file (as proposed in patch #1353344),
we'll need some PNGs in /usr/share/icons. A patch for Makefile.pre.in
is attached.
Georg
Index: Misc/python.desktop.in
===================================================================
--- Misc/python.desktop.in (Revision 0)
+++ Misc/python.desktop.in (Revision 0)
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Python Programming Language
+Name[sv]=Programspråket Python
+Name[de]=Die Programmiersprache Python
+Comment=Program in Python
+Comment[sv]=Programmera med Python
+Comment[de]=Programmieren in Python
+Exec=python_VER_ %f
+Terminal=true
+Type=Application
+Icon=pycon.png
+Categories=Application;Development;ConsoleOnly
+MimeType=text/x-python;application/x-python
Index: Makefile.pre.in
===================================================================
--- Makefile.pre.in (Revision 47289)
+++ Makefile.pre.in (Arbeitskopie)
@@ -89,6 +89,8 @@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
SCRIPTDIR= $(prefix)/lib
+DESKTOPDIR= $(prefix)/share/applications
+ICONDIR= $(prefix)/share/icons
# Detailed destination directories
BINLIBDEST= $(LIBDIR)/python$(VERSION)
@@ -614,7 +616,7 @@
$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
# Install everything
-install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall
@FRAMEWORKINSTALLLAST@
+install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall
desktopinstall @FRAMEWORKINSTALLLAST@
# Install almost everything without disturbing previous versions
altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall
libainstall \
@@ -687,6 +689,25 @@
$(INSTALL_DATA) $(srcdir)/Misc/python.man \
$(DESTDIR)$(MANDIR)/man1/python.1
+# Install the .desktop file and the icons
+desktopinstall:
+ @for i in $(DESKTOPDIR) $(ICONDIR) $(ICONDIR)/hicolor
$(ICONDIR)/hicolor/16x16 $(ICONDIR)/hicolor/32x32 $(ICONDIR)/hicolor/48x48; \
+ do \
+ if test ! -d $(DESTDIR)$$i; then \
+ echo "Creating directory $$i"; \
+ $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$$i; \
+ else true; \
+ fi; \
+ done
+ sed 's/_VER_/$(VERSION)$(EXE)/' $(srcdir)/Misc/python.desktop.in >
$(srcdir)/Misc/python.desktop
+ $(INSTALL_DATA) $(srcdir)/Misc/python.desktop
$(DESTDIR)$(DESKTOPDIR)/python.desktop
+ for i in 16x16 32x32 48x48; \
+ do \
+ $(INSTALL_DATA) $(srcdir)/Misc/py-$$i.png
$(DESTDIR)$(ICONDIR)/hicolor/$$i/py.png; \
+ $(INSTALL_DATA) $(srcdir)/Misc/pyc-$$i.png
$(DESTDIR)$(ICONDIR)/hicolor/$$i/pyc.png; \
+ $(INSTALL_DATA) $(srcdir)/Misc/pycon-$$i.png
$(DESTDIR)$(ICONDIR)/hicolor/$$i/pycon.png; \
+ done
+
# Install the library
PLATDIR= plat-$(MACHDEP)
EXTRAPLATDIR= @EXTRAPLATDIR@
@@ -1076,7 +1097,7 @@
# Declare targets that aren't real files
.PHONY: all sharedmods oldsharedmods test quicktest memtest
.PHONY: install altinstall oldsharedinstall bininstall altbininstall
-.PHONY: maninstall libinstall inclinstall libainstall sharedinstall
+.PHONY: maninstall libinstall inclinstall libainstall sharedinstall desktopinstall
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
More information about the Python-Dev
mailing list