After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641707 - Set FileTransfer.URI
Set FileTransfer.URI
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: File Transfer
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: empathy-maint
Depends on:
Blocks: 640513
 
 
Reported: 2011-02-07 10:05 UTC by Guillaume Desmottes
Modified: 2011-08-29 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/ft-uri-641707 (3.34 KB, patch)
2011-02-07 10:36 UTC, Guillaume Desmottes
reviewed Details | Review

Description Guillaume Desmottes 2011-02-07 10:05:49 UTC
In order to fix bug #640513 we should set the FileTransfer.URI property when requesting a file. We should also set it when accepting one so observer such as Zeitgeist can know when the file is being saved.
Comment 1 Guillaume Desmottes 2011-02-07 10:36:37 UTC
Created attachment 180279 [details] [review]
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/ft-uri-641707

 libempathy/empathy-ft-handler.c |    5 ++++
 libempathy/empathy-tp-file.c    |   49 +++++++++++++++++++++++++++++++--------
 2 files changed, 44 insertions(+), 10 deletions(-)
Comment 2 Guillaume Desmottes 2011-02-07 10:38:34 UTC
Note that this need the not yet relased Gabble 0.11.7 and Salut 0.5.0 to work properly (Butterfly has not be patched yet: https://bugs.freedesktop.org/show_bug.cgi?id=33843 ).

But that's ok, if the CM doesn't implement the property just doesn't exist but we can still send and receive files.
Comment 3 Emilio Pozuelo Monfort 2011-02-07 11:34:53 UTC
Comment on attachment 180279 [details] [review]
http://git.collabora.co.uk/?p=user/cassidy/empathy;a=shortlog;h=refs/heads/ft-uri-641707

Looks good. Just a couple of comments:

>+      TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_URI, G_TYPE_STRING, uri,

You need to bump the minimum tp-glib requirement for this.

>+  EmpathyTpFile *self = (EmpathyTpFile *) weak_object;
>+  EmpathyTpFilePriv *priv = GET_PRIV (self);

You can just do self->priv.

Otherwise looks good.
Comment 4 Guillaume Desmottes 2011-02-07 12:14:17 UTC
(In reply to comment #3)
> (From update of attachment 180279 [details] [review])
> Looks good. Just a couple of comments:
> 
> >+      TP_PROP_CHANNEL_TYPE_FILE_TRANSFER_URI, G_TYPE_STRING, uri,
> 
> You need to bump the minimum tp-glib requirement for this.

Oh I thought we already depended on that but we didn't.
done (I updated the wiki as well, jhbuild was already fine).

> >+  EmpathyTpFile *self = (EmpathyTpFile *) weak_object;
> >+  EmpathyTpFilePriv *priv = GET_PRIV (self);
> 
> You can just do self->priv.

Actually I cannot because EmpathyTpFile was using the old pattern. But we want
to get rid of it so I updated to to use the new one.

I also push a patch to use tp_clear_object().
Comment 5 Emilio Pozuelo Monfort 2011-02-07 12:18:01 UTC
ship it!
Comment 6 Guillaume Desmottes 2011-02-07 12:27:31 UTC
merged to master and gnome-2.33

This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.