Gajim - 2016-12-15


  1. marcio Hello friends, I would like to know how to join an IRC chat room with Gajim, for example, #python at irc.freenode.net. My own jabber server does have an IRC transport.
  2. vorner Then try finding an IRC transport somewhere else.
  3. vorner Some servers allow using their transports even for people from other servers.
  4. vorner Oh, sorry, you say *does* have, not *doesn't*. Then just use that transport?
  5. vorner depending on the transport software, you put the room name in some mangled form, like #python%irc.freenode.net and the transport into the server box and join it, similar to this MUC.
  6. vorner However, the mangling is specific to the software of that transport.
  7. marcio Vorner: I'm going to try this
  8. mimi89999 What is that doing: https://dev.gajim.org/gajim/gajim/blob/master/src/vcard.py#L117
  9. lovetox it runs the loop 2x, once extension is a string called ".png" and once its ".jpeg"
  10. mimi89999 lovetox‎: This I understood... I don't get what is done in the loop.
  11. lovetox a path is created, then it tests if this path is a valid path to a file
  12. lovetox and if yes it tells the gtk image obejct to show it
  13. mimi89999 And the image.show() ?
  14. lovetox it shows the ui image object
  15. lovetox its hidden
  16. lovetox if there is no avatar
  17. lovetox or else you would see empty rectangles
  18. mimi89999 So that exactly shows the avatar in the contact info view?
  19. lovetox it makes the image visible yes
  20. mimi89999 Ah, and how to run dev Gajim without installing it?
  21. lovetox just clone and click launch .sh
  22. lovetox a few dependencys are needed
  23. lovetox like nbxmpp
  24. lovetox maybe look into the debian folder i think there is a list with dependencys
  25. mimi89999 OK. Coming back with Gajim dev in a few moments...
  26. lovetox https://dev.gajim.org/gajim/gajim/blob/master/README.html
  27. lovetox this will not be that easy, i dont think a gtk.image object can display a webp image
  28. lovetox if we get the image, you would have to find a way with pil to convert the image to png/jpg
  29. lovetox mimi89999, i think it would be better to make this method
  30. lovetox get_pixbuf_from_data
  31. lovetox convert webp
  32. lovetox and maybe find out first why it fails
  33. lovetox because if PIL is installed it should already try to convert
  34. mimi89999 lovetox‎: So like: \n if avatar_mime_type == image/webp: \n convert_webp_to_png ?
  35. mimi89999 Where is the shift+enter for new line?
  36. lovetox what do you mean
  37. lovetox the code that makes this possible?
  38. lovetox as i see it all data i converted in gajim, we dont know which format we get
  39. lovetox its done in get_pixbuf_from_data
  40. lovetox for some reason it fails with webp
  41. mimi89999 In stable if i shift+enter, I can write in a new line. In latest dev I can't.
  42. lovetox first, stable is gtk2
  43. lovetox master branch of git is gtk3
  44. lovetox so you shouldnt use this
  45. lovetox switch to "gajim_0.16" branch
  46. lovetox if you want to use gtk2, what i would recommend
  47. lovetox because in gtk3 version a lot of things dont work
  48. lovetox mimi89999
  49. mimi89999 ‎lovetox‎: In PIL I don't see where it accepts images as variable and returns image as variable.
  50. lovetox actually i think
  51. lovetox in the gtk3 branch we already support webp
  52. mimi89999 Oo
  53. lovetox in gtk2 it will be difficult
  54. lovetox could we test this somehow?
  55. Asterix mimi89999: ctrl_enter
  56. Asterix mimi89999: ctrl+enter
  57. mimi89999 ‎Asterix‎: Not obvious. I am used to shift+enter.
  58. lovetox its also shif+enter in gtk2 version
  59. lovetox why was this changed Asterix?
  60. lovetox actually in gtk2 its both
  61. lovetox so maybe shift + enter is broken somehow in gtk2
  62. lovetox so maybe shift + enter is broken somehow in gtk3
  63. Asterix it is, and arrow key to navigate between lines is also broken
  64. Asterix we intercept the event from normal textview behaviour incorrectly it seems. I haven't investigated
  65. lovetox k
  66. lovetox something to add to the list
  67. lovetox mimi89999 are you sure this is not already working in gajim?
  68. lovetox i think if you see no image its mostly due to only PEP publish
  69. lovetox which gajim doesnt supprt
  70. mimi89999 ‎lovetox‎: Sure it is not in 0.16.6
  71. mimi89999 In the GTK3 I don't know...
  72. Asterix lovetox: what don't we support with PEP? avatar?
  73. Asterix IIRC we support avatar from PEP
  74. lovetox also publishing?
  75. lovetox mimi89999 give me a contact to test
  76. mimi89999 test@lebihan.pl
  77. mimi89999 michel@lebihan.pl
  78. mimi89999 The 2nd is better
  79. Asterix lovetox: I don't remember. Bur receiving for sure
  80. lovetox i see your avatar mimi89999
  81. lovetox yeah it was the other way around
  82. lovetox conversations doesnt support something different than pep
  83. lovetox and gajim only reads from pep
  84. lovetox so if you set from gajim you dont see in conversations
  85. Asterix ha yes indeed
  86. lovetox but if you set in conversations you see in gajim
  87. Asterix report to Conversation then. vcard is not deprecated AFAIK
  88. lovetox they also publish theire avatar as a webp format
  89. lovetox as it seems though we dont care about the format too much, we just open the data with PIL and transform to pixbuf, which works even for webp with current version of PIL
  90. Asterix with pixbuf. Gajim don't use PIL at all. plugins do, but not Gajim
  91. lovetox it doesnt depend on it
  92. lovetox but it uses it if its there
  93. lovetox look into
  94. lovetox gtkgui_helpers.py
  95. lovetox get_pixbuf_from_data()
  96. Asterix ok ok. I didn't remember that
  97. lovetox i dont know who added this
  98. lovetox but this actually kind of nice
  99. lovetox because pixbuf will probably never support as much formats as PIL
  100. lovetox and this converts basically every PIL supported format (which is a long list) to pixbuf
  101. bot pushed commits to branch __ of _python-nbxmpp_ <https://dev.gajim.org/gajim/python-nbxmpp>:
  102. mimi89999 So any chance for webp in Gajim with GTK2?
  103. mimi89999 Because the GTK3 version is unusable and neither http_upload nor OMEMO works on it...
  104. mimi89999 lovetox: Parsing the avatar from the variable and not from a file to PIL is a nightmare.
  105. lovetox mimi89999
  106. lovetox it doesnt work from a file too
  107. lovetox a simple Image.open(PATH) doesnt work for me on python2
  108. lovetox to a webp file