Important desktop-wide change (MIME)



Hi,

I have been helping Jonathan Blandford and Dave Camp work on the new
MIME system for GNOME 2.8.   The new mime system requires that all
applications that wish to be registered for supported mime types add
"MimeType=" lines in their desktop files.  If an application does not
have a MimeType line then it will not be recorded as being registered
with any mime types.  

To ease the pain, I've written a rather fragile script to try to extract
the mime types from keys files and add them to desktop files.

The script picked up the following desktop files:

dia/dia.desktop.in
gedit/data/gedit.desktop.in
gimp/data/misc/gimp.desktop.in.in
anjuta/anjuta.desktop.in.in
ggv/ggv.desktop.in
file-roller/file-roller.desktop.in
galeon/galeon.desktop.in
epiphany/data/epiphany.desktop.in
eog/eog.desktop.in
gfloppy/gfloppy.desktop.in
evolution/data/evolution.desktop.in.in
gnome-utils/gfloppy/gfloppy.desktop.in
gnome-games/gnome-stones/gnome-stones.desktop.in
bug-buddy/src/bug-buddy.desktop.in.in

The script had two methods of working. 
 - look for keys files and desktop files in the same directory with the
same prefix for modules in jhbuild's gnome28 modulesets.  

 - look in gnome-mime-data's keys file and try to guess the correct cvs
module and desktop file name based on the ids provided for short_lists.

Obviously, this is far from perfect and may have missed some
applications.  In particular, applications on none gnome cvs servers may
need to be updated as well as some applications that currently lack keys
files.

If you are the maintainer of an application that is not listed above,
but supports loading files, please add a line to your desktop file that
says which mime types you support, e.g.
MimeType=text/plain;

or

MimeType=image/png; image/jpeg; 

Don't use text/* or any mime types with wild cards.  Instead put
text/plain.

If no one complains over the next couple of days, I'm going to commit
the below changes.

Thanks,
--Ray Strode

Index: dia/dia.desktop.in
===================================================================
RCS file: /cvs/gnome/dia/dia.desktop.in,v
retrieving revision 1.3
diff -u -p -r1.3 dia.desktop.in
--- dia/dia.desktop.in  15 Jul 2003 05:58:11 -0000      1.3
+++ dia/dia.desktop.in  20 Jul 2004 16:06:46 -0000
@@ -8,3 +8,4 @@ Icon=dia_gnome_icon.png
 Terminal=false
 Categories=GNOME;Application;Graphics;
 StartupNotify=true
+MimeType=application/x-dia-diagram;
Index: gedit/data/gedit.desktop.in
===================================================================
RCS file: /cvs/gnome/gedit/data/gedit.desktop.in,v
retrieving revision 1.6
diff -u -p -r1.6 gedit.desktop.in
--- gedit/data/gedit.desktop.in 2 Jul 2003 16:36:30 -0000       1.6
+++ gedit/data/gedit.desktop.in 20 Jul 2004 16:06:48 -0000
@@ -12,3 +12,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=gedit
 X-GNOME-Bugzilla-Component=general
 StartupNotify=true
+MimeType=text/plain;
Index: gimp/data/misc/gimp.desktop.in.in
===================================================================
RCS file: /cvs/gnome/gimp/data/misc/gimp.desktop.in.in,v
retrieving revision 1.9
diff -u -p -r1.9 gimp.desktop.in.in
--- gimp/data/misc/gimp.desktop.in.in   10 Feb 2004 09:49:45 -0000
1.9
+++ gimp/data/misc/gimp.desktop.in.in   20 Jul 2004 16:06:49 -0000
@@ -11,3 +11,4 @@ Categories=Application;Graphics;RasterGr
 X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=GIMP
 StartupNotify=true
+MimeType=image/bmp;image/g;image/gif;image/jpeg;image/jpg;image/pjpeg;
image/png;image/tiff;image/x-bmp;image/x-compressed-xcf;image/x-fits;
image/x-gray;image/x-pcx;image/x-png;image/x-portable-anymap;image/x-
portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;
image/x-psd;image/x-sgi;image/x-sun-raster;image/x-tga;image/x-xbitmap;
image/x-xcf;image/x-xpixmap;image/x-xwindowdump;
Index: anjuta/anjuta.desktop.in.in
===================================================================
RCS file: /cvs/gnome/anjuta/anjuta.desktop.in.in,v
retrieving revision 1.7
diff -u -p -r1.7 anjuta.desktop.in.in
--- anjuta/anjuta.desktop.in.in 6 May 2004 13:58:19 -0000       1.7
+++ anjuta/anjuta.desktop.in.in 20 Jul 2004 16:06:51 -0000
@@ -9,3 +9,4 @@ Type=Application
 Categories=Application;Development;
 Encoding=UTF-8
 StartupNotify=true
+MimeType=text/x-java;text/x-javascript;
Index: ggv/ggv.desktop.in
===================================================================
RCS file: /cvs/gnome/ggv/ggv.desktop.in,v
retrieving revision 1.9
diff -u -p -r1.9 ggv.desktop.in
--- ggv/ggv.desktop.in  10 Jan 2004 15:51:58 -0000      1.9
+++ ggv/ggv.desktop.in  20 Jul 2004 16:06:52 -0000
@@ -12,3 +12,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=GGV
 X-GNOME-DocPath=ggv/ggv-xml
 X-GNOME-Bugzilla-Component=general
+MimeType=application/pdf;application/postscript;
Index: file-roller/file-roller.desktop.in
===================================================================
RCS file: /cvs/gnome/file-roller/file-roller.desktop.in,v
retrieving revision 1.9
diff -u -p -r1.9 file-roller.desktop.in
--- file-roller/file-roller.desktop.in  5 Mar 2004 19:35:54 -0000
1.9
+++ file-roller/file-roller.desktop.in  20 Jul 2004 16:06:53 -0000
@@ -12,3 +12,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=file-roller
 X-GNOME-Bugzilla-Component=general
 X-GNOME-DocPath=file-roller/file-roller.xml
+MimeType=application/x-arj;application/x-bzip;application/x-bzip-
compressed-tar;application/x-compress;application/x-compressed-tar;
application/x-gtar;application/x-gzip;application/x-lha;application/x-
lhz;application/x-rar;application/x-rar-compressed;application/x-tar;
application/x-zip;application/x-zip-compressed;application/zip;
multipart/x-zip;
Index: galeon/galeon.desktop.in
===================================================================
RCS file: /cvs/gnome/galeon/galeon.desktop.in,v
retrieving revision 1.9
diff -u -p -r1.9 galeon.desktop.in
--- galeon/galeon.desktop.in    17 Sep 2003 21:16:18 -0000      1.9
+++ galeon/galeon.desktop.in    20 Jul 2004 16:06:54 -0000
@@ -12,3 +12,4 @@ Categories=Application;Network;
 X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=galeon
 X-GNOME-Bugzilla-Component=general
+MimeType=text/html;text/xml;
Index: epiphany/data/epiphany.desktop.in
===================================================================
RCS file: /cvs/gnome/epiphany/data/epiphany.desktop.in,v
retrieving revision 1.9
diff -u -p -r1.9 epiphany.desktop.in
--- epiphany/data/epiphany.desktop.in   15 Jun 2004 01:09:20 -0000
1.9
+++ epiphany/data/epiphany.desktop.in   20 Jul 2004 16:06:55 -0000
@@ -13,3 +13,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=epiphany
 X-GNOME-Bugzilla-Component=General
 Categories=Application;Network;
+MimeType=text/html;text/xml;
Index: eog/eog.desktop.in
===================================================================
RCS file: /cvs/gnome/eog/eog.desktop.in,v
retrieving revision 1.9
diff -u -p -r1.9 eog.desktop.in
--- eog/eog.desktop.in  11 Oct 2003 14:23:11 -0000      1.9
+++ eog/eog.desktop.in  20 Jul 2004 16:06:57 -0000
@@ -13,3 +13,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=EOG
 X-GNOME-Bugzilla-Component=general
 X-GNOME-DocPath=eog/eog.xml
+MimeType=image/bmp;image/gif;image/jpeg;image/jpg;image/pjpeg;
image/png;image/tiff;image/x-bmp;image/x-gray;image/x-icb;image/x-ico;
image/x-png;image/x-portable-anymap;image/x-portable-bitmap;image/x-
portable-graymap;image/x-portable-pixmap;image/x-psd;image/x-xbitmap;
image/x-xpixmap;
Index: gfloppy/gfloppy.desktop.in
===================================================================
RCS file: /cvs/gnome/gfloppy/gfloppy.desktop.in,v
retrieving revision 1.11
diff -u -p -r1.11 gfloppy.desktop.in
--- gfloppy/gfloppy.desktop.in  24 Feb 2004 20:57:07 -0000      1.11
+++ gfloppy/gfloppy.desktop.in  20 Jul 2004 16:06:58 -0000
@@ -11,3 +11,4 @@ Categories=GNOME;Application;System;
 X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=gnome-utils
 X-GNOME-Bugzilla-Component=gfloppy
+MimeType=x-device/floppy;
Index: evolution/data/evolution.desktop.in.in
===================================================================
RCS file: /cvs/gnome/evolution/data/evolution.desktop.in.in,v
retrieving revision 1.5
diff -u -p -r1.5 evolution.desktop.in.in
--- evolution/data/evolution.desktop.in.in      17 Jun 2004 18:23:06 -
0000     1.5
+++ evolution/data/evolution.desktop.in.in      20 Jul 2004 16:06:59 -
0000
@@ -10,3 +10,4 @@ StartupNotify=true
 X-GNOME-Bugzilla-Bugzilla=Ximian
 X-GNOME-Bugzilla-Product=Evolution
 X-GNOME-Bugzilla-OtherBinaries=evolution-data-server-1.0;evolution-
exchange-storage;evolution-alarm-notify;
+MimeType=text/x-vcard;text/x-calendar;text/calendar;
Index: gnome-utils/gfloppy/gfloppy.desktop.in
===================================================================
RCS file: /cvs/gnome/gfloppy/gfloppy.desktop.in,v
retrieving revision 1.11
diff -u -p -r1.11 gfloppy.desktop.in
--- gnome-utils/gfloppy/gfloppy.desktop.in      24 Feb 2004 20:57:07 -
0000     1.11
+++ gnome-utils/gfloppy/gfloppy.desktop.in      20 Jul 2004 16:07:01 -
0000
@@ -11,3 +11,4 @@ Categories=GNOME;Application;System;
 X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=gnome-utils
 X-GNOME-Bugzilla-Component=gfloppy
+MimeType=x-device/floppy;
Index: gnome-games/gnome-stones/gnome-stones.desktop.in
===================================================================
RCS file: /cvs/gnome/gnome-games/gnome-stones/gnome-stones.desktop.in,v
retrieving revision 1.6
diff -u -p -r1.6 gnome-stones.desktop.in
--- gnome-games/gnome-stones/gnome-stones.desktop.in    1 Jan 1997
05:23:15 -0000       1.6
+++ gnome-games/gnome-stones/gnome-stones.desktop.in    20 Jul 2004
16:07:02 -0000
@@ -11,3 +11,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=gnome-games
 X-GNOME-Bugzilla-Component=gnome-stones
 StartupNotify=true
+MimeType=application/x-gnome-stones;
Index: bug-buddy/src/bug-buddy.desktop.in.in
===================================================================
RCS file: /cvs/gnome/bug-buddy/src/bug-buddy.desktop.in.in,v
retrieving revision 1.2
diff -u -p -r1.2 bug-buddy.desktop.in.in
--- bug-buddy/src/bug-buddy.desktop.in.in       6 Jan 2004 21:03:07 -
0000      1.2
+++ bug-buddy/src/bug-buddy.desktop.in.in       20 Jul 2004 16:07:03 -
0000
@@ -12,3 +12,4 @@ X-GNOME-Bugzilla-Bugzilla=GNOME
 X-GNOME-Bugzilla-Product=bug-buddy
 X-GNOME-Bugzilla-Component=general
 X-GNOME-Bugzilla-Version= VERSION@
+MimeType=application/x-core;






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