Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import urllib
- from gi.repository import GObject, Nautilus
- class TestExtension(GObject.GObject, Nautilus.InfoProvider):
- def __init__(self):
- pass
- def update_file_info_full(self, provider, handle, closure, file):
- if file.get_uri_scheme() != 'file':
- return
- # file.invalidate_extension_info()
- GObject.timeout_add(1, self.add_emblem, provider, handle, closure, file)
- return Nautilus.OperationResult.IN_PROGRESS
- def cancel_update(self, provider, handle):
- pass
- def add_emblem(self, provider, handle, closure, file):
- file.add_emblem('new')
- Nautilus.info_provider_update_complete_invoke(closure, provider, handle,
- Nautilus.OperationResult.COMPLETE)
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement