Gajim - 2025-09-14


  1. lovetox

    tef, so one app opens it in light mode and the other in dark mode? sounds weird, otherwise they look identical so i assume its the same software

  2. lovetox

    on your first screenshot in the top right corner is a symbold that normally controlls the icon size, you could get a preview there

  3. lovetox

    but otherwise you would need to ask somewhere else what software is used here, Gajim does not control what is opened

  4. lovetox

    Rebeld, thats very weird behavior, we have no code in the current version that sets automatically the autoconnect setting, so there must be a bigger problem if it jumps back to its original setting

  5. lovetox

    maybe try to start gajim with -v and capture the moment when you toggle the setting

  6. tef

    well, I set this one to be dark mode... I think you're thinking of this as if there's some systemwide preference

  7. tef

    there's no such thing in my setup, I don't have a DE or anything, they are totally disconnected other than both being the gtk filechooser

  8. tef

    https://docs.gtk.org/gtk3/iface.FileChooser.html like, it's this, right? and the "preview widget" here?

  9. tef

    err that's 3

  10. lovetox

    there is no preview widget, in GTK4 maybe thats the difference :)

  11. lovetox

    i also dont understand what you mean you dont have a DE

  12. lovetox

    obviously you sent me screenshots from a desktop

  13. tef

    I mean what I said

  14. tef

    I use a window manager by itself

  15. tef

    anyway it doesn't look as if that's relevant, and it seems it's a matter of gtk removing things and them not being reimplemented after the removal, maybe?

  16. lovetox

    No idea, you would need to ask in the GTK chat

  17. tef

    https://discourse.gnome.org/t/file-chooser-gtk-4-image-preview/11510

  18. tef

    >Application developers can reimplement the same functionality using a GtkFileChooserWidget inside a GtkDialog, and adding the same preview widget directly to the dialog >Application developers

  19. lovetox

    Yes of course we can build always our own thing with GTK, but we dont want to

  20. tef

    Well, I can't see any way to configure it to not use gtk filedialog in gajim

  21. tef

    if you don't get that and just get your file manager directly, is there any way to configure that behavior?

  22. tef

    can't there just be a setting that specifies what to use when you select a file to upload?

  23. lovetox

    We use Gtk.FileDialog

  24. lovetox

    you can ask in the GTK chat how it works and what the options are, on windows it raises native windows dialogs, it could be the case if specific portals are installed that it does so for your system at well

  25. lovetox

    but its not documented on their page so you would need to ask

  26. tef

    from a few hours ago... "believe both should be using the GTK filepicker?" "not sure if there is such a thing" "it opens my installed file explorer on ubuntu"

  27. tef

    which of these is true?

  28. tef

    they can't both be

  29. lovetox

    correct, maybe i wasnt clear enough, i dont know the answer to your questions, as these are GTK Framework internals

  30. tef

    there's clearly such a thing as you just said what it was, and it matches what I googled to find that does this

  31. lovetox

    we use a public API that offers no preview widget options

  32. lovetox

    if you want to understand how it works, you need to ask someone that knows the internals of the framework

  33. tef

    and they've clearly been delineated as the responsibilty of the program itself to implement. so i guess that just means "no preview"

  34. tef

    which we could have probably got to within 5min

  35. lovetox

    yes, if someone would have thought about this before, but believe it or not, you are the first person since years that brought up this topic, so the same as you, i had to type stuff into internet searches and try to answer the question why it has no preview on your system

  36. tef

    well, if it's "rare" enough to not have memorized the content of each image you may want to upload beforehand, i guess i can concede there

  37. lovetox

    if your file explorer supports previews you can also drag&drop, or Copy/Paste

  38. lovetox

    also usally file explorers support thumbnails, which is what i use if i need it

  39. mesonium

    tef, can you please try to start Gajim with `GTK_USE_PORTAL=1`? This will force to think it were sandboxed and choose the appropriate file picker via a portal. Hopefully the right one. ;)

  40. mesonium

    tef, can you please try to start Gajim with `GTK_USE_PORTAL=1`? This will force it to think it were sandboxed and choose the appropriate file picker via a portal. Hopefully the right one. ;)

  41. mesonium

    which xdg-desktop-portals do you have installed?

  42. mesonium

    tef, the following works for me: 1) Create `~/.config/xdg-desktop-portal/portals.conf` with the following content: ``` [preferred] default=gtk org.freedesktop.impl.portal.Settings=xapp;gtk org.freedesktop.impl.portal.FileChooser=gtk ``` 2) `systemctl --user restart xdg-desktop-portal` 3) Restart Gajim

  43. mesonium

    tef, the following works for me: 1) Create `~/.config/xdg-desktop-portal/portals.conf` with the following content: ``` [preferred] default=gtk org.freedesktop.impl.portal.Settings=xapp;gtk org.freedesktop.impl.portal.FileChooser=gtk ``` 2) `systemctl --user restart xdg-desktop-portal`

  44. mesonium

    Adjust the portal configuration as you like: https://wiki.archlinux.org/title/XDG_Desktop_Portal

  45. mesonium

    (No need to set `GTK_USE_PORTAL=1`)

  46. mesonium

    In summary: gtk4 uses desktop portals by default to choose the filepicker dialog

  47. mesonium

    In summary: gtk4 uses xdg desktop portals by default to choose the filepicker dialog

  48. agh-j

    > In summary: gtk4 uses xdg desktop portals by default to choose the filepicker dialog I am not sure about that. I also use a minimal X11 environment, bspwm, polybar, and plasma without the desktop shell. Most other non-plasma apps will use the KDE file dialog, yet Gajim does not.

  49. agh-j

    I just loaded Gajim now with GTK_USE_PORTAL=1, and it now loads the KDE file dialog

  50. mesonium

    Interesting, because when I set GTK_USE_PORTAL=0, it still loaded the above defined xdg file dialog.

  51. mesonium

    But great that it works for you now ;) "Most other non-plasma apps": Do they use Gtk? version 3? 4?

  52. mesonium

    do they have GTK_USE_PORTAL set in their .desktop file?

  53. agh-j

    I could just have some screwed up XDG config/share

  54. agh-j

    Actually, it probably is most likely some old cruft config left somewhere

  55. agh-j

    > But great that it works for you now ;) "Most other non-plasma apps": Do they use Gtk? version 3? 4? I think it is mostly GTK-3 now, if not 4.

  56. mesonium

    Looks like GTK3 also already has made use of xdg portals and if you choose the "GTK" portal, it will use GTK3. > If you want to use GTK4 you will need to either use GNOME, or write a new portal implementation that uses GTK4.

  57. agh-j

    My system should use KDE, because that is the XDG session I launched, so there is some fobbed configs on my side.

  58. agh-j

    Thanks for the portal environment type too

  59. tef

    well, on the second host i have this problem... none of them. it doesn't seem right to split pieces of the program's own configuration out like this silently, but I'll try this method

  60. tef

    no luck with just the snippet

  61. tef

    Ah yes, mandating GNOME. fun

  62. tef

    There we go, works on the original host and needs the service. Not sure what to do about the one with no systemd yet

  63. tef

    I guess that one I'm SOL. Thank you for the solution, no matter how utterly braindamaged it is to run a systemd service to do a simple UI configuration it does work if you have systemd

  64. tef

    On that host, I seem to get "2025-09-14 11:48:58 (W) gajim.gtk.file_transfer_selector Could not add". Everything set up identically to the other one except no systemd; xdg-desktop-portal-[whatever] are all running

  65. lovetox

    i think that warning is faulty

  66. lovetox

    do you actually see something not working?

  67. tef

    Yes I do! That host does not get any preview in the gtk filechooser despite doing the above config, minus the systemd bits I cannot do there

  68. tef

    This host with systemd doesn't get it, and the config described there works to achieve a preview in the gtk filechooser

  69. lovetox

    but the warning is about our widget that shows what files you have chosen

  70. lovetox

    it happens after you have chosen files

  71. lovetox

    if you select multiple files, we get uri paths to those files

  72. lovetox

    if one of these paths could not be read for some reason, we show this warning

  73. tef

    "your widget" is what's been the point of discussion all along, whether my semantics are perfect or not

  74. tef

    that is the gtk filechooser, which is what's always been at issue

  75. lovetox

    no you misunderstand me

  76. lovetox

    This warning, is in the dialog where the button is to open the filechooser

  77. lovetox

    the code that prints this warning runs, after you have closed the filechooser and the paths transmitted by it are checked

  78. tef

    ...aha I see

  79. tef

    yes, I can actually do the upload just fine from this host

  80. lovetox

    yeah if i have time i get to the bottom of this warning, and improve it so it actually tells us something

  81. tef

    right, sorry for the assumption

  82. mesonium

    tef: you could also use dbus-daemon to reload the config I assume

  83. tef

    should manually invoking xdg-desktop-portal as described here do it? https://wiki.gentoo.org/wiki/XDG/xdg-desktop-portal

  84. tef

    I tried that and had no success getting a filechooser with previews

  85. mesonium

    I thought about sth like > dbus-send --session --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ReloadConfig But I'm not in front of a computer and haven't tested it

  86. tef

    After a restart it looks like I am OK

  87. tef

    So yes, I think you're right and it needed reload in some way as above

  88. tef

    Thanks for the pointer to how to solve this. Even if I strongly dislike the way it's made, having it functional is worlds better

  89. mesonium

    Great, you are welcome

  90. mesonium

    I've managed to make webp animations click to play w/o the webpdec element :)

    👍 1
  91. Rebeld

    > Rebeld, thats very weird behavior, we have no code in the current version that sets automatically the autoconnect setting, so there must be a bigger problem if it jumps back to its original setting The problem was miraculously resolved when the XMPP server in question came back online. So, it seems that when an XMPP server goes offline, Gajim doesn't allow you to change the "Connect on startup" option...

  92. cal0pteryx

    > I've managed to make webp animations click to play w/o the webpdec element :) That sounds great !

  93. mesonium

    even w/o converting to mp4. It's just pillow to get the frames and then pushing them into a buffer, which gtk picture displays in the end

  94. mesonium

    even w/o converting to mp4. It's just pillow to get the frames once and then pushing them into a buffer, which gtk picture displays in the end

  95. mesonium

    So who writes a giphy plugin? 😉

  96. Link Mauve

    lovetox, broneprovod@gajim.org is apparently a spammer.

  97. lovetox

    Link Mauve, i forwarded it to the admin

  98. Link Mauve

    Ta. :)