Re: Filetype identification in gmc



> > Yup, that's the story I got a few months back when I complained about
this.
> > Mostly it doesn't matter too much.  But since Perl libraries and X
Pixmaps both
> > use *.pm, it *can* have some funny results =OZ
>
> gnome-libs provides functions to determine the mime type both from file
> extension and magic numbers.  Perhaps gmc could be modified to use magic
> numbers if file extensions are ambiguous.  hmm.  if i remember tonight
> maybe I'll give it a look.

How about using the extension for display of icons, but the magic numbers
when you double click the file? This way the file would only have to be read
when you're opening it, so it wouldn't cause much slow down.
And then, it could check if it got the icon wrong, for example, a text file
called text.jpg would originally have a picture icon, but when you double
click on it, the magic numbers are checked, it turns out to be a plain text
file, emacs (or whatever) is opened for it, and the icon changes to a text
icon, thus ignoring the (wrong) .jpg extension.

Just a few thoughts/ideas, maybe this should go to the  UI improvement
people as well.
I would try to hack it in, but the last time I tried to edit anything in
GMC's code, my changes kept making it crash for no reason I could see, so I
gave up. Maybe I'll try again.

Iain



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