Gajim - 2024-03-30


  1. chud

    What's a quick way to get a list of a contact's resources

  2. lovetox

    Check the contact module

  3. chud

    so like how broken is jingle ft

  4. chud

    im having trouble finding any code that would notify the user of incoming transfer

  5. lovetox

    No idea didn't look at it for years

  6. lovetox

    But maybe look into the filezransferdialog

  7. jstein

    My gajim client shows the date in the chat window in a strange format "Sat 03/30/24" No one should use a 2 digit year anymore. How can I set RFC / ISO date in the chat client? I even would suggest it should be the default.

  8. cal0pteryx

    jstein: advanced config gives you complete freedom: search for "_format"

  9. jstein

    cal0pteryx, thank you. That works fine. Only z in %Y-%M-%d %H:%m:%S UTC %z is not interpreted

  10. jstein

    I expected +02:00

  11. cal0pteryx

    Hm maybe that specific object is not tz-aware. The next release will have fixes for that

  12. lovetox

    jstein: it depends on your system settingd

  13. lovetox

    And UTC is not a valid time formatting

  14. lovetox

    It's also not clear why you would want a timezone

  15. lovetox

    I hope you know in what timezone you live

  16. jstein

    I live in a country, that still hat daylight saving we shift the clocks in stupid way (tomorrow for example) Without timszone you have 02:00 A and 02:00 B

  17. lovetox

    And?

  18. jstein

    I want to see the real time

  19. lovetox

    Because of that one day you show the whole year everywhere your timezone?

  20. jstein

    yes sure

  21. jstein

    it does not cost a cent

  22. jstein

    why do I have a clock, if it is running mad 2 h per year? ;-)

  23. lovetox

    Hm but I agree it should work

  24. jstein

    I will check, if I need "UTC" as a string

  25. jstein

    with " signs

  26. lovetox

    Why do you need utc

  27. jstein

    I just like that

  28. lovetox

    I can't argue with that 😁

  29. lovetox

    Look into python time formatting

  30. jstein

    when you travel around the world and your flight tickets are all in local time and try to plan your stop over you learn why it is stupid to drop the timezone

  31. lovetox

    It would well be that random characters are not supported

  32. lovetox

    Only separatora

  33. jstein

    removed UTC. I think %z is ignored in my 1.8.4

  34. jstein

    Will try with next release again

  35. jstein

    thanks so far

  36. lovetox

    But check your system settings

  37. Andros

    Hi 👋

  38. lovetox

    jstein, i tested this, and it seems like a bug in gajim

  39. lovetox

    probably as cal0pteryx said, the object is not timezone aware, so it cant print the timezone because it has none

  40. chud

    do I understand correctly that gajim gui is un-unit-testable mostly

  41. chud

    like the chat view specificalyl

  42. chud

    I tried instantiating it with a bunch of MagicMocks all over the place to no avail

  43. chud

    also how dead is filetransfer.py? I see it instantiates gtk widgets by hand instead of using a .ui, I guess it must be ancient

  44. lovetox

    thats mostly a preference thing, there is nothing better to define a gui in a xml file

  45. chud

    >do I understand correctly that gajim gui is un-unit-testable mostly honestly I am wasting a lot of time repeating the same action by hand trying to get it to work, specifically gui and event stuff. I am spending more time on doing gui than I did on the actual logic!

  46. lovetox

    we tend to do it, to reduce the code, and its sometimes easier to use a gui editor

  47. lovetox

    > I am spending more time on doing gui than I did on the actual logic! thats quite normal

  48. lovetox

    all the super logic does not bring you anything if you dont have a good GUI for it

  49. lovetox

    also yes GUI in general (if we are not talking about web applications) are basically not unit testable

  50. lovetox

    or its very much effort at least

  51. lovetox

    its also very much effort on the web i guess, but as its such a big market, there were solutions developed for it

  52. lovetox

    and its all using one thing, html, while with native guis there are a lot of different frameworks and no generic way to test it

  53. chud

    I mocked around CallWindow and only now realize how much time that saved. Honestly infuriating spending more time on drawing a simple goddamn button than on what that button does

  54. chud

    >no generic way to test it Doesn't have to be generic? The gui just has to be loosely coupled I think. Gtk lets you simulate clicks and stuff

  55. chud

    Also I'm not sure how this should really be, but gajim's gui seems to be rather "fat" and I'm wondering what the rationale is: like, why handle CallUpdated and work out what that actually meant inside the Window object instead of exposing methods like "tell user we're connect{ing,ed}", "display video with this widget"? Especially given that guis indeed are more likely to be hard to unit test, wouldn't you want to keep the logic there to a minimum and move it to other places?

  56. lovetox

    we usually do that, non-gui logic is in common

  57. lovetox

    gui logic is in gtk folder

  58. lovetox

    the general idea or goal would be that you could start a gajim session without a GUI, headless so to to speak

  59. lovetox

    i dont understand your remark about CallUpdated, its a event raised by the common module, a gui code can receive it if it subscribes to this event

  60. lovetox

    thats a usual pattern, i dont understand what you are proposing to replace this with

  61. lovetox

    or are you saying CallUpdated could be more specific, like CallConnected, CallDisconnected, etc

  62. lovetox

    but we have code in the test folder that instantiates some windows or widgets, this can help immensely if you test some code.

  63. lovetox

    but thats not what i call a unit test. A unit test could run on a server in some CI job, without human interaction.

  64. lovetox

    hooking up a button to the right method is usually not the thing that causes bugs, even if , its noticed fast by users, reported, can be easily described, and is generally something that is fixed very fast

  65. lovetox

    why a call suddenly is interrupted, because some low level logic in the jingle or network code does not work, is not at all easy to debug, can not be good described, often needs extensive debug logs and much time to find the issue, if at all possible.

  66. lovetox

    so thats, while it would of course be nice to end 2 end test code with the GUI, i think its not the big game changer