-
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
-
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
-
lovetox
but otherwise you would need to ask somewhere else what software is used here, Gajim does not control what is opened
-
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
-
lovetox
maybe try to start gajim with -v and capture the moment when you toggle the setting
-
tef
well, I set this one to be dark mode... I think you're thinking of this as if there's some systemwide preference
-
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
-
tef
https://docs.gtk.org/gtk3/iface.FileChooser.html like, it's this, right? and the "preview widget" here?
-
tef
err that's 3
-
lovetox
there is no preview widget, in GTK4 maybe thats the difference :)
-
lovetox
i also dont understand what you mean you dont have a DE
-
lovetox
obviously you sent me screenshots from a desktop
-
tef
I mean what I said
-
tef
I use a window manager by itself
-
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?
-
lovetox
No idea, you would need to ask in the GTK chat
-
tef
https://discourse.gnome.org/t/file-chooser-gtk-4-image-preview/11510
-
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
-
lovetox
Yes of course we can build always our own thing with GTK, but we dont want to
-
tef
Well, I can't see any way to configure it to not use gtk filedialog in gajim
-
tef
if you don't get that and just get your file manager directly, is there any way to configure that behavior?
-
tef
can't there just be a setting that specifies what to use when you select a file to upload?
-
lovetox
We use Gtk.FileDialog
-
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
-
lovetox
but its not documented on their page so you would need to ask
-
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"
-
tef
which of these is true?
-
tef
they can't both be
-
lovetox
correct, maybe i wasnt clear enough, i dont know the answer to your questions, as these are GTK Framework internals
-
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
-
lovetox
we use a public API that offers no preview widget options
-
lovetox
if you want to understand how it works, you need to ask someone that knows the internals of the framework
-
tef
and they've clearly been delineated as the responsibilty of the program itself to implement. so i guess that just means "no preview"
-
tef
which we could have probably got to within 5min
-
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
-
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
-
lovetox
if your file explorer supports previews you can also drag&drop, or Copy/Paste
-
lovetox
also usally file explorers support thumbnails, which is what i use if i need it
-
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. ;)✎ -
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. ;) ✏
-
mesonium
which xdg-desktop-portals do you have installed?
-
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✎ -
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` ✏
-
mesonium
Adjust the portal configuration as you like: https://wiki.archlinux.org/title/XDG_Desktop_Portal
-
mesonium
(No need to set `GTK_USE_PORTAL=1`)
-
mesonium
In summary: gtk4 uses desktop portals by default to choose the filepicker dialog✎ -
mesonium
In summary: gtk4 uses xdg desktop portals by default to choose the filepicker dialog ✏
-
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. ↺
-
agh-j
I just loaded Gajim now with GTK_USE_PORTAL=1, and it now loads the KDE file dialog
-
mesonium
Interesting, because when I set GTK_USE_PORTAL=0, it still loaded the above defined xdg file dialog.
-
mesonium
But great that it works for you now ;) "Most other non-plasma apps": Do they use Gtk? version 3? 4?
-
mesonium
do they have GTK_USE_PORTAL set in their .desktop file?
-
agh-j
I could just have some screwed up XDG config/share
-
agh-j
Actually, it probably is most likely some old cruft config left somewhere
-
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. ↺
-
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.
-
agh-j
My system should use KDE, because that is the XDG session I launched, so there is some fobbed configs on my side.
-
agh-j
Thanks for the portal environment type too
-
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
-
tef
no luck with just the snippet
-
tef
Ah yes, mandating GNOME. fun
-
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
-
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
-
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
-
lovetox
i think that warning is faulty
-
lovetox
do you actually see something not working?
-
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
-
tef
This host with systemd doesn't get it, and the config described there works to achieve a preview in the gtk filechooser
-
lovetox
but the warning is about our widget that shows what files you have chosen
-
lovetox
it happens after you have chosen files
-
lovetox
if you select multiple files, we get uri paths to those files
-
lovetox
if one of these paths could not be read for some reason, we show this warning
-
tef
"your widget" is what's been the point of discussion all along, whether my semantics are perfect or not
-
tef
that is the gtk filechooser, which is what's always been at issue
-
lovetox
no you misunderstand me
-
lovetox
This warning, is in the dialog where the button is to open the filechooser
-
lovetox
the code that prints this warning runs, after you have closed the filechooser and the paths transmitted by it are checked
-
tef
...aha I see
-
tef
yes, I can actually do the upload just fine from this host
-
lovetox
yeah if i have time i get to the bottom of this warning, and improve it so it actually tells us something
-
tef
right, sorry for the assumption
-
mesonium
tef: you could also use dbus-daemon to reload the config I assume
-
tef
should manually invoking xdg-desktop-portal as described here do it? https://wiki.gentoo.org/wiki/XDG/xdg-desktop-portal
-
tef
I tried that and had no success getting a filechooser with previews
-
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
-
tef
After a restart it looks like I am OK
-
tef
So yes, I think you're right and it needed reload in some way as above
-
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
-
mesonium
Great, you are welcome
-
mesonium
I've managed to make webp animations click to play w/o the webpdec element :)
👍 1 -
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... ↺
-
cal0pteryx
> I've managed to make webp animations click to play w/o the webpdec element :) That sounds great !
-
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✎ -
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 ✏
-
mesonium
So who writes a giphy plugin? 😉
-
Link Mauve
lovetox, broneprovod@gajim.org is apparently a spammer.
-
lovetox
Link Mauve, i forwarded it to the admin
-
Link Mauve
Ta. :)