Commit Graph

32 Commits

Author SHA1 Message Date
Bryan Schumaker e8f633c863 ocarina: Single list attrs
I was recreating this list once for each of playlist, library and queue.
I expect it is easier to manage from a single location.
2011-05-25 23:01:17 -04:00
Bryan Schumaker 43f37c93a7 ocarina: Do filtering in the listview
Each source was doing the exact same thing for filtering now that I have
a generic is_visible() function.  There is no need for each source to
implement this.
2011-05-22 09:43:27 -04:00
Bryan Schumaker 4f8f4d3ce3 ocarina: Use new filtering functions
I set this up through callbacks.  It should filter all sources at once,
rather than just the current page.
2011-05-22 09:27:26 -04:00
Bryan Schumaker ad12bf6500 ocarina: Filter the library
I call the new libsaria.sources.filter() function and test ids using
libsaria.sources.is_visible().
2011-05-21 22:06:37 -04:00
Bryan Schumaker c357a35313 ocarina: Reset library and right click menu
I added these based on the old library functions.  It seems to be
working so far!
2011-05-21 15:43:29 -04:00
Bryan Schumaker 2587ae0954 ocarina: Fill new library
I make the list of songs visible, I also update the number of songs.
Finally, I respond to the library_updated() callback when songs are
added / removed from the library.
2011-05-21 08:20:44 -04:00
Bryan Schumaker e3450d31ff ocarina: Add new library page
Right now, it just adds a new page to the window.  I'll add more as I
go.
2011-05-20 21:42:57 -04:00
Bryan Schumaker 531ceb2c17 libsaria: Rename library.py to oldlibrary.py
I want to preserve the old library as I slowly introduce the new one.
This should help.
2011-05-20 21:22:21 -04:00
Bryan Schumaker cf164deb44 ocarina: Remove old code from library and playlist 2011-05-01 12:27:38 -04:00
Bryan Schumaker 21d6f57e89 Ocarina: Remove commented out code from library / playlist / queue
I was keeping this code as a reference, but I already implement
everything it does.  It can be removed now.
2011-05-01 12:12:55 -04:00
Bryan Schumaker 86bac243d2 ocarina: clear current page
This clears whatever is on the current page and saves changes (in the
case of the playlist and library)
2011-05-01 12:12:22 -04:00
Bryan Schumaker 3b50c4071c ocarina: goto current song
I do this when the goto button is pressed and also when the song
changes.
2011-05-01 12:12:13 -04:00
Bryan Schumaker 9a1a0471c5 ocarina: Re-added queue
Once again, using Ocarina-5.0 concepts (such as hiding the tab when the
queue is  empty)
2011-05-01 12:09:47 -04:00
Bryan Schumaker 13a74e47c3 Ocarina: Remove from playlist
I can remove multiple songs from the playlist now.
2011-05-01 12:09:32 -04:00
Bryan Schumaker bcd42cfea4 Ocarina: Add songs to playlist
Using a right click menu from the library
2011-05-01 12:09:09 -04:00
Bryan Schumaker 33b7f1ba0e Ocarina: Re-added playlist tab
The new tab uses my ocarina 5.0 concepts
2011-05-01 12:08:52 -04:00
Bryan Schumaker f902c11f9a ocarina: Filter the library again
This time, I use concepts I played with for Ocarina 5.0
2011-05-01 12:07:56 -04:00
Bryan Schumaker 9c6db9ba9b ocarina: New listview code
I can fill in the listview from the library.
2011-05-01 12:07:23 -04:00
Bryan Schumaker b2db7d3327 Began gui rewrite
Cleaning up the code was proving to be more difficult than I initially
thought.  I have decided to rewrite the gui to make it less intimidating
and more easily modified.
2011-05-01 12:05:31 -04:00
Bryan Schumaker fb4e863b64 Move Source() class to ocarina/sources/__init__.py
This finishes my initial attempt at cleaning up this portion of the gui.
2011-05-01 12:03:12 -04:00
Bryan Schumaker 6d08dedba5 ocarina: Single add_to_queue() function
This function is similar to the add_to_playlist() function I recently
added.  The idea is to have the queue add things to itself, rather than
having the playlist and library implement this function independently.
2011-05-01 11:59:07 -04:00
Bryan Schumaker f8ed280ba1 ocarina: Playlist adds selected to playlist
It was silly to have the library control adding songs to the playlist.
The playlist should provide an easy function that takes the selected
songs and adds them.
2011-05-01 11:58:47 -04:00
Bryan Schumaker d380d0ec45 Use built-in selected_foreach
I also made a wrapper so I can do things with each selected ID.
2010-12-17 08:18:33 -05:00
Bryan Schumaker 1e3c48bbf1 Add songs to the Queue
I can add songs from both the library and the playlist to the queue
2010-12-12 13:54:38 -05:00
Bryan Schumaker 9acd22b402 Library with generic init function
The library is now initialized with the generic init function.
2010-12-09 08:09:37 -05:00
Bryan Schumaker 1089b85e88 Get_attrs current source
The generic get_attrs() function now works correctly.  I had to
introduce a "get_cur_id()" function for each source to get this working.
2010-12-07 08:07:10 -05:00
Bryan Schumaker f063da5b56 Began work on virtual sources
Virtual sources should make it easier to do things with the current song
without having to know anything about it (such as a song id or file
path).
2010-12-05 17:11:41 -05:00
Bryan Schumaker 43fd01e1cd Fill list with or without lock
The gtk.gdk lock is alread held when we add selected songs to the
playlist.  I deadlock if I try to grab it again.
2010-12-04 13:40:04 -05:00
Bryan Schumaker d20693bba7 Select and goto song improvements
When we select a song through the gui, we should call either the
playlist or library play_id() function for appropriate bookkeeping.

Additionally, on startup we seek to sources.cur_lib_id
2010-12-03 08:36:13 -05:00
Bryan Schumaker b12894d5a7 Goto song when filtering
When filtering, we should select the currently playing song if it is
visible.
2010-12-03 08:35:14 -05:00
Bryan Schumaker ed13a467ea Rename ocarina.collection
I have ocarina.collection to ocarina.source to reflect the naming change
in libsaria.
2010-12-03 08:35:13 -05:00
Bryan Schumaker 763b161299 Teased apart old ocarina.collection code
The new code is easier to read, and much less intimidating.  I also
changed the Library() and Playlist() classes into python modules to make
them easier to read.
2010-12-03 08:35:13 -05:00