I don't know if anyone has switched away from Thunar because of this and maybe it doesn't matter. Most open source devs are friendly and don't "compete" right? Even though I like Thunar better for most things, one feature in Nautilus that I have yet to see duplicated is the automatic preview of audio files.
This patch may be flaky but it took me awhile to get right. I think the audio preview is quite reliable. It uses a timer and motion-notify-events and it is careful not to interfere with existing clicking and dragging callbacks. The mouse cursor is changed with GDK and the file is played with Gstreamer. I'd be thrilled if you could work it into Thunar in some way.
Mmh, cool stuff. Why didn't I notice this earlier? I cannot guarantee to have time to look at this more closely in the next few weeks but this looks pretty interesting.
Gst seemed like the least hackish way to do it. Is there another library that you wouldn't mind introducing as a compile time option? If not, I'll keep maintaining the patch for the niche users who want this.
Patch applies on thunar 4.16.x, though running autogen.sh produces some error for me:
schwinn@schwinn-desktop:~/git/thunar$ ./autogen.sh Preparing package directory /home/schwinn/git/thunar...Running intltoolize --automake --copy --forceRunning gtkdocize --copy...Running autoreconf...autoreconf: Entering directory `.'autoreconf: configure.ac: not using Gettextautoreconf: running: aclocal --force -I m4 ${ACLOCAL_FLAGS}autoreconf: configure.ac: tracingautoreconf: running: libtoolize --copy --forcelibtoolize: putting auxiliary files in '.'.libtoolize: copying file './ltmain.sh'libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.libtoolize: copying file 'm4/libtool.m4'libtoolize: copying file 'm4/ltoptions.m4'libtoolize: copying file 'm4/ltsugar.m4'libtoolize: copying file 'm4/ltversion.m4'libtoolize: copying file 'm4/lt~obsolete.m4'autoreconf: running: /usr/bin/autoconf --forceautoreconf: running: /usr/bin/autoheader --forceautoreconf: running: automake --add-missing --copy --force-missingconfigure.ac:66: installing './compile'configure.ac:58: installing './missing'examples/tex-open-terminal/Makefile.am: installing './depcomp'thunar/Makefile.am:238: error: HAVE_GSTREAMER does not appear in AM_CONDITIONALthunar/Makefile.am:239: error: Thunar_CFLAGS must be set with '=' before using '+='thunar/Makefile.am:242: error: Thunar_LDADD must be set with '=' before using '+='thunar/Makefile.am:242: warning: variable 'Thunar_LDADD' is defined but no program orthunar/Makefile.am:242: library has 'Thunar' as canonical name (possible typo)autoreconf: automake failed with exit status: 1
I'm not sure whether I will use the stable or git version of thunar more often.
The git version ofc :D
Interesting, thanks for the port, works for me
I am not convinced yet that this is something desirable. It's not only a preview, it just plays the full track. Imo a preview would rather be e.g. "playing some seconds in the middle of the track" I suppose.
It is not clear to me what the purpose is which this feature tries to fulfill. Searching for some track when I forgot the name ? Currently I cannot imagine when I would want to use such a sneak preview over just opening the file in my player, where I can wind ff to any point I want, and where I can control the volume.
So how do you make use of this feature ? / Why do you prefer it over opening the track in some player ?
The concept feels a bit encroaching .. stuff is played when the mouse is only hovered on it, that might happen unintentional, and with surprising volume. Why e.g. not using an UCA to trigger a preview ? Or how about only play the track for the time left-mouse is hold (and the cursor is not moved)?
That mouse cursor looks .. uumm improvable. ... does nautilus use something more fancy which we possibly can copy ?
An xfconf setting would be required to toggle the feature on/off.
For anyone who wants to test it: Can be build with ./autogen.sh --with-gstreamer=1.0 (no idea what other gstreamer versions will do)