File: update-file-info-async.py

package info (click to toggle)
nemo-python 6.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 348 kB
  • sloc: xml: 1,732; ansic: 795; python: 156; makefile: 9
file content (15 lines) | stat: -rw-r--r-- 619 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from gi.repository import Nemo, GObject

class UpdateFileInfoAsync(GObject.GObject, Nemo.InfoProvider):
    def __init__(self):
        super(UpdateFileInfoAsync, self).__init__()
        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 Nemo.OperationResult.IN_PROGRESS

    def update_cb(self, provider, handle, closure):
        print("update_cb")
        Nemo.info_provider_update_complete_invoke(closure, provider, handle, Nemo.OperationResult.FAILED)