svn: r6045
This commit is contained in:
Alex Roitman 2006-03-03 00:15:25 +00:00
parent e65c5f4836
commit f97b172092
2 changed files with 11 additions and 5 deletions

View File

@ -24,9 +24,11 @@ import gtk
import const
try:
from gnomevfs import mime_get_short_list_applications, mime_get_description, get_mime_type
from gnomevfs import mime_get_short_list_applications, \
mime_get_description, get_mime_type
except:
from gnome.vfs import mime_get_short_list_applications, mime_get_description, get_mime_type
from gnome.vfs import mime_get_short_list_applications, \
mime_get_description, get_mime_type
from gettext import gettext as _
@ -58,7 +60,9 @@ def get_type(file):
return _('unknown')
def mime_type_is_defined(type):
""""Return True if a description for a mime type exists"""
"""
Return True if a description for a mime type exists.
"""
try:
mime_get_description(type)
return True

View File

@ -1,7 +1,7 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2004 Donald N. Allingham
# Copyright (C) 2000-2006 Donald N. Allingham
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -57,7 +57,9 @@ def get_type(filename):
return _('unknown')
def mime_type_is_defined(mime_type):
""""Return True if a description for a mime type exists"""
"""
Return True if a description for a mime type exists.
"""
return _type_map.has_key(mime_type)
def find_mime_type_pixbuf(mime_type):