This greatly improves usability while searching, since we no longer have
to refilter the song list for every key press.
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
This function converts unsigned ints into strings. This allows me to
replace several almost identical functions with one function call.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This variable should only be set by the Database when a DatabaseItem is
first created. This means I should hide _index from the rest of the
world to prevent accidental modifications. I also add an accessor
function for other code that needs to read _index.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This will provide an interface for accessing widgets, and make it easier
to swap out different builder files.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I plan to introduce a new lib/ that sits between the gui and the backend
files (similar to how glibc sits between the kernel and userspace).
This gets the rename out of the way before I change my mind again.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
Changes to the deck removed the on_pq_created() callback that we looked
for to create new tabs. This patch creates tabs correctly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This patch actually breaks a bunch of things, but I just want to be done
with the deck changes for now. I'll go back and fix things before
releasing!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I updated the code to better match how I use playlists and to make sure
that everything is tested.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
I now have a single function rather than 4 individual functions. The
code is cleaner, and I've added it to the unit test.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
It should take a Track pointer, rather than a track_id. This makes the
code easier to work with.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This time I don't keep a global "sorting count". Instead, this count
belongs to individual tabs so flipping between them quickly could
display different sorting fields.
Signed-off-by: Anna Schumaker <schuamker.anna@gmail.com>
This helps to clean out tab.cpp so I can keep track of what still needs
to be done. I also adjusted some of the spacing and section divisions.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I've been putting this off for a while since it seemed like a lot of
work. Time to get it done!
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
This one is based on inheritance, and I think it will be the best way to
create several tab types that do things just slightly differently.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I need to create a FilterDesc struct with needed widgets and then
filtering can happen generically on all tabs!
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I'm creating as many "static tabs" as I can using GtkBuilder, and
splitting their code out of tabs.cpp. This should help to contain the
growth of this file and make all the code easier to work with.
This patch begins the redesign and adds beginning code for a new
collection tab.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
- Number keys to switch pages
- c, h, p, m to switch to collection, history, playlist and collection
manager tabs.
- Slash key to focus on the search entry
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I'm honestly not sure why this is needed, but using ref pointers
prevents several lines of warning messages.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I wasn't initializing the variable, so it was sometimes drawing buttons
next to the filter entry bar.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I love tis feature, and I've been missing it the last few days of
Ocarina 6.0 preview testing.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Create various helper functions to call during construction
Create multiple tab label classes to use for each type of tab.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I set up a 3-second timeout to decrement the count. When the count is
at 0, I reset sorting on the playlist.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Start on the collection page. I eventually want to display the first
enable playqueue, though.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Now we are passed the page on the switch_page() signal. This saves time
iterating and comparing.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I display the runtime of the currently visible playqueue in the bottom
right of the screen. When the collection manager is visible, I hide
this label.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
Now it says "Collection" to match "Collection Manager" it was either
this or have a "Library" tab and a "Library Manager"
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
I implemented an entire Gtk::TreeModel in this commit, plus some minor
supporting code in the library to look up playlist entries by index.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>