Gajim - 2023-07-17


  1. kurion

    lovetox: I guess, I can work with `Gtk.ListBox.signals.row_selected`

  2. kurion

    For now, I have

  3. kurion

    ```

  4. kurion

    ``` def _on_msgrow_selected(self, listbox, row) -> None: print('selected row no. ' + str(self._list_box.get_selected_row().get_index()) + ' of ' + str(self._contact.jid.localpart)) ```

  5. kurion

    got hold of the variables I need to work with.

  6. aquatarkus

    hi, how can I send attachments with the gajim flatpak?

  7. aquatarkus

    clicking on "add files" does nothing

  8. aquatarkus

    console says: `Can't open portal file chooser: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.freedesktop.portal.FileChooser” on object at path /org/freedesktop/portal/desktop`

  9. aquatarkus

    I went to flatseal and allowed gajim access to the session bus, still it will not work

  10. lovetox

    Google the error

  11. lovetox

    It's nothing Gajim can influence

  12. aquatarkus

    I did, so is the wlr desktop portal just broken with flatpaks? I only installed gajim as a flatpak because the normal arch package is broken / doesn't work

  13. aquatarkus

    ``` https://conference.gajim.org:5281/pastebin/d7ff94e2-53c8-40ad-89c6-2922935b4e1d

  14. aquatarkus

    ^ this is the error from the normal arch package

  15. lovetox

    hm did you migrate to a new gajim version ?

  16. lovetox

    this error basically says your account is invalid setup

  17. lovetox

    this can be solved by removing the config

  18. lovetox

    .config/gajim

  19. lovetox

    but of course this will lose all your settings

  20. kurion

    If I make a `dict` in `view.py` to store index of last selected `MessageRow` for each chat, in which file should I implement the shortcut to focus on that index?

  21. kurion

    the `dict` in `ConversationView` should be accessible from that file in a good way.

  22. kurion

    I've thought about making the shortcut in `main.py`.

  23. kurion

    the way I would access ConversationView from `main.py` would be

  24. kurion

    ```

  25. kurion

    ``` def _focus_last_visited_message(self, _action: Gio.SimpleAction, param: None) -> None: chat_stack = self._chat_page.get_chat_stack() view = chat_stack._chat_control._scrolled_view dict = view.last_visited ```

  26. kurion

    But this does not look okay.

  27. kurion

    Obviously, this does not look okay.

  28. aquatarkus

    lovetox: alright I'll try this. Yes, I have been switching around from the git version to the normal arch package and back

  29. aquatarkus

    gajim launched successfully after removing settings.sqlite

  30. kurion

    I need to have that shortcut available as "win.focus-last-visited-message" in `shortcuts.json`. That is why I implemented the method in `main.py`.

  31. lovetox

    kurion, the idea of actions is

  32. lovetox

    that you register a action for a window or app

  33. lovetox

    then you can connect to that action from anywhere in the code

  34. lovetox

    and register a callback

  35. lovetox

    check for example _connect_actions in chat_stack.py

  36. lovetox

    the actions are registered somewhere else, but the code that needs the info when this action is triggered should connect to it

  37. lovetox

    so i guess you want the conversatonview to know when this action is triggert

  38. lovetox

    so it should connect to that action and register a callback

  39. lovetox

    except you want that the action also switches chat

  40. lovetox

    then of course it needs to be higher in the hirachy

  41. kurion

    The UX I have in mind is, I switch chats with `Ctrl+Tab` and press `Ctrl+L` and that lands focus on the last selected `MessageRow` for that chat.

  42. kurion

    I am checking out `_connect_actions` in `chat_stack.py`

  43. aquatarkus

    hi, are the contacts nicknames in Gajim shared with the server?

  44. ☭Mike Yellow

    The contacts nicknames are shared with the server no matter what the client is.

  45. aquatarkus

    thank you

  46. aquatarkus

    would be nice for there to be an option to keep it locally for privacy

  47. lovetox

    aquatarkus, not sure what you mean

  48. aquatarkus

    what I mean by what? by contact nicknames, or by keeping it locally only?

  49. ☭Mike Yellow

    > would be nice for there to be an option to keep it locally for privacy Well... You can remember every address you want to contact without adding them into your roster.

  50. ☭Mike Yellow

    lovetox, They is too concerned about their privacy.

  51. ☭Mike Yellow

    Gajim can contact someone without adding them into your roster.

  52. aquatarkus

    I know, I'm not complaining or anything

  53. aquatarkus

    I just said that it would be neat if Gajim could use an offline contacts list instead, or at least for the nicknames to be kept locally and not uploaded to the server

  54. ☭Mike Yellow

    >Well... You can remember every address you want to contact without adding them into your roster. Some servers and somebody will block strangers that are not in their roster.

  55. ☭Mike Yellow

    aquatarkus, If users want the server to block someone, the server MUST know the address.

  56. aquatarkus

    I'm not talking about the address, but rather about the nickname

  57. lovetox

    in what scenario ? when you join a groupchat?

  58. lovetox

    because otherwise your nickname is only shared with people you want it to share

  59. aquatarkus

    let's say I have this one friend, and we want to communicate privately while not leaking much metadata. We use gibberish addresses and communicate over Tor. But for the sake of simplicity, I added their real name as their nickname on my contacts list.

  60. aquatarkus

    because I expected that to be clientside

  61. lovetox

    it is clientside, why do you think its not?

  62. aquatarkus

    Mike said above that it's uploaded to the server

  63. aquatarkus

    is it not? good then

  64. ☭Mike Yellow

    aquatarkus, Gajim is open-source, you can change it to whatever you like.

  65. aquatarkus

    I know, I'm not complaining...

  66. lovetox

    aquatarkus, ok sorry, yes if you set a nickname in your roster

  67. lovetox

    this is sent to the server, because the roster and all its information are stored there

  68. aquatarkus

    alright, ty

  69. kobraa

    тут

  70. qy

    Tyttö

  71. fjklp

    does anyone have any ideas on how to reproduce the "getting kicked from muc" condition that results in the message from the server "Error: You are not currently connected to this chat"?

  72. fjklp

    my guess is it might have been caused by an out of memory condition on the account server but I don't really understand this situation

  73. mjk

    couldn't muc server restart cause this?

  74. kurion

    what is a quick way to select the last ListboxRow of a Listbox?

  75. kurion

    It seems like a single specific method does not exist for this.

  76. kurion

    It looks like single specific method does not exist for this.

  77. lovetox

    There is a get by index method

  78. lovetox

    And maybe combine this with a count method or something like that

  79. lovetox

    But if I remember we already count the rows somewhere

  80. kurion

    yup, I guess I found it.

  81. kurion

    `row_count = len(self._list_box.get_children())` in ConversationView

  82. lovetox

    And index may start with 0

  83. kurion

    Thanks. I found `get_last_message_row` method in ConversationView.

  84. kurion

    did the job.

  85. kurion

    that did the job.

  86. Mx2

    hi, flatpak nightly still not works..?