Commit Graph

2248 Commits

Author SHA1 Message Date
Anna Schumaker 3654644b1c gui: Update the row_activated signal
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 99e849a106 gui: Set the runtime label for each tab
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 4ce08ef22e gui: Begin yet another tab framework
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>
2014-04-06 19:57:03 -04:00
Anna Schumaker e3612b6e38 gui: Create a register_tab_type() function
Rather than returning tab types from init functions.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker f68f03c057 gui: Create generic filtering functions
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>
2014-04-06 19:57:03 -04:00
Anna Schumaker 5d365afae1 gui: Reenable filtering in the history tab
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 1ac05c6b52 gui: Rip out some code from tabs.cpp
Most of this was related to the playlist tab.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 1d4ba1474d gui: Begin the new playlist tab
The list of playlists is now created in glade, too =)

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 4104a4cede gui: Begin the redesigned history tab
This code will be in its own self-contained file: history.cpp

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 97511f82a9 gui: Begin a tab redesign
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>
2014-04-06 19:57:03 -04:00
Anna Schumaker 1434618381 gui: More widget and spacing cleanups
Signed-off-by: Anna Schumaker <Schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker be60f9bff3 gui: Split out collection manager tab
This makes the code a little bit cleaner, since this tab is self
contained.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 480cf92519 gui: Improve functions for accessing widgets
I made a couple of templated functions to get widgets and objects out of
the Gtk::Builder easier.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 3eb5bd3adb gui: Disable focus on pause togglebutton
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 38c0009acd gui: Configure more keyboard shortcuts
- 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>
2014-04-06 19:57:03 -04:00
Anna Schumaker 2957ea01d4 gui: Teach playlists about the f key
This key is used to add songs to the "favorites" playlist.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker b161048f7f gui: Teach playqueues about the delete key
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 7d7c83c222 deck: Check if a playqueue is empty before calling next
I need this in case the user deletes all tracks from a playqueue without
adding anything by the time next() is called.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker d665b7f167 gui: Use RefPtrs for menu items during init
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>
2014-04-06 19:57:02 -04:00
Anna Schumaker 5761740f6b gui: Add a right click menu
At the moment it only adds tracks to a playqueue.  I will add in
removing tracks soon!

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 240ae7e21a audio: Remove duplicates from the recent playqueue
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 5f582e639b playqueue: Add a path_selected function
This is called by the GUI to tell the playqueue that a track has been
selected.  This gives the PQ a chance to (possibly) remove it.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 04ffffb4e8 gui: Fix flags on playlist manager tab
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>
2014-04-06 19:57:02 -04:00
Anna Schumaker 21c80ea1f9 lib: Import ban status from Ocarina 5.x
Now that I have a banned playlist working I can remember the ban status
easier.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker a474712a22 lib: Remove track from library pq if banned
Put it back when unbanned.

Signed-off-by: Anna Schumaker <schumaker.ann@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 48cc1f992a gui: Add a playlist manager tab
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 3894c4ac97 playlist: Create a playqueue to store the current playlist
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 3fb8dfa534 gui: Playqueue spacing improvements
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker d16ce77c0a gui: Change justify for some tabs
I think justify center looks better.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 82243cfdd1 gui: Add tracks to playqueue
I added tab numbers to make it easier to specify what playqueue to add
tracks to.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 0929418fb7 gui: Adjust toolbar spacing
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 2f2b01100e gui: Add playqueue filtering!
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>
2014-04-06 19:57:02 -04:00
Anna Schumaker 72accfd26d library: Add tracks to the filter for searching
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 444e48f93b gui: Custom model fixes
- Initialize stamp with a random integer (this is how a Gtk::ListStore
  works)
- Increment the stamp in a way that it will never be 0 (AKA: invalid)
- iter_n_root_children() does not take any arguments, so fix up my
  function.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker b2b1620116 gui: Change tab close name
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 0e4c05350a gui: Implement tab reordering
And prevent tabs from being moved into the perma-tab area.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker cefd8b865b gui: Disable focus on click for buttons
Because I think this looks a bit nicer.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 946b1a1bc9 gui: Add better sorting display
I show the column that is currently being sorted by.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker b571018a53 gui: Spacing improvements
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 5df8c94ae5 gui: Add a close tab button
Only visible for playqueue tabs

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 07a7f3d4a7 gui: Clean up tabs
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>
2014-04-06 19:57:02 -04:00
Anna Schumaker 4f0b7070f9 tabs: Turn OcarinaTab into a pointer
And have in inherit from Gtk::HBox

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker a74cd5e6d1 tests: Update tests for recent deck change
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 6bd02bd46b gui: Press "s" to create a new playqueue
This playqueue will have random enabled.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 7dc57572aa deck: Pass a random-enabled flag when creating playqueues
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 37a776ef24 playqueue test fixes
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker 86e35d4fae gui: Add a repeat button in temporary tabs
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker 7ce3c4268f gui: Create new playqueue tabs
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker 32841901db deck: Add callbacks for new playqueue creation
Used by the gui to set the playqueue on the correct page.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker 1e4faeaff0 gui: Add basic keyboard shortcuts
n: play the next song
N: play the previous song
spacebar: play or pause

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00