Re: gmc and icons and command bindings



Sorry, I hope I am not too much a pain, but ...

On Tue, Jan 12, 1999 at 12:46:59PM -0600, Miguel de Icaza wrote:
> You need to stick in your ~/.gnome/mime-info/my-own-defs.keys a file
> that defines the mime bindings (documentation is on
> gnome-libs/devel-docs), basically you would do:
> 
> image/gif:
> 	open=xv %f
> 	view=xv %f
> 	icon-filename=/path-to-filename

It did not work (it should have a lot of different images from
/usr/X11R6/share/mime-info/mc.keys IMHO).

I digged a bit into the code and then deeper and found what I think
is the problem in

libgnome/gnome-mime.c:gnome_mime_type_or_default()

All the mime-types and extensions are added with prio "0".
The for-loop in the above function first checks the hash_table
for prio 1, so nothing is found. Then it checks the regexec()
which has a match, but no mime-types.

I have broken up the for loop in two loops, one iterating over the
prios for the hash function and if nothing is found it does the same
for the regexp.

Thus it works and the icons look just great.

However, I don't know if this is the expected behaviour ...


	\Maex
-- 
SpaceNet GmbH             |   http://www.Space.Net/   | In a world without
Research & Development    | mailto:maex-sig@Space.Net |   walls and fences,
Joseph-Dollinger-Bogen 14 |  Tel: +49 (89) 32356-0    | who needs
D-80807 Muenchen          |  Fax: +49 (89) 32356-299  |   Windows and Gates? 



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