[Spice-devel] [PATCH spice-gtk] Fix docs for SpiceFileTransferTask::progress
Frediano Ziglio
fziglio at redhat.com
Fri Aug 12 08:04:04 UTC 2016
> This property actually represents a fractional value from 0 to 1.0, not
> a percentage between 0 and 100.
> ---
> src/spice-file-transfer-task.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/spice-file-transfer-task.c b/src/spice-file-transfer-task.c
> index c414e40..a830126 100644
> --- a/src/spice-file-transfer-task.c
> +++ b/src/spice-file-transfer-task.c
> @@ -509,7 +509,7 @@ gboolean
> spice_file_transfer_task_is_completed(SpiceFileTransferTask *self)
> * Convenience function for retrieving the current progress of this file
> * transfer task.
> *
> - * Returns: A percentage value between 0 and 100
> + * Returns: A fractional value between 0 and 1.0
> *
> * Since: 0.31
> **/
> @@ -757,7 +757,7 @@
> spice_file_transfer_task_class_init(SpiceFileTransferTaskClass *klass)
> * SpiceFileTransferTask:progress:
> *
> * The current state of the file transfer. This value indicates a
> - * percentage, and ranges from 0 to 100. Listen for change notifications
> on
> + * fraction, and ranges from 0 to 1.0. Listen for change notifications
> on
> * this property to be updated whenever the file transfer progress
> changes.
> *
> * Since: 0.31
> @@ -766,7 +766,7 @@
> spice_file_transfer_task_class_init(SpiceFileTransferTaskClass *klass)
> g_param_spec_double("progress",
> "Progress",
> "The percentage of
> the file
> transferred",
> - 0.0, 100.0, 0.0,
> + 0.0, 1.0, 0.0,
> G_PARAM_READABLE |
> G_PARAM_STATIC_STRINGS));
>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
I checked on the history and behavior was always that, never
returned 0-100 values.
Frediano
More information about the Spice-devel
mailing list