Gajim - 2024-10-22


  1. lovetox

    Why it's mostly broken in a lot of places

  2. Emil

    is it possible for gajim to change spellchecker's language based on MUC's language?

  3. lovetox

    If you mean automatically, no

  4. EmleyMoor

    Recently upgraded to gajim 1.8.4 and it's nice. Of course there's newer but if this version stays reliable and the backports don't mess things up too much, it's not a problem.

  5. emru

    it's not possible now, or it's not implementable?

  6. cal0pteryx

    emru: it's not possible at the moment

  7. emru

    thanks!

  8. cal0pteryx

    but can be implemented

  9. debacle

    > Why it's mostly broken in a lot of places To sort out any potential packaging problems, e.g. missing packages, outdated versions, strange behaviour under one of the ≈255 different window managers in Debian etc. *before* there is an offifical GTK4 based release.

  10. cal0pteryx

    debacle: sounds reasonable

  11. debacle

    > debacle: sounds reasonable Yes, I did the same when Gajim moved from GTK2 to GTK3 and also when Dino moved from GTK3 to GTK4.

  12. Link Mauve

    lovetox, technically there is nothing preventing it from switching automatically, it just isn’t implemented right?

  13. lovetox

    Im not convinced Users would want that

  14. lovetox

    And it's very complex to implement

  15. lovetox

    Because you need to track a app default, a MUC default and a user override and a way for the user to remove the user override

  16. Link Mauve

    Yeah.

  17. Link Mauve

    I’ve also built the gtk4 branch here, I’ll use it for a while and report/fix issues. :)

  18. lovetox

    Please don't it's work in progress

  19. lovetox

    We release a nightly if we want people to test it

  20. Link Mauve

    Ah ok, I won’t then.

  21. cal0pteryx

    Link Mauve: of course help is welcome! But right now it's not ready for testing

  22. Link Mauve

    I’m in the process of migrating another Python program to gtk4, so I can wait until you want external contributions. :)

  23. cve-1312

    lovetox, cal0pteryx: can i ask you for fork access on my gitlab account, freshly created "cve-1312"?

  24. meson

    It's not mentioned here https://dev.gajim.org/gajim/gajim/-/issues/12008 but StyleContext has been declared deprecated since 4.10: I guess we port away from it and I shouldn't use it anymore, right?

  25. meson

    https://docs.gtk.org/gtk4/class.StyleContext.html

  26. lovetox

    cve-1312: please register again

  27. lovetox

    Our spam protection did delete your account

    😮 1
  28. lovetox

    meson: use add_css_class

    👍 1
  29. Link Mauve

    In the .ui file you can use <style><class name="foobar"/></style> and then you can use .foobar in the CSS.

  30. meson

    Thanks, I've added in the code and now do the following (bit simplified pseudo code): ``` self.set_state_flags(Gtk.StateFlags.CHECKED, True) ctx.set_source_rgba(self.get_color())) ctx.fill() self.set_state_flags(Gtk.StateFlags.NORMAL, True) # reset the colors ``` This works fine, but if I leave the state as `checked` and interact with the widget, I get a memory corruption (segmentation fault), yay

  31. meson

    Link Mauve, interest in debugging the issue? Then I give you steps to reproduce ;) unfortunately I don't have libgtk4 with debug symbols here for a useful stacktrace.

  32. meson

    Link Mauve, interest in debugging the issue? Then I give you steps to reproduce ;) unfortunately I don't have libgtk4 with debug symbols here for a useful backtrace.

  33. Link Mauve

    Why not? Does your distribution not provide it?

  34. Link Mauve

    I’m already debugging clipboard in that other project atm.

  35. meson

    Oh, I do have it indeed, I wondered why gdb hasn't suggested the right package nor debuginfod hasn't downloaded it automatically

  36. meson

    if you are interested: https://paste.opensuse.org/pastes/68e26617f3da

  37. meson

    if you are interested: https://paste.opensuse.org/pastes/68e26617f3da and https://paste.opensuse.org/pastes/708d06ee3840

  38. meson

    alright, my solution makes it crash anyway, just a bit later, when resetting the state flag back to normal :-(

  39. meson

    I guess https://docs.gtk.org/gtk4/method.Widget.get_color.html > This function should only be used in snapshot implementations could be a reason.

  40. Link Mauve

    meson, really don’t get stuck with cairo, if you have something which works even with wrong colours that’s ok for a first version, you’ll convert it to proper widgets soon enough anyway.

  41. cve-1312

    > Our spam protection did delete your account Oh, right, that's done

  42. meson

    Link Mauve: ...going for snapshots now.

  43. Link Mauve

    Yay!

  44. lovetox

    cve-1312, you have now the rights

  45. cve-1312

    Great, thanks :)

  46. erik

    > Our spam protection did delete your account Is this something public? I run a GitLab instance too and would love spam account protection!

  47. lovetox

    https://dev.gajim.org/lovetox/spam-fighting-tools

  48. lovetox

    it runs once a day, and checks via http api if any new user has contributions, issues, merge requests, comments

  49. lovetox

    if not the user is deleted

  50. lovetox

    we found that for some reason spam accounts do not start spamming after registration

  51. lovetox

    they register hundreds of accounts, and then do nothing, or wait multiple days to produce spam

  52. lovetox

    we still get 2 or 3 a month that start spamming issues immediatelly after registration, but if they create a issue its trivial to delete all contributions

  53. lovetox

    its 3 clicks in the gitlab interface

  54. lovetox

    it would be so nice if gitlab offered a simple, approve new registrations feature

  55. lovetox

    because you can spot spam account profiles from a mile

  56. lovetox

    ah and beware, the app scans all accounts which are marked "external", and if it sees contributions it removes the external flag

  57. lovetox

    this way you dont scan all users again and again

  58. lovetox

    on first run on a big user base, its better you do some dry run and comment out the delete commands

  59. lovetox

    to see if it has false positives

  60. lovetox

    when you made the first run, then its very unproblematic, because it only touches accounts < 24 hours old, those accounts cannot have made any serious contribution that is by accident deleted

  61. lovetox

    > ah and beware, the app scans all accounts which are marked "external", and if it sees contributions it removes the external flag but this means you need to set in gitlab that all new registrations are flagged as "external"

  62. erik

    Nice! Thanks!

  63. lovetox

    i reiterate the warning, this is a internal lib written for our gitlab, it sends delete commands to your gitlab, you should do some dry run and read the codebase, before you execute this on your users

  64. erik

    :-) I'll be sure to do the dryruns.

  65. erik

    Not sure if we'll use it for production at all, but I think we do need to investigate it.

  66. Benson

    Would like to update the build on Fedora, however protobuf dependency may delay this as would need Bazel build to be packaged, or some other build system used for python bindings to protobuf. Could another library be optionally used? Some old benchmarks at https://github.com/thekvs/cpp-serializers

  67. lovetox

    not sure why you ask this here, we dont maintain the fedora package

  68. meson

    Benson: I've tried to contact Michael Kuhn, the new package maintainer, by mail, but got no response

  69. meson

    Maybe you have more luck

  70. Benson

    It would help many distros that do not carry Bazel but would want to carry a new version of Gajim.

  71. Benson

    Happy to send a merge request if it is something that would be considered.

  72. lovetox

    merge request for what?

  73. Benson

    Alternative option for serialization library.

  74. lovetox

    you want to replace protobuf?

  75. lovetox

    i think you got the wrong idea what we do with protobuf

  76. lovetox

    we dont need just serialization, we need other applications to be able to deserialize

  77. lovetox

    we transmit data to other applications with that

  78. lovetox

    we can not simply switch to some other serialization library, because the serialization format needs to be exactly the same

  79. Benson

    There is a C implementation https://github.com/protobuf-c/protobuf-c

  80. lovetox

    what are you proposing? that we write our own bindings to the google protobuf library and not using the bindings google offers?

  81. cve-1312

    > it would be so nice if gitlab offered a simple, approve new registrations feature They don't? Riseup does it on 0xacab.org, maybe they made some kind of patch for that... but I never touched to a gitlab install personally

  82. lovetox

    ha, yeah i found the option now

    👍 2
  83. lovetox

    maybe they added it somewhere in the last years

  84. Benson

    > what are you proposing? that we write our own bindings to the google protobuf library and not using the bindings google offers? It seems it is only used in omeno-dr https://dev.gajim.org/gajim/omemo-dr/-/blob/master/pyproject.toml?ref_type=heads#L24 could call a c library from Python. At this point exploring options. Can do implementation for options that would be considered.

  85. hannibal

    Wouldn't it be better to "fix" the protobuf build to work without bazel

  86. lovetox

    Benson, of course and then we maintain bindings for a ever changing google library, because someone at fedora does not want that dependency

  87. lovetox

    Its good that there is a solution for the fedora users, its called flathub

  88. Benson

    Would want an alternative to what Google offers. There are pure python implementations of protobufs https://github.com/protocolbuffers/protobuf/blob/main/docs/third_party.md but this would likely not be performant.

  89. Benson

    > Wouldn't it be better to "fix" the protobuf build to work without bazel Suggested this upstream. Waiting for responce.