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 353389 - Add sending via Telepathy
Add sending via Telepathy
Status: RESOLVED FIXED
Product: nautilus-sendto
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: nautilus-sendto-maint
nautilus-sendto-maint
Depends on: 462172
Blocks:
 
 
Reported: 2006-08-29 12:38 UTC by Bastien Nocera
Modified: 2009-01-08 19:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initial empathy plugin (8.37 KB, patch)
2008-12-05 19:02 UTC, Jonny Lamb
needs-work Details | Review
Working empathy plugin (9.21 KB, patch)
2008-12-29 16:45 UTC, Jonny Lamb
committed Details | Review

Description Bastien Nocera 2006-08-29 12:38:22 UTC
Which would show a list of users with whom we're having a /dialog.
Maybe GAIM, etc. should be agglomerated into one Telepathy-based plugin.
Comment 1 Bastien Nocera 2007-11-20 14:51:49 UTC
This should be possible using Empathy's libempathy-gtk. Any hints from Empathy devels?
Comment 2 Marco Barisione 2007-11-20 15:21:19 UTC
AFAIK the IRC connection manager does not support file transfers.

I have a semi-working patch to add empathy-based file transfers to nautilus-sendto but empathy from svn trunk does not yet support file transfers.

When the file transfer code will be merged in empathy I will open a bug to add an empathy backend to nst.
Comment 3 Bastien Nocera 2007-11-20 16:09:40 UTC
(In reply to comment #2)
> AFAIK the IRC connection manager does not support file transfers.
> 
> I have a semi-working patch to add empathy-based file transfers to
> nautilus-sendto but empathy from svn trunk does not yet support file transfers.
> 
> When the file transfer code will be merged in empathy I will open a bug to add
> an empathy backend to nst.

This bug is in nautilus-sendto :)

Do you have an opened bug for empathy itself?
Comment 4 Xavier Claessens 2008-02-06 12:58:32 UTC
See bug #462172
Comment 5 Bastien Nocera 2008-12-05 15:07:01 UTC
Don't reassign the bugs please, otherwise we won't get to see your patches. Feel free to work on it though :)
Comment 6 Jonny Lamb 2008-12-05 19:02:56 UTC
Created attachment 124017 [details] [review]
Initial empathy plugin

Here's an initial empathy plugin.

This works fine unless Empathy isn't running or is offline when I get some weird segfault that I don't really understand at the moment.

I'll take a further look at this now, but feel free to make this problem a little clearer.

Here's the backtrace:

Program received signal SIGSEGV, Segmentation fault.

Thread 139873979393760 (LWP 32479)

  • #0 ??
    from /usr/lib/librsvg-2.so.2
  • #1 dbus_connection_dispatch
    from /usr/lib/libdbus-1.so.3
  • #2 message_queue_dispatch
    at dbus-gmain.c line 101
  • #3 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.16.6/glib/gmain.c line 2012
  • #4 g_main_context_iterate
    at /build/buildd/glib2.0-2.16.6/glib/gmain.c line 2645
  • #5 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.16.6/glib/gmain.c line 2853
  • #6 IA__gtk_main
    at /scratch/build-area/gtk+2.0-2.12.11/gtk/gtkmain.c line 1163
  • #7 main
    at nautilus-sendto-command.c line 790

Comment 7 Xavier Claessens 2008-12-07 14:17:36 UTC
Some quick comments:

 - In get_selected_contact(): gtk_tree_model_get returns a new ref and you never unref the contact.
 - if (!accounts || g_slist_length (accounts) == 0) --> accounts==NULL if and only if the length of the list is 0.
 - In init(), you can use mc_accounts_list_free() instead of going through the list and unref them all and then free the list.

Otherwise it seems OK. I have no idea for your crash :/
Comment 8 Bastien Nocera 2008-12-08 12:04:46 UTC
And you either need to require the telepathy-glib.pc file, or have empathy require it in its pkg-config file:

In file included from empathy.c:29:
/usr/include/libempathy/empathy-debug.h:28:34: error: telepathy-glib/debug.h: No such file or directory
In file included from /usr/include/libmissioncontrol/mc-profile.h:81,
                 from /usr/include/libmissioncontrol/mc-account.h:73,
                 from /usr/include/libempathy/empathy-contact-manager.h:27,
                 from empathy.c:30:
/usr/include/libmissioncontrol/mission-control.h:38:34: error: libtelepathy/tp-conn.h: No such file or directory
/usr/include/libmissioncontrol/mission-control.h:39:39: error: telepathy-glib/connection.h: No such file or directory
/usr/include/libmissioncontrol/mission-control.h:40:36: error: telepathy-glib/channel.h: No such file or directory
In file included from /usr/include/libmissioncontrol/mc-profile.h:81,
                 from /usr/include/libmissioncontrol/mc-account.h:73,
                 from /usr/include/libempathy/empathy-contact-manager.h:27,
                 from empathy.c:30:
/usr/include/libmissioncontrol/mission-control.h:133: error: expected specifier-qualifier-list before 'TpConnectionStatus'
In file included from /usr/include/libmissioncontrol/mc-profile.h:81,
                 from /usr/include/libmissioncontrol/mc-account.h:73,
                 from /usr/include/libempathy/empathy-contact-manager.h:27,
                 from empathy.c:30:
/usr/include/libmissioncontrol/mission-control.h:168: error: expected declaration specifiers or '...' before 'TpHandleType'
/usr/include/libmissioncontrol/mission-control.h:176: error: expected declaration specifiers or '...' before 'TpHandleType'
/usr/include/libmissioncontrol/mission-control.h:185: error: expected declaration specifiers or '...' before 'TpHandleType'
/usr/include/libmissioncontrol/mission-control.h:204: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/libmissioncontrol/mission-control.h:208: error: expected declaration specifiers or '...' before 'TpConn'
/usr/include/libmissioncontrol/mission-control.h:211: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/usr/include/libmissioncontrol/mission-control.h:216: error: expected declaration specifiers or '...' before 'TpConnection'
/usr/include/libmissioncontrol/mission-control.h:238: error: expected declaration specifiers or '...' before 'TpConnection'
In file included from /usr/include/libempathy/empathy-contact-list.h:28,
                 from /usr/include/libempathy/empathy-contact-manager.h:31,
                 from empathy.c:30:
/usr/include/libempathy/empathy-tp-group.h:61: error: expected ')' before '*' token
In file included from empathy.c:31:
/usr/include/libempathy/empathy-dispatcher.h:55: error: expected specifier-qualifier-list before 'TpChannel'
/usr/include/libempathy/empathy-dispatcher.h:63: error: expected declaration specifiers or '...' before 'TpChannel'
In file included from empathy.c:32:
/usr/include/libempathy/empathy-utils.h:100: error: expected ')' before '*' token
/usr/include/libempathy/empathy-utils.h:110: error: expected ')' before '*' token
/usr/include/libempathy/empathy-utils.h:115: error: expected ')' before '*' token
empathy.c: In function 'validate_destination':
empathy.c:121: warning: implicit declaration of function 'empathy_contact_can_send_files'
empathy.c:121: warning: nested extern declaration of 'empathy_contact_can_send_files'
empathy.c: In function 'send_files':
empathy.c:153: warning: implicit declaration of function 'empathy_dispatcher_send_file'
empathy.c:153: warning: nested extern declaration of 'empathy_dispatcher_send_file'
make[4]: *** [empathy.lo] Error 1
Comment 9 Bastien Nocera 2008-12-08 12:07:31 UTC
And I guess the required version also needs updating (with empathy-devel-2.24.1-1.fc10.x86_64):
empathy.c: In function 'validate_destination':
empathy.c:121: warning: implicit declaration of function 'empathy_contact_can_send_files'
empathy.c:121: warning: nested extern declaration of 'empathy_contact_can_send_files'
empathy.c: In function 'send_files':
empathy.c:153: warning: implicit declaration of function 'empathy_dispatcher_send_file'
empathy.c:153: warning: nested extern declaration of 'empathy_dispatcher_send_file'
Comment 10 Xavier Claessens 2008-12-08 12:26:32 UTC
(In reply to comment #8)
> And you either need to require the telepathy-glib.pc file, or have empathy
> require it in its pkg-config file:

Seems an empathy bug. it should require telepathy-glib in its .pc file.

You need Empathy 2.25.2 to have file transfer support.
Comment 11 Simon McVittie 2008-12-08 12:37:41 UTC
If Empathy and MC don't both have a Requires.private on telepathy-glib, they should each add one (and if they use headers from libtelepathy/ then they need Requires.private: libtelepathy as well).

If they have a suitable Requires.private already, you may have been bitten by <https://bugzilla.redhat.com/show_bug.cgi?id=426106>.
Comment 12 Xavier Claessens 2008-12-09 09:34:21 UTC
Fixed in Empathy trunk.
Comment 13 Jonny Lamb 2008-12-29 16:45:12 UTC
Created attachment 125484 [details] [review]
Working empathy plugin

(In reply to comment #7)
>  - In get_selected_contact(): gtk_tree_model_get returns a new ref and you
> never unref the contact.

Fixed.

>  - if (!accounts || g_slist_length (accounts) == 0) --> accounts==NULL if and
> only if the length of the list is 0.

Hm, okay. I used g_slist_length because it looks prettier.

>  - In init(), you can use mc_accounts_list_free() instead of going through the
> list and unref them all and then free the list.

As discussed with you, this is not possible as mc_accounts_list_free expects a GList, not a GSList.

So, here is an updated patch. This actually works even when Empathy is loaded.
Comment 14 Bastien Nocera 2009-01-06 15:19:01 UTC
I'm blindly committing, as I don't have a chance of testing this in the short term.

2008-12-29  Jonny Lamb  <jonny.lamb@collabora.co.uk>

        * configure.in:
        * src/plugins/Makefile.am:
        * src/plugins/empathy.c: Added empathy plugin.

Could you please file a separate bug about using EmpathyContactSelector in nautilus-sendto, and make it depend on the empathy-gtk bug tracking the addition of that widget?
Comment 15 Xavier Claessens 2009-01-06 15:46:06 UTC
Bastien: Do you have any objection if I take the maintainership of src/plugins/empathy.c ? I have SVN access, so I can update for future API breakage in libempathy (we already have one planned...)

Of course for any change outside that file I'll poste patche and ask for approuval.
Comment 16 Jonny Lamb 2009-01-08 19:07:29 UTC
Re: EmpathyContactSelector, I just submitted bug #567065.