Patch by bertf to fix handling of non-default types.
This commit is contained in:
parent
8aecf00060
commit
8ef6c57f8b
2
NEWS
2
NEWS
@ -1,3 +1,5 @@
|
||||
* #3478 Fix handling of non-default types. (bertf)
|
||||
|
||||
Snapshot 0a666e23cf
|
||||
|
||||
* #2977 Associate activity with his journal object if there is one. (marco)
|
||||
|
@ -135,12 +135,18 @@ class BundleRegistry(gobject.GObject):
|
||||
result = []
|
||||
for bundle in self._bundles:
|
||||
if bundle.get_mime_types() and mime_type in bundle.get_mime_types():
|
||||
if self._mime_defaults[mime_type] == bundle.get_service_name():
|
||||
if self.get_default_for_type(mime_type) == bundle.get_service_name():
|
||||
result.insert(0, bundle)
|
||||
else:
|
||||
result.append(bundle)
|
||||
return result
|
||||
|
||||
def get_default_for_type(self, mime_type):
|
||||
if self._mime_defaults.has_key(mime_type):
|
||||
return self._mime_defaults[mime_type]
|
||||
else:
|
||||
return None
|
||||
|
||||
def get_registry():
|
||||
return _bundle_registry
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user