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

gEDA-dev: Icons and mime types for gEDA files



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

Some time ago I got bored of all my gEDA files being marked as "Text
document" by GNOME. So I made a "package" XML file for the MIME database
[1] (it should also work with KDE). It describes MIME types for GSchem
schematic and symbol files, PCB layouts and gerber files.

I've been using this for a while now without problems. I know that magic
strings I used here aren't exactly reliable (specially for Gerber
files), but it seems to work correctly with files produced by recent CVS
versions of PCB and GSchem (and I don't think the file specifications
include a more reliable way of recognizing the file type)

I've also created some icons to go with schematics and symbol files [2].
I'll probably add PCB and gerber icons soon.

I think it would be nice if something like this could be included in the
official distribution. Having a ".desktop" file to add application
associations would also be nice.

[1] http://freedesktop.org/wiki/Specifications_2fshared_2dmime_2dinfo_2dspec
[2] http://www.tablix.org/~avian/blog/archives/2007/04/22/T22_41_14

Best regards
Tomaz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGK9NzsAlAlRhL9q8RAuZyAJ9DcR9ECrMVh/La0P5FMCJe53eLFwCgylqN
ofA/fPZIJu5cHWo3UwxVMxA=
=lP4C
-----END PGP SIGNATURE-----
<?xml version="1.0" encoding="utf-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
	<mime-type type="application/x-geda-schematic">
		<comment>gEDA circuit schematic</comment>
		<glob pattern="*.sch"/>
		<magic priority="10">
      			<match value="v " type="string" offset="0"/>
		</magic>
	</mime-type>
	<mime-type type="application/x-geda-symbol">
		<comment>gEDA schematic symbol</comment>
		<glob pattern="*.sym"/>
		<magic priority="10">
      			<match value="v " type="string" offset="0"/>
		</magic>
	</mime-type>
	<mime-type type="application/x-pcb">
		<comment>PCB layout</comment>
		<glob pattern="*.pcb"/>
		<magic priority="50">
      			<match value="# release: pcb " type="string" offset="0"/>
		</magic>
	</mime-type>
	<mime-type type="application/x-gerber">
		<comment>Gerber RS-274X file</comment>
		<glob pattern="*.gbr"/>
		<magic priority="50">
      			<match value="G04" type="string" offset="0"/>
		</magic>
	</mime-type>
</mime-info>


_______________________________________________
geda-dev mailing list
geda-dev@moria.seul.org
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev