src/eric7/Utilities/MimeTypes.py

branch
eric7
changeset 9576
be9f8e7e42e0
parent 9572
3b46c662a004
child 9653
e67609152c5e
equal deleted inserted replaced
9575:635b6c5a36e1 9576:be9f8e7e42e0
39 QCoreApplication.translate( 39 QCoreApplication.translate(
40 "MimeTypes", 40 "MimeTypes",
41 "<p>Is the file <b>{0}</b> a text file to be opened in eric?</p>" 41 "<p>Is the file <b>{0}</b> a text file to be opened in eric?</p>"
42 "<p><b>Note:</b> You may suppress this question by adding a pattern" 42 "<p><b>Note:</b> You may suppress this question by adding a pattern"
43 " to the list of known text files on the <b>MimeTypes</b>" 43 " to the list of known text files on the <b>MimeTypes</b>"
44 " configuration page.</p>" 44 " configuration page.</p>",
45 ).format(filename), 45 ).format(filename),
46 ) 46 )
47 ) 47 )
48 else: 48 else:
49 return ( 49 return mimetype.split("/")[0] == "text" or mimetype in Preferences.getUI(
50 mimetype.split("/")[0] == "text" 50 "TextMimeTypes"
51 or mimetype in Preferences.getUI("TextMimeTypes")
52 ) 51 )
53 52
54 53
55 def mimeType(filename): 54 def mimeType(filename):
56 """ 55 """

eric ide

mercurial