Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 860fab38a29a205d3577d009961a6c74 > files > 26

nautilus-python-1.1-2.fc16.i686.rpm

from gi.repository import Nautilus, GObject

class UpdateFileInfoAsync(GObject.GObject, Nautilus.InfoProvider):
    def __init__(self):
        pass
    
    def update_file_info_full(self, provider, handle, closure, file):
        print "update_file_info_full"
        gobject.timeout_add_seconds(3, self.update_cb, provider, handle, closure)
        return Nautilus.OperationResult.IN_PROGRESS
        
    def update_cb(self, provider, handle, closure):
        print "update_cb"
        Nautilus.info_provider_update_complete_invoke(closure, provider, handle, Nautilus.OperationResult.FAILED)