[Spice-devel] [PATCH spice-gtk] widget: Inform about transfer failure

Christophe Fergeau cfergeau at redhat.com
Wed Sep 14 09:40:06 UTC 2016


On Wed, Sep 14, 2016 at 11:33:16AM +0200, Pavel Grunt wrote:
> Hi Christophe,
> 
> On Wed, 2016-09-14 at 11:24 +0200, Christophe Fergeau wrote:
> > 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. 
> ok
> 
> > Do you know if there are any notifications to spice-gtk users that
> > dnd is happening and of the progress of dnd?
> There is SPICE_DEBUG("%s: drag a file", __FUNCTION__); on dnd start,
> no info about progress of dnd.
> 
> I am fixing the issue when agent is not connected and user does dnd

Forgot to add 
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
to my first message btw ;)

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/bf68b176/attachment-0001.sig>


More information about the Spice-devel mailing list