Commit Graph

1380 Commits

Author SHA1 Message Date
Bryan Schumaker
83867dba2c libsaria: Reindex on library refresh
This should allow me to filter while the library is scanning.
2011-12-11 20:25:53 -05:00
Bryan Schumaker
e987eaa3a4 ocarina: Hide queue when empty
This was something that I did in 4.x, and I like the feature.  Who wants
to see an empty notebook page?
2011-12-11 17:56:24 -05:00
Bryan Schumaker
e983d69322 libsaria: Chose next songs from the queue
If there are songs in the queue, I pick from there.  Otherwise, I pick
from the library.
2011-12-11 16:25:24 -05:00
Bryan Schumaker
0f3e5d5963 ocarina: Fill in the queue
The library passes in its selected songs and then the queue responds to
the QUEUE_REFRESH callback to fill in the list.
2011-12-11 16:18:47 -05:00
Bryan Schumaker
6ef54e07c5 libsaria: Add songs to the queue
It takes a list of song ids and adds them to a deque.  The UI can then
iterate over each ID and query the size.
2011-12-11 16:16:02 -05:00
Bryan Schumaker
9739bdc76a libsaria: Library get_info() returns TrackTag
I simplify the function by removing the function pointer call and
letting callers deal with the TrackTag pointer it now returns.
2011-12-11 16:14:53 -05:00
Bryan Schumaker
56eee0ae22 libsaria: Added queue
I do this as a double-ended queue so I can remove songs anywhere I want
(and hopefully re-order them later, too).
2011-12-11 15:46:58 -05:00
Bryan Schumaker
9a9fc87f92 ocarina: Properly respond to a right click
I had a test function, but it wasn't being called.  I connected the
widget to the activate signal and improved the function to list the rows
that are currently selected.
2011-12-11 15:46:54 -05:00
Bryan Schumaker
74ab92ea6f ocarina: Get list of selected IDs from the songlist 2011-12-11 15:46:50 -05:00
Bryan Schumaker
781dedfe13 ocarina: Added a queue page
Eventually it will show the list of queued songs.  For now I just add an
unused page.
2011-12-11 15:46:47 -05:00
Bryan Schumaker
57bf72c4e5 libsaria: Get utf8 encoded strings from taglib
This should cut down on the number of pango errors that I see when
filing in lists.
2011-12-11 15:46:44 -05:00
Bryan Schumaker
0b4d9c25eb libsaria: Use absolute paths for saria dirs
I noticed that new save files weren't being created.  I now use the HOME
environment variable to construct an absolute path to write files to.
2011-12-11 15:46:40 -05:00
Bryan Schumaker
a14cedc942 libsaria: Choose songs after filtering
Songs are only picked from the set of visible songs after filtering.
2011-12-11 15:46:35 -05:00
Bryan Schumaker
f0decd07d6 libsaria: Load library through an idle task
This allows me to draw the UI first and load the library once that has
finished.  This should make Ocarina feel more responsive.
2011-11-13 13:44:45 -05:00
Bryan Schumaker
ffbaff27ec libsaria: Change the number of tracks indexed at once
I was doing 50, but I think I can handle 100.  I also defined a constant
at the top of the file to make it easier to change this value again in
the future.
2011-11-13 12:43:02 -05:00
Bryan Schumaker
6e033513c0 libsaria: Refilter during indexing
I trigger a REFILTER callback after each IndexTask is processed to keep
the UI up to date with the current index.
2011-11-13 12:40:42 -05:00
Bryan Schumaker
f7bd0d873f ocarina: Move some buttons to the header
I think these buttons work better in the page header, rather than in the
footer with the controls.
2011-11-13 12:34:57 -05:00
Bryan Schumaker
364b3a7c65 ocarina: Set label text after filtering
Set it to the current number of visible songs.
2011-11-13 12:22:02 -05:00
Bryan Schumaker
b36def4c08 libsaria: Change library size when filtered
I return the number of visible songs, so if the user has entered a
filter string then I return the size of the results set.  If we're not
filtered then I return the size of the playlist.
2011-11-13 12:21:00 -05:00
Bryan Schumaker
5512d46e4e ocarina: Filter the song list
Users enter text and non-matching songs are removed from the songlist
view (they do come back when the text is removed)
2011-11-13 12:05:52 -05:00
Bryan Schumaker
fa498f379c libsaria: Added an is_visible() function
This will return true if the given inode is visible.
2011-11-13 12:05:03 -05:00
Bryan Schumaker
75cb804756 libsaria: Added a REFILTER callback
This will be called to inform the UI that the filter text has changed.
2011-11-13 11:33:12 -05:00
Bryan Schumaker
824f589ff2 libsaria: Perform filtering
I use an in-place set intersection to find a set of songs that match the
search terms.
2011-11-13 11:29:41 -05:00
Bryan Schumaker
048313c681 ocarina: Added filter entry 2011-11-13 10:49:05 -05:00
Bryan Schumaker
1c0084b2e9 libsaria: Created a generic format_text() function
This is used by the track tags for creating word lists.  I also use the
function to format filter search text.
2011-11-13 10:47:55 -05:00
Bryan Schumaker
1c5b230434 ocarina: Add a GtkEntry for filtering 2011-11-13 10:33:16 -05:00
Bryan Schumaker
8ae21bfe58 ocarina: Added basic header
It's a label declaring itself to be a header.  This allows me to make
sure that page switching functions work before I get too far.
2011-11-13 10:03:47 -05:00
Bryan Schumaker
d5df6e134b libsaria: Build the substring index
This is an index of every substring in the (artist, album, title) tags
of the library.  This should be easier to work with than regular
expression based filtering since I don't need to compare every key with
every search term.
2011-11-13 09:48:50 -05:00
Bryan Schumaker
7fc4e22795 libsaria: Call a dummy index function for each TrackTag
This function takes an inode and word list.  Soon it will add each
substring to an index.
2011-11-12 19:31:42 -05:00
Bryan Schumaker
fc50ceb34f libsaria: Format each tag as it is read in
I lowercase everything, strip out some characters, and create a linked
list of each word for each tag.
2011-11-12 19:21:41 -05:00
Bryan Schumaker
86e40cefcb ocarina: Turn on idle tasks during startup
This allows indexing to run right away, rather than waiting for other
idle tasks to be added.
2011-11-12 14:27:28 -05:00
Bryan Schumaker
ef36c58e96 libsaria: Create an IdleTask for indexing the library
Right now this will only be triggered when the library is loaded from
disk.  Once I get farther I can easily create a function to index a
track as it is added to the library (so I won't need to reindex
everything during this case)
2011-11-12 14:25:32 -05:00
Bryan Schumaker
eab73ffb39 Begin work on Ocarina 5.4 2011-11-12 14:03:13 -05:00
Bryan Schumaker
cad03257eb Created a PKGBUILD
Now I can submit ocarina to the AUR!  I also updated the .gitattributes
file so the PKGBUILD doesn't get included in the tarball.
2011-11-11 08:12:40 -05:00
Bryan Schumaker
a9b4147df8 build: Updated Sconstruct
A few fixes before releasing 5.3
2011-11-11 08:07:58 -05:00
Bryan Schumaker
82cb17c1cb build: Added support for DESTDIR
I'll need this for my PKGBUILD
2011-11-10 17:31:27 -05:00
Bryan Schumaker
41f1c01752 build: Don't generate include/version.h all the time
Installing, cleaning and archiving don't need to create the version.h
file, so instead I'll add it as a build step for ocarina.
2011-11-09 23:17:59 -05:00
Bryan Schumaker
863bce3482 Update .gitignore
Ignore tarballs
2011-11-09 23:04:36 -05:00
Bryan Schumaker
624d9a9e74 build: Added a scons archive command
This will create an ocarina tarball for the current release.
2011-11-09 23:04:16 -05:00
Bryan Schumaker
42d4fd4bd1 Update attributes file
Maybe now it'll work a bit better...
2011-11-09 22:47:45 -05:00
Bryan Schumaker
36cfd0af48 ocarina: Remove old random image
I haven't use the 20-sided die image in almost a year...
2011-11-09 22:47:14 -05:00
Bryan Schumaker
2aa79126ec Added .gitattributes file
I want to be able to ignore the screenshots directory when generating an
archive.
2011-11-09 22:43:23 -05:00
Bryan Schumaker
958020f270 libsaria: Check stream status before reading
If we are unable to open the preferences file we shouldn't try to read
from it.  This led to a segmentation fault when compiled in release
mode, but for some reason it worked when compiled in debug mode?
2011-11-09 17:28:19 -05:00
Bryan Schumaker
1d704a3ac0 Ocarina 5.3-rc1 2011-11-09 17:28:09 -05:00
Bryan Schumaker
6f96a1d135 build: Generate ocarina.sh during instatll
I was doing this whenever the Command() class was constructed, instead I
only want to do this when it's run.
2011-11-09 08:34:08 -05:00
Bryan Schumaker
026bf0c010 libsaria: Only load song if string is not empty
It's stupid to try loading an empty string.
2011-11-09 08:33:40 -05:00
Bryan Schumaker
ab3c89d5e6 Added license
I wanted something simple, so after some google searching I decided to
go with a "plain language" version of the GLP v2.  This means I can
understand it, since it's not written in lawyerspeak.
2011-11-09 08:31:36 -05:00
Bryan Schumaker
db70dd8fe6 build: Don't cd when running the binary
Relative paths should keep working now.
2011-11-08 08:21:56 -05:00
Bryan Schumaker
66f70249ad ocarina: Load images using the full path
relative paths can't be trusted once the program has been installed.  To
get around this, I assume that the install directory has been configured
correctly and then point to images located in the subdirectory next to
the executable.
2011-11-08 08:20:21 -05:00
Bryan Schumaker
11d92eef89 libsaria: Add a debugging message
Helpful for knowing what path the audio subsystem is attempting to load.
2011-11-08 08:19:47 -05:00