MountOperation.connectShowUnmountProgress

Connect to ShowUnmountProgress signal.

Emitted when an unmount operation has been busy for more than some time (typically 1.5 seconds).

When unmounting or ejecting a volume, the kernel might need to flush pending data in its buffers to the volume stable storage, and this operation can take a considerable amount of time. This signal may be emitted several times as long as the unmount operation is outstanding, and then one last time when the operation is completed, with bytes_left set to zero.

Implementations of GMountOperation should handle this signal by showing an UI notification, and then dismiss it, or show another notification of completion, when bytes_left reaches zero.

If the message contains a line break, the first line should be presented as a heading. For example, it may be used as the primary text in a #GtkMessageDialog.

class MountOperation
ulong
connectShowUnmountProgress
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == void)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
is(Parameters!T[0] == string)
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
is(Parameters!T[1] == long)
)
)
&&
(
Parameters!T.length < 3 ||
(
ParameterStorageClassTuple!T[2] == ParameterStorageClass.none &&
is(Parameters!T[2] == long)
)
)
&&
(
Parameters!T.length < 4 ||
(
ParameterStorageClassTuple!T[3] == ParameterStorageClass.none &&
)
)
&&
Parameters!T.length < 5
)

Parameters

callback T

signal callback delegate or function to connect

void callback(string message, long timeLeft, long bytesLeft, gio.mount_operation.MountOperation mountOperation)

message string containing a message to display to the user (optional)

timeLeft the estimated time left before the operation completes, in microseconds, or -1 (optional)

bytesLeft the amount of bytes to be written before the operation completes (or -1 if such amount is not known), or zero if the operation is completed (optional)

mountOperation the instance the signal is connected to (optional)

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID