File: update-file-info-async.py

package info (click to toggle)
python-caja 1.26.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 832 kB
  • sloc: xml: 1,745; ansic: 791; python: 297; makefile: 182; sh: 19
file content (17 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from gi.repository import Caja, GObject, GLib

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

    def cancel_update(self, provider, handle):
        print('cancel_update')