# HG changeset patch # User Matti Hamalainen # Date 1103636040 0 # Node ID 6f9764fbd693db669cb9548c097200b5db66d3ea # Parent 9b57045482191d088caca1bb826227c799397223 Make the slider in fileinfo window's subtune selector work as expected. diff -r 9b5704548219 -r 6f9764fbd693 src/xs_fileinfo.c --- a/src/xs_fileinfo.c Tue Dec 21 13:32:04 2004 +0000 +++ b/src/xs_fileinfo.c Tue Dec 21 13:34:00 2004 +0000 @@ -76,6 +76,20 @@ void xs_fileinfo_setsong(void) { + gint n; + + XS_MUTEX_LOCK(xs_status); + XS_MUTEX_LOCK(xs_fileinfowin); + + if (xs_status.tuneInfo && xs_status.isPlaying) + { + n = gtk_range_get_adjustment(GTK_RANGE(LUW("fileinfo_subctrl_adj")))->value; + if ((n >= 1) && (n <= xs_status.tuneInfo->nsubTunes)) + xs_status.currSong = n; + } + + XS_MUTEX_UNLOCK(xs_fileinfowin); + XS_MUTEX_UNLOCK(xs_status); }