util_has_gnome_shell_extension


Description:


public async bool util_has_gnome_shell_extension (Cancellable? cancellable)

Check whether GPaste's GNOME Shell extension is installed or not

A different question from util_has_gnome_shell, which asks the schema source whether gnome-shell itself is installed: only the shell knows what it has, so this one goes over the bus and answers false when there is no shell running to ask.

Asynchronous because a shell that owns the name and is not dispatching -- starting up, or held up by another extension -- answers late or not at all, and the caller is a preferences page being built: blocking it would freeze the dialog with nothing drawn in it, and cutting the wait short would hide the extension's own rows on a machine that has it.

That same shell is why cancellable is worth passing: the call is left the 25-second D-Bus default, and cancelling is how a caller that has gone in the meantime stops user_data being held for the rest of it.

Parameters:

cancellable

a Cancellable, or null

callback

a TaskReadyCallback to call with the answer

user_data

the data to pass to callback


Namespace: GPaste
Package: gpaste-3