Commit Graph

144 Commits

Author SHA1 Message Date
Anna Schumaker 959cac0fe1 Database: Update design for database entries
I changed primary_key() into a function since it is only called once,
and there is no point in using more mmemory than I need to.  I also
created a basic unit test for everything that database entries are
supposed to do.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker 2e727ed704 gui: Add a switch to enable / disable queues
I also select the first enabled queue during startup.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 1394aaf37c gui: Show the first tab on startup
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 9b0499b3ce gui: Add to queue menu items
This commit finishes my tab rewrite.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 3c8e967895 gui: Connect a menu item for creating new queues
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker a529d569f6 gui: Implement add to {favorites, banned} menu items
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 2abc498fde gui: Rename wires.cpp
I think gui.cpp is a better name, since this file controls most of the
random gui components.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 968d723ec7 gui: Add a window icon
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 5b34b11dd8 gui: Move ocarina6.glade to share/ocarina/
This directory will be copied directly into /usr/ during an install.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 6f7ce86091 gui: Remove some old code
All that is left in the giant commented out section is right click menu
stuff.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker ff925cf573 gui: Add songs to favorite playlist
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker d83609bc21 gui: Delete key removes tracks from queues
This was the behavior before I started my rewrite.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 463409acdf gui: Playlists respond to the delete key
This key is used to remove tracks from a playlist.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 6c8ef37b2a gui: Ban tracks with the "delete" key
Press the delete key on the collection tab to ban all selected tracks.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker cb59febd1c gui: Reenable sorting
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>
2014-04-06 19:57:04 -04:00
Anna Schumaker 1da8c52b0c gui: Remove old glade file
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 58423c92e5 gui: Use common code for adding tracks to queue
Called both for adding and for creating a new queue

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker f0006873b6 gui: Use number keys to add tracks to a queue
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 196088dcfa gui: Add columns to a queue treeview
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker 871914ea90 Clean up the build system
I'm taking a break from gui code to clean up the build system and update
my unit tests.  This patch updates how code is built, and reworks my
"print" test to test version number instead.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker bfcc94de21 gui: Generic toggle button function
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 73c4de13be gui: Update the repeat button
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 34de6874ff gui: Queue tabs now have a search bar
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 83a2908eb6 gui: Remove some reimplemented code
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>
2014-04-06 19:57:03 -04:00
Anna Schumaker 5acf8239c8 gui: Make sure queue tabs are removed from the notebook
This appears to happen automatically, but appearances can be deceiving.
Remove pages anywa just to be safe.

Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker eb5a65069a gui: update tab reordering
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 587eacfdd4 gui: Reactivate the close queue tab button
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker d465c2e894 gui: Begin creating playqueue tabs
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>
2014-04-06 19:57:03 -04:00
Anna Schumaker 6ecb8f6b7f gui: Reactivate the "slash" keyboard shortcut
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker 697c07e2df gui: Update the track changed callback
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
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 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 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