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 """ |