Gajim - 2019-06-08


  1. lovetox raver, wurstsalat , its a GTK Bug
  2. lovetox Gajim does not set where to show the tooltip
  3. lovetox GTK does it on its own
  4. erik Hi. From earlier conversation here, I learned that you want to replace the current text box with a list box. I'm thinking of working on that today. Where can I learn more about the structure of gajim's code base?
  5. lovetox can only reproduce this with X11 backend
  6. lovetox on wayland it works as it should
  7. lovetox erik, you basically have to replace everything in conversations_textview.py
  8. lovetox just as a warning, this is a lot of work, the textview has a lot of features and we will not merge anything that just looks a bit better but misses half of the stuff that worked before
  9. erik 😁
  10. erik But if it doesn't get stated, it can't be finished
  11. erik Started
  12. lovetox im not trying to say you should not work on it, just warning you that this is not a weekend project
  13. erik Understood about the conditions though
  14. lovetox have fun :)
  15. lovetox if you have questions just ask
  16. lovetox and yes the code in the textview is often awful, thats because people fiddled with it the last 15 years
  17. erik Well, maybe once the foundation is there, people can join in to help get it exactly right?
  18. lovetox yes of course :)
  19. erik Sure, then we have the opportunity for a nice cleanup
  20. erik I'll need to start with some analysis first, I think. I don't have much experience with the code base yet.
  21. lovetox you should just look at the ConversationsTextview in terms of what it can do now and what your Listbox should be able to do
  22. lovetox i dont think you can transfer much code
  23. lovetox also the ListBox will have items, and these items will need Textviews
  24. erik With variable heights
  25. lovetox its not so complicated, we have a ChatControl Class
  26. lovetox which is one chat
  27. lovetox every ChatControl, has exactly one ConversationsTextview, and some other elements
  28. lovetox like the message input etc
  29. lovetox so the ChatControl ties all elements together you see in one Chat
  30. lovetox you only want to replace a single thing here
  31. lovetox the Textview
  32. lovetox so lookup where we instatiate the ConversationsTextview class in the ChatControl
  33. lovetox and just Replace it with your Listbox
  34. erik Ok. Thanks! I'll have something to look at more
  35. wurstsalat erik: some suggestionsa are collected here as well: https://dev.gajim.org/gajim/gajim/issues/9060
  36. erik wurstsalat: thanks for that pointer!
  37. erik I'm likely to have questions about that later.
  38. erik Liberty
  39. erik lovetox: you mention the listbox being the simplest solution, but others being available
  40. erik What was the original problem again?
  41. lovetox what do you mean with problem?
  42. lovetox you can also use a GtkGrid, and just add stuff to it
  43. lovetox ListBox has some nice features list you can apply filters on the items in the listbox, and it as a simple API for adding items and removing item
  44. lovetox ListBox has some nice features like you can apply filters on the items in the listbox, and it as a simple API for adding items and removing item
  45. erik Ok. You point out that copy/paste becomes more problematic
  46. erik Is that an acceptable regression?
  47. erik Because it will be part of the design, it'll be good to agree on that point before going too far down this task
  48. erik Track
  49. erik Having the list box facilitates a number of things, if I'm right: showing avatars in the chat history, making chat messages formatted more like user expect (more visual separation and Mark up)
  50. erik Do all the things in the meta issue depend on the list box? (My reading says"no", but just checking)
  51. wurstsalat Most things from this meta issur seem fairly easy to implement in a listbox
  52. wurstsalat At least for me, the history copying of multiple messages at once is not a necessity.
  53. erik Ok. I've used it once or twice, but that's during some years of use (but not intensively)
  54. bot Daniel Brötzmann updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/452 >: CapsCache: Add room info query
  55. bot Daniel Brötzmann updated a merge request for _gajim/master_ < https://dev.gajim.org/gajim/gajim/merge_requests/452 >: CapsCache: Add room info query
  56. erik regarding working on the listbox: I've created an account on the project's GitLab box.
  57. erik I'm currently not able to clone the repo. Would someone either do that for me, or provide me with the rights to do that?
  58. erik (I prefer not to keep my work on *just* my laptop)
  59. wurstsalat asterix, could you enable erik's account for forking? ^
  60. wurstsalat erik, you logged in via github account, I guess? could you quickly state what your name on gitlab is, so someone may activate it?
  61. erik my name on gitlab is ehuelsmann
  62. erik if that's more practical, I can change my nick.
  63. wurstsalat no, just wait for someone to come around and activate your account ;) (but that may take a while today)
  64. erik oh. I meant here in the channel
  65. wurstsalat that's fine!
  66. erik lovetox: you don't have your proof-of-concept lying around in a branch somewhere, I suppose?
  67. ehuelsmann hmm. my development box has python-nbxmpp 20180318-1
  68. ehuelsmann which isn't recognized as 0.9.91
  69. ehuelsmann but this is the nightly package.
  70. ehuelsmann is the nightly package behind? or is *my* nightly package behind?
  71. wurstsalat python*3*-nbxmpp ?
  72. ehuelsmann ah. no. this is python2, I tihnk.
  73. ehuelsmann I think.
  74. ehuelsmann checking.
  75. wurstsalat https://ftp.gajim.org/debian/dists/unstable/main/binary-amd64/
  76. ehuelsmann ok. I'll need to gajim-nightly
  77. ehuelsmann then I get at least mostly the right items
  78. ehuelsmann brb
  79. erik the new gajim (nightly) feels snappier. Is that correct?
  80. erik I was on 1.0.1
  81. erik I'm now on 1.1.3
  82. ehuelsmann ok. so, I'm now on a much more modern UI.
  83. ehuelsmann GTK3 instead of GTK2?
  84. ehuelsmann I do have problems starting the development Gajim though; but this doesn't seem right: /usr/lib/python3/dist-packages/nbxmpp-0.6.10.egg-info
  85. ehuelsmann ok. so, I can't install nbxmpp-nightly because gajim-nightly doesn't support it (says apt-get)
  86. ehuelsmann this seems a bit of a packaging issue.
  87. ehuelsmann how do you guys do your development? In VMs?
  88. ehuelsmann I mean, I don't want to break my current chat setup.
  89. wurstsalat there were a lot of changes between 1.0.0 and 1.1.3 (and then again on master), but all are GTK3 ;)
  90. wurstsalat I don's have experience with these packages, I use master all the time and installed from cloned repos ..
  91. ehuelsmann ok. but you use your development Gajim to chat here as well?
  92. wurstsalat but you don't need to install gajim-nightly to run it. you can run it straight from the repo with launch.py
  93. ehuelsmann or do you have separate installs?
  94. ehuelsmann I guess I can run 2 clones at the same time.
  95. wurstsalat I install from the cloned repo from time to time to test if everything works as expected under real conditions. but for development I start directly from the repo by using launch.py -p dev
  96. ehuelsmann I mean, run from 2 colnes.
  97. wurstsalat yes, -p is profile
  98. ehuelsmann ok.
  99. ehuelsmann that should work, I guess.
  100. ehuelsmann I'll try uninstalling the packaged Gajim and replacing it with master.
  101. wurstsalat ./launch.py -p dev -l gajim=DEBUG gives you a separate profile showing all debug output (which can be narrowed down by using -l gajim.module=DEBUG
  102. wurstsalat be sure to clean /usr/lib/python3/dist-packages/ from any nbxmpp or gajim folders ;)
  103. wurstsalat but there has to be a recommended way that works with packages (I just don't know it and lovetox is not around)
  104. dragneel1994 Hello guys !
  105. dragneel1994 i dont understand ! i'am using omemo 2.6.29 ! but when i checked gajim gitlab i found the last version is 2.6.59 !
  106. wurstsalat dragneel1994, you have to select the right branch in gitlab. for gajim 1.1.3 you need the omemo plugin from gajim_1.1 branch, not from master
  107. dragneel1994 master mean beta right ?
  108. wurstsalat no. master is current master (without any release) this is not beta nor alpha, this is *unreleased*
  109. dragneel1994 what is the objectif of master ?
  110. wurstsalat development
  111. dragneel1994 Hum nice work :)
  112. dragneel1994 Thank you very much wurstsalat !
  113. dragneel1994 sorry for lot of questions :)
  114. dragneel1994 so you mean master branch will be the 1.2.x version ?
  115. erik ok. I have 'master' running.
  116. erik good.
  117. erik which also means I can start developing this thing.
  118. dragneel1994 erik ! how can i install master ?
  119. erik dragneel1994, I'm running it on Linux Mint. what's your platform?
  120. dragneel1994 i have linux mint 19.1 on my laptop :)
  121. wurstsalat erik, nice! if you have questions, just ask
  122. wurstsalat dragneel1994, yes, probably
  123. dragneel1994 iam using gajim now on win 10 :)
  124. dragneel1994 wait ! i'll use my laptop right now
  125. erik dragneel1994, what I did is: install these packages from Mint: sudo aptitude install python3-cssutils python3-keyring python3-precis-i18n python3-secretstorage
  126. erik then,
  127. dragneel1994 re
  128. dragneel1994 so fast xD
  129. erik oh. and also: sudo aptitude install python3-setuptools
  130. wurstsalat dragneel1994, you can from here: https://gajim.org/downloads/snap/win/ for windows, but this is not intended for production use!
  131. dragneel1994 ok
  132. dragneel1994 and for linux !
  133. erik then I cloned: git clone https://dev.gajim.org/gajim/python-nbxmpp.git
  134. erik which I then installed: sudo python3 setup.py install
  135. erik (that installed 0.9.91 -- a prerequisite for Gajim/master)
  136. erik then I cloned: git clone https://dev.gajim.org/gajim/gajim.git
  137. erik you can run that out of the local directory using ./launch.py
  138. erik or you can install it with the same python3 setup.py incantation
  139. dragneel1994 Thank you very much guys 😀
  140. erik hmm. My plugin-manager doesn't seem new enough.
  141. erik wurstsalat, what can I do about the version of the plugin manager?
  142. erik nice. I see the master version has source code highlighting!
  143. erik something I've missed all along!
  144. wurstsalat erik, you can either copy plugin_installer from gajim-plugins master branch to your plugins directory or clone that repo as well an symlink to it
  145. wurstsalat https://dev.gajim.org/gajim/gajim-plugins/blob/master/README.md
  146. erik wurstsalat, yea, I ended up cloning the repo and installing the symlink.
  147. erik there are a number of additional plugins for master, right?
  148. erik I like it.
  149. wurstsalat Yes, some are new. And I really like that syntax_highlighting plugin too :)
  150. erik ok. so, my current assessment of the code base is as follows: 1. The view which holds all the text is coded in gajim.conversation_textview.py(class ConversationTextview) [as explained by lovetox) 2. The main rendering of that class actually is encoded in gajim.gtk.htmltextview.HtmlTextView 3. The HtmlTexView is probably very much required, but now only on the level of single messages (because it's what does the rendering)
  151. wurstsalat erik: that's the point where lovetox answers your questions ;)
  152. erik 😉
  153. erik Well, I guess he'll have this history and hopefully goes into it later
  154. wurstsalat Most likely
  155. lovetox erik you should now be able to fork
  156. lovetox and yes ConversationsTextview is a wrapper around the htmltextview
  157. lovetox the htmltextview lets us render xhtml-im stuff
  158. lovetox see xep-0071 if you are interested
  159. lovetox but thats all it does
  160. lovetox actually i would start your project with a normal textview that just displays text for now
  161. lovetox we can exchange it later with the html textview thats not a problem
  162. lovetox first goals should be, the listbox should provide a way to add a message row, the message row itself should be a object that displays an avatar, the message, encryption symbol
  163. lovetox the message row object should be based on some generic object, we will probably need many row objects that slightly differ
  164. lovetox like some kind of status messages, error messages, info messages, etc
  165. wurstsalat File transfers, image previews :)
  166. erik lovetox, ok. thanks!
  167. erik I'll do one step at a time.
  168. EmleyMoor Any idea why gajim wants to re-add Facebook contacts to my roster?
  169. lovetox did you try to remove them?
  170. erik if I want to quickly create a dev environment with the same accounts as my regular environment, where does Gajim store this data so I can copy it to create a dev environment?
  171. asterix .config/gajim
  172. erik asterix, thanks!
  173. erik ok. I have at least been able to identify what trouble I'm getting myself into with respect to the factoring the listbox into the code.
  174. erik I'm finding that I may be most effective at doing that *after* refactoring the existing code a bit.
  175. erik is there a problem with me implementing a bit of a refactoring on the ConversationTextview before moving to the listbox (and PR-ing that before I actually move there)?
  176. wurstsalat I guess it's a lot less frustrsting if you would refactor the code beforehand :)
  177. wurstsalat What I wanted to tell you: a lot of widget styling is possible via gajim.css in gajim/data/styles
  178. wurstsalat But yeah, there is a lot of functionality hidden in the conversation textview one only gets to see when exploring the code
  179. erik wurstsalat, no problem. I'm just noting tight coupling between the conversationtextview and the htmltextview.
  180. erik which is independent of the styling that's available through gajim/data/styles.
  181. erik however, that does bring me to the question: why don't we use richer styling to achieve the same thing as I'm now trying to achieve through the listbox?
  182. wurstsalat Because it's more complicated and in some cases impossible to achieve with a textview what a listbox can offer.
  183. wurstsalat For example: attaching error messages to specific messages, text indentation for multiline messages, chat markers, .. All these are a lot easier to implement using a listbox
  184. erik That's sufficient for me. was just making sure we're not going through more paint than required.
  185. erik yay! succesfully forked the gajim project in your GitLab instance
  186. bot Daniel created an issue in _gajim-plugins_ < https://dev.gajim.org/gajim/gajim-plugins/issues/428 >: #428: < OMEMO double fingerprints >
  187. erik so, I'm succesfully hacking on ConversationTextview right now. making slow progress, obviously.
  188. wurstsalat erik: good luck :)
  189. erik wurstsalat: more I need to learn what I need to do to builds patches which have a good chance of being accepted
  190. erik wurstsalat: do you have a guide for me regarding the process to follow if I want to increase the chances for my changes to be reviewed?
  191. lovetox erik, yes refactoring some things before working on the listbox is a good idea
  192. lovetox its best you write down where you see potential for refactoring and let me look over it
  193. lovetox so i can tell you into how much of a rabbit whole you are getting your self :)
  194. lovetox so i can tell you into how much of a rabbit hole you are getting your self :)
  195. erik lovetox: thanks. I've started some initial explorations in that area. Are you asking that I wrote something like a refactoring plan before going into the actual effort?
  196. lovetox and of course the smaller the PR the faster it gets merged
  197. erik I think that's fair
  198. erik Ok. I'll write a bit of a plan and work on small commits along the plan.
  199. lovetox yeah i think its usefull if you tell me what and where you want to refactor before you start it
  200. erik I'll need a few days to get more of a grip on the code base. Then I can give you an idea where I think I can go and what refactoring I think will help me.