GNOME Bugzilla – Bug 353389
Add sending via Telepathy
Last modified: 2009-01-08 19:07:29 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.
This should be possible using Empathy's libempathy-gtk. Any hints from Empathy devels?
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.
(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?
See bug #462172
Don't reassign the bugs please, otherwise we won't get to see your patches. Feel free to work on it though :)
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.
+ Trace 210515
Thread 139873979393760 (LWP 32479)
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 :/
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
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'
(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.
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>.
Fixed in Empathy trunk.
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.
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?
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.
Re: EmpathyContactSelector, I just submitted bug #567065.