[Spice-devel] [PATCH spice-gtk] widget: Inform about transfer failure
Christophe Fergeau
cfergeau at redhat.com
Wed Sep 14 09:24:32 UTC 2016
On Wed, Sep 14, 2016 at 10:03:31AM +0200, Pavel Grunt wrote:
> Call spice_main_file_copy_finish to get result of the transfer
> ---
> src/spice-widget.c | 18 +++++++++++++++++-
> 1 file changed, 17 insertions(+), 1 deletion(-)
>
> diff --git a/src/spice-widget.c b/src/spice-widget.c
> index 9c8f7d1..cc89f22 100644
> --- a/src/spice-widget.c
> +++ b/src/spice-widget.c
> @@ -499,6 +499,22 @@ static gboolean grab_broken(SpiceDisplay *self, GdkEventGrabBroken *event,
> return false;
> }
>
> +static void file_transfer_callback(GObject *source_object,
> + GAsyncResult *result,
> + gpointer user_data G_GNUC_UNUSED)
> +{
> + SpiceMainChannel *channel = SPICE_MAIN_CHANNEL(source_object);
> + GError *error = NULL;
> +
> + if (spice_main_file_copy_finish(channel, result, &error))
> + return;
> +
> + if (error != NULL && error->message != NULL)
> + g_warning("File transfer failed with error: %s", error->message);
You could add an else g_warning("File transfer failed"); when these are
NULL. Do you know if there are any notifications to spice-gtk users that
dnd is happening and of the progress of dnd?
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160914/a8f883eb/attachment.sig>
More information about the Spice-devel
mailing list