Gajim - 2017-03-04

  1. bot Philipp Hörist pushed 2 commits to branch _refs/heads/master_ of _gajim_ <>: *b5c98864* <> Add commandline option to show warnings *840cb365* <> Use unicode path for plugins non-unicode path is marked as deprecated
  2. bot Philipp Hörist pushed 5 commits to branch _refs/heads/master_ of _gajim_ <>: *516a18eb* <> Add CSS Provider and convert config values to css *e00341e8* <> Dont use depracted override_background_color() *9ecabd56* <> Dont use depracted override_color() *0abb26ae* <> Dont use depracted override_font() *a44be8e6* <> Merge branch 'master' into 'master' CSS Styling See merge request !62
  3. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ <>: *fc6b50d9* <> Create CheckButtons with mnemonics
  4. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ <>: *9bcad9a2* <> Style GroupChatControl Banner with CSS
  5. bot Philipp Hörist pushed 1 commit to branch _refs/heads/master_ of _gajim_ <>: *c02260c4* <> Move CSS Code into gajim.css
  6. bot Philipp Hörist pushed 2 commits to branch _refs/heads/regex-filter-config-ui_ of _gajim-plugins_ <>: *3f942335* <> [regex_filter] Add UI to edit replacement patterns *fb32816f* <> [regex_filter] Update manifest.ini
  7. bot Philipp Hörist pushed 3 commits to branch _refs/heads/master_ of _gajim-plugins_ <>: *3f942335* <> [regex_filter] Add UI to edit replacement patterns *fb32816f* <> [regex_filter] Update manifest.ini *e76b0ace* <> Merge branch 'regex-filter-config-ui' into 'master' Add UI view to edit replacement patterns for regex_filter See merge request !28
  8. bot Philipp Hörist pushed 0 commits to branch _refs/heads/regex-filter-config-ui_ of _gajim-plugins_ <>:
  9. vflyson Hello and thank you for mergning in my changes.
  10. vflyson I have a question. I'm intending to build a plugin similar to regex_filter, yet I want it to highlight certain words instead of replacing them.
  11. vflyson e.g. applying bold style to matching words within the incoming messages
  12. vflyson I've looked at the sources of all the gajim plugins I could find but it seems like what I'm trying to do is not easy to accomplish.
  13. vflyson Would anyone know the best way of accomplishing such a task?
  14. lovetox hi vflyson
  15. vflyson hi lovetox
  16. lovetox wait a moment i look into it
  17. vflyson thanks
  18. lovetox yeah this should be possible on a quick look
  19. lovetox gajim provides an gui extension point called "print_real_text"
  20. lovetox if you hook to that extension point, you can modify the text and its tags
  21. lovetox before it gets printed to the view
  22. vflyson oh, cool! since to be pretty fresh, Sep '16
  23. vflyson what kind of tags are those btw, html, bb?
  24. lovetox i think
  25. lovetox you can see how they are used maybe in
  26. vflyson uh-oh it seems to have only 24 code samples on github and the majority appears to be from within gajim's codebase
  27. lovetox also there you can see what is given to over the exten point
  28. vflyson yeah, looking at that right now
  29. lovetox how you can hook to a extension point you can see in various other plugins
  30. lovetox for example url_image_preview
  31. lovetox basically before printing the text, gajim hands over all data to the extension point, the extension point hands it to all plugins that hook it
  32. vflyson events_handler, right?
  33. lovetox the plugin can modify it, and then its returned, and gajim continues to print
  34. lovetox no
  35. lovetox for example
  36. lovetox self.gui_extension_points = { 80 'chat_control_base': (self.connect_with_chat_control, 81 self.disconnect_from_chat_control),
  37. vflyson ah
  38. lovetox you define the extension point, and a method that should be called
  39. lovetox look at url_image_preview plugin, it does the same for URLs
  40. vflyson that's pretty interesting... so I should be able to create an extension which modifies the message
  41. lovetox it transforms URLs into pictures
  42. lovetox the same way
  43. vflyson yeah, I thought of using that one as a base at some point, but got stuck figuring out how to modify the text, not insert an image
  44. vflyson thanks for the help! I'll try to put together a small proof-of-concept plugin to see how it works
  45. lovetox vflyson, it would probably not wrong to include this into the regex_filter plugin
  46. lovetox you have the UI now
  47. lovetox where you can add words
  48. lovetox you just have to add something so the user can decide if he wants to highlight or replace
  49. vflyson I'll perhaps try to extend that plugin more
  50. lovetox add the extension point and the method that does the highlighting
  51. vflyson it'll need edit mode, /i flag, etc
  52. lovetox i have to go to work now, if you need anything just ask, i will read the muc log :)
  53. lovetox generelly look at other plugins, how they do things
  54. vflyson thanks lovetox