From c74ebfe2b0b19ebddd28c1cd93272993d2c3cf90 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Sun, 9 Apr 2000 13:35:08 +0000 Subject: [PATCH] r234: Renamed MIME-types to MIME-info. --- ROX-Filer/MIME-info | 430 ++++++++++++++++++++++++++++++++++++++++++++ ROX-Filer/src/gui_support.c | 13 +- ROX-Filer/src/type.c | 2 +- 3 files changed, 440 insertions(+), 5 deletions(-) create mode 100644 ROX-Filer/MIME-info diff --git a/ROX-Filer/MIME-info b/ROX-Filer/MIME-info new file mode 100644 index 00000000..5ba07244 --- /dev/null +++ b/ROX-Filer/MIME-info @@ -0,0 +1,430 @@ +# +# Copryght (C) The Free Software Foundation, 1998, 1999 +# http://www.fsf.org +# +# Mime types as provided by the GNOME libraries for GNOME. +# +# Adapted to be the defaults for ROX-Filer (provided so that +# users who only install the filer component will at least have some +# recognised types). +# +# The format of this file is: +# +# mime-type +# ext[,prio]: list of extensions for this mime-type +# regex[,prio]: a regular expression that matches the filename +# +# more than one ext: and regex: fields can be present. +# +# regex and prio are ignored for now. + +# text values. + +text/css + ext: css + +text/sgml + ext: sgml sgm + +text/plain + ext: asc txt TXT + +text/html + ext: html htm HTML + +text/richtext + ext: rtx + +text/tab-separated-values + ext: tsv + +text/x-fortran: + ext: f + +text/vnd.latex-z + ext: latex + +text/xml + ext: xml + +text/x-idl + ext: idl + +text/x-setext + ext: etx + +text/x-c + ext: c h + +text/x-gtkrc + regex: [.|]gtkrc + +text/x-C++ + ext: cc C cpp + +text/x-perl + ext: pl perl + +text/x-scheme + ext: scm + +text/x-emacs-lisp + ext: el + +text/x-python: + ext: py + +text/x-vCalendar: + ext: vcs vcf + +text/x-vCard + ext: gcrd + +text/x-java + ext: java + +text/x-dsl + ext: dsl + +text/x-dtd + ext: dtd + +text/x-dcl + ext: dcl + +text/x-comma-separated-values + ext: csv + +#audio values +audio/x-wav: + ext: wav + +audio/x-mp3 + ext: mp3 + +audio/x-aiff + ext: aif aifc aiff + +audio/x-ulaw + ext: au + +audio/basic + ext: snd + +audio/x-voc + ext: voc + +audio/x-pn-realaudio + ext: rm ra ram + +audio/x-mod + ext: mod MOD + +audio/x-s3m + ext: S3M + +audio/x-xm + ext: xm XM + +audio/x-it + ext: it IT + +#application values +application/x-applix-word + ext: aw + +application/x-gnome-app-info + ext: desktop + +application/x-bzip + ext: bz2 bz + +application/x-troff-man + regex: (([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|n)|\.man)$ + +application/x-troff-man-compressed + regex: ([^0-9]|^[^\.]*)\.([1-9][a-z]?|n)\.g?[Zz]$ + +application/x-object-file + ext: o + +application/x-class-file + ext: class + +application/x-shared-library + ext: so + +application/postscript + ext: ps eps + +application/pgp + ext: pgp + +application/x-bcpio + ext: bcpio + +application/octet-stream + ext: bin + +application/x-netcdf + ext: cdf nc + +application/x-cpio + ext: cpio + +application/x-cpio-compressed + regex: \.cpio\.gz$ + +application/x-csh + ext: csh + +application/x-dvi + ext: dvi + +application/andrew-inset + ext: ez + +application/x-gtar + ext: gtar + +application/x-gunzip + ext: gz + +application/x-hdf + ext: hdf + +application/x-troff-man + ext: man + +application/x-troff-me + ext: me + +application/x-mif + ext: mif + +application/x-troff-ms + ext: ms + +application/oda + ext: oda + +application/pdf + ext: pdf + +application/x-chess-pgn + ext: pgn + +application/x-troff + ext: roff t tr + +application/rtf + ext: rtf + +application/x-sh + ext: sh + +application/x-shar + ext: shar + +application/x-wais-source + ext: src + +application/x-sv4cpio + ext: sv4cpio + +application/x-sv4crc + ext: sv4crc + +application/x-tar + ext: tar + +application/x-compressed-tar + regex,2: tar\.gz$ + ext: tgz + +application/x-bzip-compressed-tar + regex,2: tar\.bz2$ + +application/x-tcl + ext: tcl + +application/x-tex + ext: tex + +application/x-texinfo + ext: texi texinfo + +application/x-ustar + ext: ustar + +application/zip + ext: zip + +application/x-rpm + ext: rpm + +application/x-deb + ext: deb + +application/x-zoo + ext: zoo + +application/x-lha + ext: lha + +application/x-arj + ext: arj + +application/x-unix-archive + ext: a sa + +application/x-backup + ext: bak BAK + +application/x-profile + regex: gmon\.out$ + +application/x-cgi + ext: cgi + +application/x-asp + ext: asp + +application/x-php + ext: php + +application/x-shared-library-la + ext: la + +application/x-applix-spreadsheet + ext: as + +application/x-e-theme + ext: etheme ETHEME + +application/x-theme + ext: theme + +x-url/http + regex: http://.* + +x-url/ftp + regex: ftp://.* + +x-url/info + regex: info:.* + +x-url/gopher + regex: gopher:.* + +x-url/news + regex: news:.* + +image/x-bmp + ext: bmp + +image/x-ico + ext: ico + +image/x-png + ext: png + +image/x-tga + ext: tga + +image/ief + ext: ief + +image/jpeg + ext: jpe jpeg jpg JPG + +image/x-portable-bitmap + ext: pbm + +image/x-portable-graymap + ext: pgm + +image/x-portable-anymap + ext: pnm + +image/x-portable-pixmap + ext: ppm + +image/x-cmu-raster + ext: ras + +image/x-rgb + ext: rgb + +image/tiff + ext: tif tiff + +image/x-xbitmap + ext: xbm + +image/x-xpixmap + ext: xpm + +image/x-xwindowdump + ext: xwd + +image/x-xcf: + ext: xcf + +image/x-compressed-xcf + regex,2: \.xcf\.gz$ + regex.2: \.xcf\.bz2$ + +image/x-psd: + ext: psd + +image/gif + ext: gif + +image/x-applix-graphic + ext: ag + +image/x-xfig + ext: fig + +image/vnd.dxf + ext: dxf + +image/vnd.dwg + ext: dwg + +image/x-3ds + ext: 3ds + +image/x-lwo + ext: lwo lwob + +image/x-lws + ext: lws + +image/x-iff + ext: iff IFF + +image/x-ilbm + ext: ilbm ILBM + +video/quicktime + ext: mov qt + +video/x-sgi-movie + ext: movie + +video/x-msvideo: + ext: avi + +video/mpeg + ext: mp2 mpe mpeg mpg + +video/x-msvideo + ext: avi + +video/x-anim + ext: anim5 anim7 + +message/x-gnu-rmail + regex: ^RMAIL$ diff --git a/ROX-Filer/src/gui_support.c b/ROX-Filer/src/gui_support.c index e6766d27..7536cf4c 100644 --- a/ROX-Filer/src/gui_support.c +++ b/ROX-Filer/src/gui_support.c @@ -247,7 +247,12 @@ gboolean load_file(char *pathname, char **data_out, long *length_out) if (!file) { - delayed_error("Opening file for DND", g_strerror(errno)); + guchar *message; + + message = g_strdup_printf("open(%s): %s", + pathname, g_strerror(errno)); + delayed_error("ROX-Filer", message); + g_free(message); return FALSE; } @@ -262,7 +267,7 @@ gboolean load_file(char *pathname, char **data_out, long *length_out) if (ferror(file)) { - delayed_error("Loading file for DND", + delayed_error("Error reading file", g_strerror(errno)); g_free(buffer); } @@ -275,9 +280,9 @@ gboolean load_file(char *pathname, char **data_out, long *length_out) } } else - delayed_error("Loading file for DND", + delayed_error("ROX-Filer", "Can't allocate memory for buffer to " - "transfer this file"); + "load this file"); fclose(file); diff --git a/ROX-Filer/src/type.c b/ROX-Filer/src/type.c index cecc533c..d0ad3674 100644 --- a/ROX-Filer/src/type.c +++ b/ROX-Filer/src/type.c @@ -61,7 +61,7 @@ void type_init() extension_hash = g_hash_table_new(g_str_hash, g_str_equal); current_type = NULL; - parse_file(make_path(getenv("APP_DIR"), "MIME-types")->str, + parse_file(make_path(getenv("APP_DIR"), "MIME-info")->str, import_extensions); list = choices_list_dirs("MIME-info"); -- 2.11.4.GIT