Gstreamer 1.0 has been out for a while and replaces gstreamer 0.10.
Let's make sure we use the most recent version going forward.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I used to use my own inverted index implementation, which makes sense if
I'm searching all songs for a specific match. Instead, GTK was visiting
each track and asking "does this song match?" and this requires a
different implementation. So rather than make an index, instead I have
each track generate substrings for its tags and then I compare filter
text against the substring set.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I also replace a few PLAYLIST_* notifications with a generic
PLAYLIST_CHANGED notification for when small changes occur. I think
that using set_flag() and check_flag() will make code cleaner and easier
to maintain.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I don't want to keep one function in a file by itself. Instead, let's
just move it into the main playlist file.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
My "insert while sorted" code was getting complicated, and didn't send
all the notifications to the UI (only the first ~1200 songs were
displayed). This patch both simplifies the code and produces the right
answer without a noticable performance penalty.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I can make this simplier by simply passing the index into the vector,
rather than needing to calculate the iterator and pass the index.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
There is no reason to track this on my own, iterating over all tracks
and calculating it on the fly is easier and basically unnoticable.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I don't need to iterate through a linked list to find the track anymore.
Instead, I can access tracks directly using an index.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I know what playlists are library, recent and banned. All others are
just named "Playlist" so there is no need to set up a name variable.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Vectors are more straightforward than linked lists and they should allow
me to clean up the code a lot. For now I just put in the straight
conversion, I'll clean things up in future patches.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I didn't realize this was still around. It should be removed since I
switched to a notification system instead of using the renderer.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This finishes the job I started in the last commit. Once again, I use
an enum of string properties to determine the right field to return.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Rathen than using a bunch of get_PROPERTY_NAME() functions, I think it's
cleaner to use dictionary-like indexing to access properties. This
patch converts most track access functions, but I haven't gotten around
to strings yet.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I also respond to the PLAYLIST_SORTED notification so we do the right
thing when loading a playlist during startup. I don't put the sort
button on the library, recent list or banned list because I don't think
these lists should ever be sorted.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I reused my old dice png from several releases ago. This implements the
"switch a playlist from set to queue and back again" feature that I
wanted.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Rather than hardcode this as a flag, if I set this through the
preferences code users can change the value.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Flags let me manually set properties after the playlist has been
created, rather than needing to decide upfront with no way of converting
to something else.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I plan on removing the extra playlist classes to simplify code a bit, so
this function needs to be implemented for everything.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I created simpler functions using the push_front() / push_back() names
that stl uses. If we're a set-type playlist, then call the
insert_sorted function instead. I also remove unnecessary bulk-inserts
of a single track. Packing and unpacking a list each time seems stupid.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Basically, don't list duplicates. If a song on the list is added again,
instead I move it to the top of the list.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
- Read a command from the pipe, rather than reading a file with a
command in it.
- Use a single ocarina script for all commands, rather than several two
line scripts.
- Change ocarina.bin to point to ocarina instead of ocarina-player for
convenience.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
The build system hadn't been touched in a while, so it needed some
cleaning up. I moved ocarina-specific files into the ocarina/ directory
and use the ocarina/Sconscript to set up build commands.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
THese are screenshots from 2010 and the early Ocarina 4.x days, so
they're somewhat out of date... I also remove a crude ocarina icon that
I'm surprised is still around.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This was old code that had been replaced by fs.cpp months ago. I must
have forgotten about removing the rest of it...
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
Ocarina no longer has a header file subdirectory so there is no reason
to have a libsaria subdirectory anymore. Putting header files directly
in the include/ directory is a bit simpler.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
The preference may be set to zero by the user but default to a non-zero
value. This can cause frustration on both the user and developer ends.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I was trying to add an empty list, rather than track items. This caused
the library count to increase (on the library path tab), but the library
playlist was never given track pointers so you had to restart ocarina to
see songs.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I eventually want to use a unix socket so I can get bidirectional
access. For now, I'll just reuse the old code.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
I have notifications to handle everything the renderer used to do, and
I've removed it from the UI side.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
current_widgets() works based on the current tab number, and the
"switch-page" signal is triggered BEFORE the current page is updated in
the GtkNotebook structure. This means that I was actually setting the
length based on the previous tab, and not the new one.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
ocarina/playlist/ was the last subdirectory remaining in the ocarina
code, and I can finally remove it. Thank you GtkBuilder! At this
point, there is only one ocarina header file, so I move it to the main
ocarina directory.
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>