Unstable times ahead

I just merged the new-icon-factory-branch branch to HEAD. This change 
works for me, but might not be fully polished up yet. Expect a bumpy road 
for a while.

To run this you nead gnome-desktop HEAD and you need to install 
gnome-icon-theme from gnome cvs.

This also has support for pluggable thumbnailing scripts. Here is my 
~/.gnome2/thumbnailrc as an example:
video/x-msvideo: /home/alex/bin/avithumbnailer %i %o
application/pdf,application/postscript: gs  -sDEVICE=png16m -r11 -dSAFER -dFirstPage=1 -dLastPage=1 -sOutputFile=%o -dBATCH -dNOPAUSE %i
application/x-rpm: /home/alex/bin/rpmthumbnail.py %i %o

rpmthumbnail.py looks like this:
# Simple script to grab the icon out of an RPM package in the filesystem.
# Written by James Henstridge

import sys
import rpm

if len(sys.argv) != 3: sys.exit(1)
fd = open(sys.argv[1], 'rb')
header, is_source = rpm.headerFromPackage(fd.fileno())

data = header['icon']
if data:
    open(sys.argv[2], 'wb').write(data)
data = header['gif']
if data:
    open(sys.argv[2], 'wb').write(data)
data = header['xpm']
if data:
    open(sys.argv[2], 'wb').write(data)

But it's pretty lame, since few rpms embedd icons.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's an underprivileged guitar-strumming inventor searching for his wife's 
true killer. She's a chain-smoking kleptomaniac mercenary with the power to 
bend men's minds. They fight crime! 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]