Commit Graph

756 Commits

Author SHA1 Message Date
Bryan Schumaker
b0c76f4b11 Notify when library paths have been updated
This gives the UI a chance to set the new path or new size.  I also
updated Ocarina to show the library path size in its liststore row.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:16 -04:00
Bryan Schumaker
a944869093 libsaria: Clean out the Track class for re-implementation
This also removed the other `typedef sid_t` left in the header file.
I'll re-add in functions and variables as I need them, and hopefully
keep things working more efficiently.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:16 -04:00
Bryan Schumaker
d77b06f267 libsaria: Remove sid_t type
I was using the sid_t to lookups for tracks and library paths.  I think
I can simplify things by storing pointers in the UI rather than using
id numbers.  This will give me direct access to whatever it is I want to
manipulate.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:16 -04:00
Bryan Schumaker
f5462da461 Find files to add to the library
I created a new "list_dir()" function to recursively list directory
contents.  I plan on using this to find songs to add to the library, but
it could also be modified to read playlists and library paths in the
appdir.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:16 -04:00
Bryan Schumaker
2c830af7fa Create a progress bar for idle tasks
Whenever a task is queued, I increment a counter.  When it is run, I
increment a different counter.  This allows me to track the idle queue
completion percentage.  I also created a progress bar for Ocarina to
display in the toes of the footer.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
03d35fee77 libsaria: Only use the library::Driver for notifications
This allows other tools to be written to modify the library of a
currently running program without having to create a library driver
instance.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
a029a30d3a ocarina: Track more library information
I may need to look up library paths by ID, so I added library id as a
liststore field.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
e1b410845d ocarina: Set child propertys for GtkNotebook
The set_tab_packing() function is deprecated, so I might as well just
use the real way to do this...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
032caad800 ocarina: Poll for idle queue tasks
I'm going to need a polling loop for the progress bar.  I might as well
only create one poll() function that is used to do everything...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
0a8600fd01 ocarina: Added placehold for controls
So I know what will eventually go there.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
a0b9c16178 ocarina: Use treeview to show library paths
My old settings page was basically doing this already, but in a slightly
more complicated way...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
ca161d3340 ocarina: Decrese the tab border
This makes tab labels smaller!

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
ecd9a28add ocarina: Return FALSE from the configure event
This tells gtk to continue processing the signal and actually redraw the
window...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
4448ba7ce1 libsaria: Turn the library::Renderer into a library::Driver
This will provide a 2-way notification system, rather than just going
from libsaria to the UI.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
ae9074103a libsaria: Create new LibraryPaths
The UI calls the library::add_path() function to create a new
LibraryPath structure to be managed by the library.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
7c8ef5508e libsaria: Comment out most of the library
I want to gradually re-add everything and clean it up as I go along.  To
help with this, I comment out the old code so I can use it as a
reference while writing new code.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
e2cac7fda0 ocarina: Remove text from library buttons
Instead, I show the same information using tooltips.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
06e613d901 ocarina: Don't assume scrolled windows for footer pages
This made the footer too big, in my opinion.  I have some other ideas
for how to fix it, though.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
81da1743a5 ocarina: Add footer pages to scrolled windows
This will allow them to scroll if they get too big.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
8f43bf62e4 ocarina: Created footer tabs
I'm going to use a ribbon-ish interface for the footer and work the
settings pages in with the now playing widgets to make things easier to
find.  Right now, I created everything with placeholders.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
3d11ea47ba ocarina: Create default content for the window
I'm not using a notebook as the main widget anymore.  I'm also setting
the content directly, rather than getting the widget from the body code
and setting it in the window code.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
c0df8f2e2b libsaria: Take idle callback func during libsaria init
This allows me to enable the idle queue if the function pointer is not
NULL.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
ca35bfd46f ocarina: Track the window's maximized state
I need to do some hacky things if the maximization changes.  First, I
need to track the old (w, h) values and restore them in the preferences
since the configure-event will resize the window before the maximize
signal is given.  Next, I need to ignore the next configure event since
it'll overwrite the preferences with the size of the window when it was
maximized.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
5c618de4df ocarina: Capture window resizing
I store the new size of the window in the preferences and use it the
next time ocarina starts up.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:15 -04:00
Bryan Schumaker
a0da654fc6 ocarina: Resize window to match preference
I initialize the window size preferences to (800, 600) and then resize
the window to match.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:14 -04:00
Bryan Schumaker
3c19e4a3d9 ocarina: set window title and icon
I do this from the window init function using default values, rather
than pass it as a parameter to the init function.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:14 -04:00
Bryan Schumaker
5817effdde ocarina: Fix up include files and begin new window code
I combined the ocarina.h and gtk.h header files into one single file.  I
also began writing new window managing code under a window namespace for
code separation.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:14 -04:00
Bryan Schumaker
02740d1feb libsaria: Remove initflags and comment out init() functions
Instead, I pass a string with the name of the application being run.
This will be used to have separate applications using libsaria.

This commit also comments out most of the libsaria and ocarina init
functions until I can revise and clean up everything.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:14 -04:00
Bryan Schumaker
9aeae532d3 Ocarina: Set path prefix better
The string class already has functions for what I need, so I might as
well use them...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:14 -04:00
Bryan Schumaker
d764489e89 libsaria: Create init flags
I eventually plan on creating more cpp binaries that link with libsaria
for pipe actions and other things.  It's helpful to only initialize the
parts of libsaria that I intend to use.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-04-07 10:01:14 -04:00
Bryan Schumaker
37bcb47de2 libsaria: Check the top of the stack through a function
The UI shortcuts may remove songs from the queue with no way of
notifying the stack layer.  The UI should call the stack_top_pop()
function to check if the top playlist is empty and ready for removal.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-03-05 08:23:00 -05:00
Bryan Schumaker
ed3254813c libsaria: Playlist tells renderer where to insert tracks
Now renderers don't need to track this on their own, and renderers will
update as tracks are added.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-03-05 07:47:55 -05:00
Bryan Schumaker
981b64a635 libsaira: Pass a flag if renderers should be deleted
Not all renderers are created dynamically, so I made a way of telling
the playlist system if renderers should be deleted.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-03-04 10:13:44 -05:00
Bryan Schumaker
83897633ce Dynamically allocate queue playlists
I only allow one queue instance right now, but this allows me to remove
the queue directory since it is no longer needed.  I also removed the
QUEUE_REFRESH callback since all this is handled through the libsaria
playlist code.  All that's left is reloading saved playlists on startup.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-03-03 14:19:33 -05:00
Bryan Schumaker
d7725d9068 ocarina: Allocate SongLists when they are needed
Right now it's just for a single queue, but I should be able to expand
this once I enable more stacking in the backend.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-03-02 08:09:35 -05:00
Bryan Schumaker
c23c4a2740 ocarina: Add tabs from Songlist init()
If Songlists manage this, then I can have them remove their pages
through on_playlist_empty().

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-28 08:16:25 -05:00
Bryan Schumaker
d41c64c798 ocarina: Remove the Page class
This patch does two things.  First, I remove the Page class and let each
notebook page manage itself.  Second, I created functions to add the
header and footer to a GtkWidget and then prepend the page in the
notebook (so it adds pages as if it was a stack).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-27 11:31:33 -05:00
Bryan Schumaker
e03dfb33b8 libsaria: Remove indices from the queue
This replaces the "remove id" ability and replaces it with a "remove
index" ability.  Removing an index will remove the correct song in the
case that the same song has been added multiple times.  I also modified
the UI to remove rows at a specific index.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-25 13:50:56 -05:00
Bryan Schumaker
6637a82573 ocarina: Remove the SongListFuncs struct
I can get everything I need using playlists and renderers, so I can
safely remove this bit of code (I never really liked it anyway...).  I
have to keep around the queue::size() function for a little bit longer,
since choosing the next song still uses it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-25 10:52:35 -05:00
Bryan Schumaker
f7d7589882 libsaria: Remove library and queue iterator functions
I don't need these now that I have playlist renderers, so I might as
well rip out the code while I'm thinking about it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-25 10:11:26 -05:00
Bryan Schumaker
4ebfd8a33b libsaria: Use a tighter loop to fill in the playlist
Rather than exposing iterator functions, I now have a function to walk
the playlist and call the renderer insert() function for each track.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-25 10:04:19 -05:00
Bryan Schumaker
f795af5d6c libsaria: Created a playlist renderer
This class will be given a Playlist and will be in charge of calling
Playlist functions.  I eventually plan on expanding this to allow the
playlist to call renderer functions instead of using my current callback
system.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-25 09:45:27 -05:00
Bryan Schumaker
1933689d4f Added copyright lines to everything
I probably should have done this earlier... oh well

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-19 17:17:24 -05:00
Bryan Schumaker
46ae66634e Ocarina: Check for a current alsa device before setting
Otherwise we set a C++ string to NULL and it throws an exception...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-09 08:04:01 -05:00
Bryan Schumaker
9ead002ab8 ocarina: Add stop as a pipe action
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-09 08:03:54 -05:00
Bryan Schumaker
234626ea81 ocarina: Escape tooltip text
GTK was printing a warning whenever a non-escaped string was hovered
over.  The tooltip was also empty.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:24:07 -05:00
Bryan Schumaker
cefbf36415 ocarina: Free strings created by g_markup_escape_text()
This function returns a newly allocated string, so I can't set it
directly to a C++ string since this will leak memory.  Instead, I need
to keep the char* pointer around to free it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:19:48 -05:00
Bryan Schumaker
280baa7572 libsaria: Allow different UIs to use a different pipe
The UI now passes in a string to use as the filename.  In addition, I
store the filename and remove it when the application is closed.  If the
pipe already exists, then I return the path without creating a new one.

Pipes will only be removed by the application that creates them.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
0aa8b950a9 ocarina: Scroll to saved song
I save the song before refreshing the library so I can scroll back to
it.  This way the user isn't interrupted too much...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
362a0697c9 ocarina: Scroll to a songid instead of a Track
I want to store the currently selected row and go back there after a
refresh or a filter.  This allows me to find the current songid and
scroll back to it later.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
bc0be6d831 ocarina: Set column visibility through function
I eventually want to be able to choose what columns are shown, so I need
them added to the treeview but now shown.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
a3c8128bbe ocarina: Add a tooltip column to the liststore
The tooltip is the filepath of the selected track.  This should help me
figure out what some non-tagged tracks are...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
f72447decc ocarina: New column registering framework
I keep one array instead of two, and I store more information for each
array entry.  I can then find the size of the array for the number of
columns, and I can add new columns without having to modify the allay,
treestore and liststore.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
6fd4d01e37 ocarina: Each page gets its own custom header
I eventually only want the library page to have this header, but setting
this up allows me to remove the "switched page" logic that may (or may
not) have been causing problems.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
551ae682b5 ocarina: Provide a UI for using ALSA
You can either turn it on or off, and then you can select an output
device from a dropdown list.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
56f0e801f5 ocarina: Give each page its own footer
After listening to a long queue, I noticed that there were problems
re-realizing widgets after moving the footer to a different page (the
header might have the same problem?).  I decided to fix this issue by
creating a new footer instance for each notebook page.

If I do the same thing for the page header then I can get rid of the
"move this widget from page X to page Y" logic AND allow pages to use
their own custom header AND allow for separate library and queue
filters.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
41467524db ocarina: Listen for text written to a named pipe
If the text is "play", "pause", or "next" then I call the appropriate
libsaria function.  I eventually plan on adding more commands so bash
can act as a generic remote control, but for now this is a good start!

To use:  `echo play > ~/.config/saria[-debug]/saria.pipe` after creating
the fifo (see scripts/makepipe).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
4c36e0b7e2 ocarina: Don't set progress bar to a value greater than pipeline
duration

This can happen because of gapless playback in the gstreamer pipeline.
It fails a gstreamer assertion, so I need to look out for it.
2012-02-08 08:11:13 -05:00
Bryan Schumaker
1f02fa3d9c ocarina: Force callbacks onto the main thread
Gstreamer uses multiple threads, and doing gtk calls outside the main
thread can lead to X11 errors.  I get around this by creating a new
signal to respond to by the main loop.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
4b9fde453b Ocarina: Clean up the settings page
The new code is a bit simpler, and it correctly fills in the list of
library paths during startup (I still have no idea why this didn't
happen with the old code).

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
a0b7718ee7 ocarina: Don't lock gdk when doing an idle_add call
idle_add needs the gdk lock, so it can't already be held when entering.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:13 -05:00
Bryan Schumaker
6b6b2814c3 ocarina: Created thread-safe ocarina callbacks
I use the gdk threading functions to change my gtk code.  This should
create fewer UI inconsistencies whenever anything changes, and it should
also allow me to trigger TRACK_LOADED from a new gstreamer thread.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-02-08 08:11:12 -05:00
Bryan Schumaker
d4ac6a870f ocarina: Remove from queue keybinding
Select some tracks and press delete.
2011-12-30 23:32:07 -05:00
Bryan Schumaker
58800be19a ocarina: Create a remove from queue menu item
Now I can remove things from the queue if I change my mind!
2011-12-30 23:27:45 -05:00
Bryan Schumaker
30c45f608f ocarina: Modifications for the new current_track() function
Without this patch ocarina/ won't compile...
2011-12-30 19:48:04 -05:00
Bryan Schumaker
94a17a32a4 ocarina: Play file after loading
Somewhere along the line I lost the call to play() when a non-library
track is loaded from the harddrive.
2011-12-30 19:45:27 -05:00
Bryan Schumaker
8b78203fc7 ocarina: Fix compile error
I forgot to remove the for_each() function from the library code.
2011-12-29 20:21:03 -05:00
Bryan Schumaker
02f8dbc6b8 ocarina: Fill queue using iterator functions
I don't need the old for_each method anymore, either.  I remove it using
this patch.
2011-12-29 16:24:54 -05:00
Bryan Schumaker
17e4f3f2ca ocarina: Use new playid() function 2011-12-29 15:33:48 -05:00
Bryan Schumaker
5dcfac8be2 ocarina: Use the iterators to fill the library list
I keep the old way around for the queue until I can change that, too.
2011-12-29 12:09:35 -05:00
Bryan Schumaker
5bf0a26584 ocarina: Filter using the new index
This is why I made it...
2011-12-27 22:31:52 -05:00
Bryan Schumaker
6eaa8f944c ocarina: Changes for the TrackTag() class removal 2011-12-26 12:14:35 -05:00
Bryan Schumaker
11e3d77dca ocarina: Remove references to ino_t
sid_t is more obvious that it's a song id.
2011-12-25 23:30:28 -05:00
Bryan Schumaker
f047c72521 Ocarina: sid_t changes
Use the "get_songid()" function rather than "get_inode()"
2011-12-25 23:07:58 -05:00
Bryan Schumaker
5e20a26dbf ocarina: Set duration on every refresh
The progress bar should stay in sync now.  I got annoyed that it never
did when pausing after the current track.
2011-12-23 20:38:00 -05:00
Bryan Schumaker
2458061cf3 ocarina: Use new controls for shortcuts
Fewer things to implement in the UI!
2011-12-23 15:49:10 -05:00
Bryan Schumaker
e2ee610439 ocarina: Move to the new print() function 2011-12-18 15:07:44 -05:00
Bryan Schumaker
983ce59efb ocarina: Added keyboard shortcuts
Now I don't need to click in the GUI to do things.  I never realized how
much I missed these until now.
2011-12-17 09:44:24 -05:00
Bryan Schumaker
b75deae1a2 ocarina: Move pause after menu item
I now put it at the end of the menu since I want to queue songs more
often.
2011-12-17 09:44:20 -05:00
Bryan Schumaker
7f125061f6 ocarina: Don't filter the queue
It was only getting filtered when new songs were added to it and never
unfiltered.  This was somewhat confusing for me, and not very useful
since the only visible songs were the last ones added.  I fixed this by
creating an init option to enable filtering on songlists.
2011-12-17 09:44:16 -05:00
Bryan Schumaker
01b6df4f47 ocarina: Scroll treeview to current song
I do this whenever the current song changes.
2011-12-12 08:35:11 -05:00
Bryan Schumaker
64aff6a849 ocarina: Added a "Pause after current track" menu item
Unlike my old version, this menu item is a check box that shows the user
the current 'pause after' state.  This should be more useful and less
frustrating / confusing now.
2011-12-11 21:05:04 -05:00
Bryan Schumaker
e987eaa3a4 ocarina: Hide queue when empty
This was something that I did in 4.x, and I like the feature.  Who wants
to see an empty notebook page?
2011-12-11 17:56:24 -05:00
Bryan Schumaker
0f3e5d5963 ocarina: Fill in the queue
The library passes in its selected songs and then the queue responds to
the QUEUE_REFRESH callback to fill in the list.
2011-12-11 16:18:47 -05:00
Bryan Schumaker
9a9fc87f92 ocarina: Properly respond to a right click
I had a test function, but it wasn't being called.  I connected the
widget to the activate signal and improved the function to list the rows
that are currently selected.
2011-12-11 15:46:54 -05:00
Bryan Schumaker
74ab92ea6f ocarina: Get list of selected IDs from the songlist 2011-12-11 15:46:50 -05:00
Bryan Schumaker
781dedfe13 ocarina: Added a queue page
Eventually it will show the list of queued songs.  For now I just add an
unused page.
2011-12-11 15:46:47 -05:00
Bryan Schumaker
f7bd0d873f ocarina: Move some buttons to the header
I think these buttons work better in the page header, rather than in the
footer with the controls.
2011-11-13 12:34:57 -05:00
Bryan Schumaker
364b3a7c65 ocarina: Set label text after filtering
Set it to the current number of visible songs.
2011-11-13 12:22:02 -05:00
Bryan Schumaker
5512d46e4e ocarina: Filter the song list
Users enter text and non-matching songs are removed from the songlist
view (they do come back when the text is removed)
2011-11-13 12:05:52 -05:00
Bryan Schumaker
048313c681 ocarina: Added filter entry 2011-11-13 10:49:05 -05:00
Bryan Schumaker
1c5b230434 ocarina: Add a GtkEntry for filtering 2011-11-13 10:33:16 -05:00
Bryan Schumaker
8ae21bfe58 ocarina: Added basic header
It's a label declaring itself to be a header.  This allows me to make
sure that page switching functions work before I get too far.
2011-11-13 10:03:47 -05:00
Bryan Schumaker
86e40cefcb ocarina: Turn on idle tasks during startup
This allows indexing to run right away, rather than waiting for other
idle tasks to be added.
2011-11-12 14:27:28 -05:00
Bryan Schumaker
66f70249ad ocarina: Load images using the full path
relative paths can't be trusted once the program has been installed.  To
get around this, I assume that the install directory has been configured
correctly and then point to images located in the subdirectory next to
the executable.
2011-11-08 08:20:21 -05:00
Bryan Schumaker
3fe03734a1 ocarina: Pack tag labels into a scrolled window
I don't like the main window resizing, so we allow the users to scroll
if the tags take up too much space.
2011-11-07 19:43:09 -05:00
Bryan Schumaker
30246df924 ocarina: Improved label setting function
I created a single function to escape the text and set it in the label.
I don't know why I didn't do this from the beginning!
2011-11-07 19:22:46 -05:00
Bryan Schumaker
5ae5174536 ocarina: Left justify tag labels
I like this look better than the centered look.
2011-11-07 19:06:49 -05:00
Bryan Schumaker
e409c2317f ocarina: Added a random button
Random hasn't been implemented in libsaria yet, but I can still create
the button to test preferences.  The random button should set itself to
the value store in the preferences file.
2011-11-07 08:32:01 -05:00
Bryan Schumaker
0f2d682216 ocarina: Split buttons over two rows
The single row was getting somewhat long, so I split them up.
2011-11-06 20:33:47 -05:00
Bryan Schumaker
913b9f8630 ocarina: Seek to different parts of the song by clicking
Button 1 seeks by 10 seconds either forward or backward, button 2 seeks
to an absolute position.  I initally wanted to switch the behavior of
these two buttons, but for now I'll just have to get used to the GTK
defaults.
2011-11-06 20:26:11 -05:00
Bryan Schumaker
fffb9875ac ocarina: Add a next() button
Users press this button to choose the next song.
2011-11-06 19:18:03 -05:00
Bryan Schumaker
6930c1ccf3 Ocarina: Add a test menu item
The label for the menu reads "test", but it doesn't do anything yet.
2011-11-04 08:25:51 -04:00
Bryan Schumaker
481c2b4832 ocarina: Initialize songlist with a list of menu items
These items will be used to create a right click menu.
2011-11-03 08:32:32 -04:00
Bryan Schumaker
dfa3d06142 ocarina: Respond to right click events
Right now I just print out some text, but eventually I'll be drawing in
a menu.
2011-11-03 08:23:25 -04:00
Bryan Schumaker
1018b0bc5b ocarina: Show the current audio position
This probably isn't a final placement of the widget, but for now drawing
in the widget is a good improvement.
2011-11-02 08:21:01 -04:00
Bryan Schumaker
9236dcbb50 ocarina: Show length of song next to progress bar
This makes it easy to tell the total length of the current song.
2011-11-02 08:11:04 -04:00
Bryan Schumaker
90bc64131d ocarina: Individual functions for setting tag labels
I switched over to using pango <span> tags to set font properties to
make the text larger.  I decided that the title will be bigger than
artist and album, so I can't have one generic function for setting the
label properties.  Instead, I divided it up into one function for each
label.
2011-11-01 23:16:04 -04:00
Bryan Schumaker
0db7c0cf6b ocarina: Move the progress bar
I put it above the current song display and taking up the full width of
the window.  I think a big progress bar is more useful than a small one.
2011-11-01 22:48:35 -04:00
Bryan Schumaker
0eff7df5c4 ocarina: Add a progress bar 2011-10-29 17:24:21 -04:00
Bryan Schumaker
c894815dad ocarina: Add the library list to the ocarina namespace 2011-10-29 15:55:48 -04:00
Bryan Schumaker
0b1684620d ocarina: Add the chooser to the ocarina namespace
This removes some ocarina_*() functions
2011-10-29 15:52:03 -04:00
Bryan Schumaker
7c79aab787 ocarina: Create initial namespace
Namespaces make code easier to follow, and remove the need to mangle the
beginning of function names by using ocarina_*() or libsaria_*().  In
other words: "namespaces are one honking good idea.  Let's have more of
them!"
2011-10-29 15:47:00 -04:00
Bryan Schumaker
6b12cff613 ocarina: Clean up library.cpp a bit
I reordered the functions and removed the unnecessary declaration from
the top of the file.
2011-10-29 15:35:30 -04:00
Bryan Schumaker
c727aaa526 ocarina: Fill a songlist by inheriting from a SourceModel
The SourceModel declares an insert() function that is called when
filling the list.  I have defined this function in a way that the list
will be filled in through repeated calls to insert()
2011-10-29 15:19:56 -04:00
Bryan Schumaker
e5bd2471b0 ocarina: Rearrange the now playing panel
I want controls to be on the same level as the artist / album / title
labels.  This will be more compact, and it won't waste a lot of empty
space above the labels and next to the controls.
2011-10-29 04:46:42 -04:00
Bryan Schumaker
fc4f311971 ocarina: Added a "now playing" panel
This is just an initial implementation, so it's not very good right now.
It does give all the information, though.  That's a plus.  I also set
the artist / album / playlist whenever a SONG_LOADED callback is given.
2011-10-28 17:22:51 -04:00
Bryan Schumaker
9d22d6b278 ocarina: Split footer into multiple files
This should help keep things organized
2011-10-28 17:06:18 -04:00
Bryan Schumaker
66a3ca63e6 ocarina: Add a separator to the footer
I think the separator looks better, and helps to show where the songlist
ends and the footer begins.
2011-10-28 14:27:05 -04:00
Bryan Schumaker
1fee8e50b3 ocarina: Move some songlist functions to a new file
This splits out more functions, and makes the songlist more maintainable
overall.
2011-10-28 13:59:53 -04:00
Bryan Schumaker
6c5412a3d5 ocarina: Move songlist init code into a new file
Doing it all in one function was messy and hard to follow.  I've broken
it into several smaller functions, so now I know what is going on.
2011-10-27 17:17:46 -04:00
Bryan Schumaker
236cf0fee5 ocarina: Move songlist.h
It really should go into the include directory.  I don't want to use
relative paths to include header files in a subdirectory... I don't know
why I even did it in the first place!
2011-10-27 16:39:27 -04:00
Bryan Schumaker
ab9b76a0b4 ocarina: Switch to new idle::run_task() function
Part of my rewrite involved moving the run_task() function to a new
namespace.  Ocarina now uses the new function.
2011-10-27 15:18:05 -04:00
Bryan Schumaker
7dce8ffedc ocarina: Switch to new audio functions
These functions have been moved to a new namespace, so the front end
needs to be updated.
2011-10-27 14:31:35 -04:00
Bryan Schumaker
0425df6d63 ocarina: Rename tiny.cpp
I am no longer going to use the tiny / full footer scheme that I used in
Ocarina 4.x, so this file is better described as footer.cpp
2011-10-27 12:13:22 -04:00
Bryan Schumaker
d3c9301628 ocarina: Access footer through get_footer() and put_footer()
I combined reference counting with the get_footer() function to make
using it easier (no manual reference counting).  put_footer() will
deallocate the widget if the reference count is 0 (this is already done
by the g_object_unref() function) so it should work in a sane way.
2011-10-27 12:08:21 -04:00
Bryan Schumaker
007a2e820d ocarina: Remove unused #include
The footer is no longer used in ocarina.cpp
2011-10-22 08:57:22 -04:00
Bryan Schumaker
155e436259 ocarina: Set window title and icon during init()
I was setting these through other function calls, but it's easier (and
cleaner) to do it all in the initial init() call.
2011-10-22 08:55:32 -04:00
Bryan Schumaker
c3fd002e92 ocarina: Remove unnecessary widgets
I can now add the body tabs directly to the window, rather than packing
them in a box with other things.
2011-10-22 08:53:32 -04:00
Bryan Schumaker
bc6068cbda ocarina: Move controls to the right of the window
They have been on the left for a while, but I like them better on the
right.
2011-10-21 17:55:27 -04:00
Bryan Schumaker
882f917c8f ocarina: Add a reference to the footer before moving
Calling the remove() function will destroy the footer if it has no other
references.  To prevent this, I need to call g_object_ref() add a
reference to the widget.
2011-10-21 14:51:22 -04:00
Bryan Schumaker
6467356cf6 ocarina: Cleanup path info buttons
I was using variables that I really didn't need to use...
2011-10-20 20:33:21 -04:00
Bryan Schumaker
3ff17e907c ocarina: Update library path button
One click and the single library path will be updated
2011-10-20 20:31:35 -04:00
Bryan Schumaker
b84a19cd77 ocarina: Created a "remove path" button
Clicking this button removes a path from the library
2011-10-20 20:19:51 -04:00
Bryan Schumaker
2c12cb80aa ocarina: Move tab page content into a table
This should make it easier to add or remove headers and footers so that
I can share one widget between all pages.
2011-10-20 19:33:05 -04:00
Bryan Schumaker
83719838aa ocarina: Refresh path list when library is updated
I respond to the LIBRARY_REFRESH callback by creating new path panels to
show the updated information.
2011-10-20 18:46:54 -04:00
Bryan Schumaker
61153a0580 ocarina: Added update library button
This button will call the new library::update() function
2011-10-20 13:24:11 -04:00
Bryan Schumaker
60dc610195 ocarina: Display library paths
Right now I simply create a list during startup.  I still need to clear
this list and refill it whenever the library is updated.
2011-10-20 13:24:11 -04:00
Bryan Schumaker
e8341288b3 ocarina: Songlist improvements
- Function pointers for specific tasks
- Change label text
- Use libsaria namespaces
2011-10-19 10:00:01 -04:00
Bryan Schumaker
1b18069b77 ocarina: remove unnecessary add_callback() function
It only called the register_callback() function, so there is no point in
keeping it around.
2011-10-02 11:07:36 -04:00
Bryan Schumaker
1996b54065 ocarina: Update to new libsaria namespace
The old functions are no longer defined, so this patch updates to the
new functions.
2011-10-01 13:27:43 -04:00
Bryan Schumaker
165a359655 ocarina: Fill library on startup
Once the library has been loaded we can display it to users.
2011-10-01 12:52:05 -04:00
Bryan Schumaker
250964a351 ocarina: Freeze and thaw during a clear
This should speed up clearing the list, too.
2011-09-21 08:21:45 -04:00
Bryan Schumaker
ce2f9f02f8 ocarina: Freeze and thaw the liststore while filling
This causes fewer refreshes of the liststore and speeds up filling it
in.
2011-09-21 08:12:56 -04:00
Bryan Schumaker
284176fb5c ocarina: Play a song when a row is double-clicked
This is a natural way for the user to play a specific song.
2011-09-20 08:35:24 -04:00
Bryan Schumaker
309cda851f ocarina: Insert songs in the songlist
I created an insert() function that will fill in the list and display
all the songs.
2011-09-19 19:48:37 -04:00
Bryan Schumaker
7bf6f48488 ocarina: Display treeview columns
Columns are displayed with the names of attributes that will be listed.
2011-09-18 19:19:20 -04:00
Bryan Schumaker
1c944d3156 ocarina: Get list of library tracks
This will be used to fill in a gtk listview sometime soon
2011-09-18 18:07:59 -04:00
Bryan Schumaker
884a0331e2 ocarina: Listen for correct callback 2011-09-18 18:07:40 -04:00
Bryan Schumaker
170e700746 ocarina: Listen for LIBRARY_REFRESH callback
I eventually want to add songs to the songlist, but for now it is enough
to wait for this callback.
2011-09-18 17:27:12 -04:00
Bryan Schumaker
3a5a41f53f ocarina: Added bare songlist and a library tab
Eventually the songlist class will list all songs in the library.  For
now, I just create an empty window and add it to the main tabs.
2011-09-18 14:43:46 -04:00
Bryan Schumaker
65c04585a3 ocarina: Print out the correct version
I should print out the value returned by vers_str(), rather than
hardcoding in "5.0"
2011-09-17 13:51:45 -04:00
Bryan Schumaker
0f38005bdb ocarina: Use new print functions
This mostly involved switching each print() to a println()
2011-09-17 13:50:37 -04:00
Bryan Schumaker
dfdb38be27 ocarina: Don't always run the idle task
I register the idle task when there are events in the idle queue and I
remove the idle task once those events have been processed.  This should
cut down on CPU usage when nothing is happening.
2011-09-13 17:35:21 -04:00
Bryan Schumaker
6cd4cbdba8 ocarina: Call the add_library() function
This function will add a new path to the library map and then scan it,
adding music files to the library.
2011-09-12 14:18:30 -04:00
Bryan Schumaker
c0a80623f5 libsaria: Created new idle.h
This exposes the libsaria_idle_task() function to the UI.
2011-09-12 11:31:58 -04:00
Bryan Schumaker
d3b8020bbe libsaria: Remove libsaria class
I replaced the class functions with simple functions that exist in
multiple files.  I think things will be easier to work with now.
2011-09-12 11:08:56 -04:00
Bryan Schumaker
33fe24fc64 Remove callbacks from libsaria class
These can easily exist as its own set of functions, and I want to remove
the libsaria class in the future.
2011-09-10 13:46:09 -04:00
Bryan Schumaker
a660d5a34a ocarina: Register an idle function
This function will call the libsaria_idle_task() function to process the
next idle task.
2011-09-10 11:22:57 -04:00
Bryan Schumaker
36212af3a4 ocarina: Don't do anything if chooser result is blank
If we don't have a filepath to scan or play then we shouldn't do
anything with the path.
2011-09-10 10:49:51 -04:00
Bryan Schumaker
705ca61e6a ocarina: Select a directory to scan
This directory will eventually be scanned and added to the library.
Right now I just print it to the screen.
2011-09-10 10:45:52 -04:00
Bryan Schumaker
13244b880c ocarina: Make a generic chooser function
I want a function that can be used to select either a file or a
directory.
2011-09-10 10:41:47 -04:00
Bryan Schumaker
9df15e944c ocarina: Add a text button for library scanning
A text button will use a slightly larger image to make it easier to see.
This also gives me an opportunity to add some help text to describe what
the button does.
2011-09-10 10:30:25 -04:00
Bryan Schumaker
95ebff8b6e ocarina: Make generic button-building functions
I want to have buttons with text in addition to images.  To help with
this, I created some functions that should help with that.
2011-09-10 10:07:48 -04:00
Bryan Schumaker
62b86f5136 ocarina: Add a settings tab for library management
Right now I just add an empty vbox to the page.  I eventually want to
show information about each library path.
2011-09-10 09:42:34 -04:00
Bryan Schumaker
b8f977cc35 ocarina: Add a switch for tab label expanding
Pass in true to cause the tab label to expand and fill up the entire
space, false if the label should not expand.
2011-09-09 08:27:58 -04:00
Bryan Schumaker
2110319176 ocarina: Resize window
I resized the window to 800 x 600, and then changed the main tabs to
fill up the entire space.
2011-09-09 08:23:43 -04:00
Bryan Schumaker
976637f88b ocarina: Add settings tab
Eventually this tab will be used for configuring everything.  Right now
it's an empty page.
2011-09-09 08:14:07 -04:00
Bryan Schumaker
c3b82c401f ocarina: Created tabs for the main window
Most things are going to be displayed in a gtk notebook.  This patch
creates that notebook.
2011-09-07 08:25:52 -04:00
Bryan Schumaker
7b48c3311d ocarina: Rename gui/ to ocarina/
I think ocarina/ is a better name for this directory, and now that I've
named the executable "ocarina.bin" I can do this again.  I also added
functions for creating a page footer with the basic controls.
2011-09-07 08:12:02 -04:00
Bryan Schumaker
b8e8f7179c Remove Ocarina 4 files
Get them out of the way to begin work on Ocarina 5
2011-08-14 10:46:22 -04:00
Bryan Schumaker
d9f89e0ecd ocarina: Add experimental settings page
Right now it just contains a checkbox for running the server.  It should
probably contain some kind of warning text, and eventually other
settings.
2011-06-18 14:10:05 -04:00
Bryan Schumaker
34c7bc374e ocarina: Refresh library settings list
I call the refresh function whenever the library has been updated.
2011-06-18 11:38:39 -04:00
Bryan Schumaker
c31ec80016 ocarina: Function for refreshing library source list
The settings page may need to be updated once it has been created.  This
patch adds a function for recreating the list of sources.
2011-06-18 11:37:48 -04:00
Bryan Schumaker
989de579e4 ocarina: Hide settings by default
They don't need to be seen all the time.  Hide them until the user asks
to see the page.
2011-06-18 11:37:05 -04:00
Bryan Schumaker
f2c3e2d901 ocarina: Import settings during startup
This gives me a chance to initialize the page and make it available for
callbacks.
2011-06-18 11:36:28 -04:00
Bryan Schumaker
eb7a8e03a4 ocarina: Remove path from the library through settings
Click the button and it's gone!
2011-06-18 11:22:57 -04:00
Bryan Schumaker
bf9ef7666c ocarina: Settings close button has no relief
I like the look of gtk.RELIEF_NONE
2011-06-18 11:12:07 -04:00
Bryan Schumaker
92fd8e508d ocarina: Show library information
I create a panel for each library path showing the full path and the
number of songs.  I also have a dummy button for removing the path from
the library.
2011-06-18 11:10:18 -04:00
Bryan Schumaker
f09f80cd65 ocarina: Added library category to settings
I'll eventually use this for controlling the library.  Right now it's
just an empty page.
2011-06-18 10:47:00 -04:00
Bryan Schumaker
381b72aea4 ocarina: Show and hide settings page
I don't have any settings here yet, but it's coming.  For now, it's
good enough to be able to open and close a tab.
2011-06-18 10:36:19 -04:00
Bryan Schumaker
a8aef66696 ocarina: Add settings button
Right now, clicking the button will print out some text.  I'll
eventually have it open a new tab for configuring Ocarina.
2011-06-18 10:25:15 -04:00
Bryan Schumaker
445b3a79bc ocarina: Don't do gtk locking anymore
I added this to help with setting album art in other threads.  Now that
I'm forcing this to the main thread, I don't think I need it anymore.
2011-06-18 10:11:02 -04:00
Bryan Schumaker
38f1d6ec8c ocarina: Only set album art once
When we receive a new image, we should check if it is the same as the
current image.  If it is, we don't need to change anything!
2011-06-18 10:01:10 -04:00
Bryan Schumaker
6773d9837e ocarina: Set album art in the main thread
I use a gobject signal to force setting album art in the main loop.
In theory, this should cut down on the number of crashes I see when
album art is fetched.
2011-06-18 09:23:50 -04:00
Bryan Schumaker
66d4d4979f ocarina: Set album art from on_load() attrs
It's available here, so I might as well.  Hopefully this will cut down
on the number of crashes I get, too...
2011-06-17 23:44:28 -04:00
Bryan Schumaker
5fcb590f53 ocarina: Pass attributes throughout the gui
This avoids repeated calls to the get_attrs() function at every step.
2011-06-17 20:03:13 -04:00
Bryan Schumaker
645b70b33c libsaria: Introduce libsaria.sources.all_attrs()
This patch introduces a new function "all_attrs()" which will return a
dictionary containing all the attributes for the current song.  To help
the gui, I pass this dictionary during an on_load() callback.
2011-06-17 19:47:04 -04:00
Bryan Schumaker
63574a17c6 ocarina: Need to import export code
Otherwise I can't save playlists, since the functions won't be
available.
2011-05-29 18:23:26 -04:00
Bryan Schumaker
466b0a2c5b ocarina: Better way to scroll to current song
I should use get_attrs() and then use the first result in the list,
rather than using the cur_id variable.  cur_id is not set in the case of
loading a file.
2011-05-28 15:50:57 -04:00
Bryan Schumaker
1bb0480c65 ocarina: Use libsaria.sources.cur_id for scrolling
I was using a get_attrs() call for finding the current song id.  This
information is available directly through libsaria.sources, though.  I
think it will be easier to just use the cur_id variable.
2011-05-28 15:31:59 -04:00
Bryan Schumaker
7c39b9ccd1 ocarina: Fix now playing label order
I initially had length and play count switched.
2011-05-26 09:02:44 -04:00
Bryan Schumaker
2f6313fe95 ocarina: Add track number to gui
It's helpful to see, especially since it shows how everything is sorted.
2011-05-25 23:05:05 -04:00
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
fffc7f8816 ocarina: Fix setting album art
get_attrs() now returns a list, so the on_get_art() callback function
needs to be updated.
2011-05-25 20:58:27 -04:00
Bryan Schumaker
ae2fc30da8 ocarina: Remove export button
I don't plan on changing the library anytime soon, so there is no need
to export it to an xml file.
2011-05-23 10:02:43 -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
ac0f23ab80 ocarina: Remove oldlibrary code
The new library covers everything, so this is no longer needed.
2011-05-21 22:34:39 -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
c3dbd8167d ocarina: Rename library.py -> oldlibrary.py
This reflects my recent libsaria change.  I'm keeping around my old
library code for now.  The new library will gradually be introduced
through several patches ending with the removal of the old library.
2011-05-20 21:29:30 -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
3301439e88 ocarina: Get gtk lock around gtk.main()
The internet suggests that this may help with the random crashes I
sometimes get.  We'll see.
2011-05-15 15:58:37 -04:00
Bryan Schumaker
b373a88618 ocarina: Page showing and hiding improvements
When hiding a page I want to switch to page n - 1, but gtk was moving me
to n + 1.  I also added a function to show, and optionally switch to, a
page.
2011-05-15 11:36:26 -04:00
Bryan Schumaker
25f4410970 ocarina: I don't need to call save after resetting playlist
Saving is done automatically as part of the reset now, so there is no
need to call save() here any more.
2011-05-12 22:36:17 -04:00
Bryan Schumaker
64c6677263 ocarina: Use new list_playlist() function 2011-05-12 08:26:17 -04:00
Bryan Schumaker
412153013b ocarina: Remove reference to thread.py
I removed the file a while ago, so this shouldn't be here.
2011-05-11 22:18:22 -04:00
Bryan Schumaker
7a26110750 ocarina: Set and resize images atomically
Doing this all in one step prevents multiple threads from clashing with
each other.  I also add in clearing the old image before setting a new
one.
2011-05-11 21:46:15 -04:00
Bryan Schumaker
217156d322 ocarina: Gtk locking around album art resize
I only want one thread modifying album art at a time, so I need to use
threads_enter() and threads_leave() here.
2011-05-08 10:33:01 -04:00
Bryan Schumaker
0862c57b6a ocarina: Clean up image resize function
I now wrap the entire resize operation in a try / except block.
Hopefully this will help to catch some errors.  I also cleaned up my
"return early" conditions.
2011-05-08 10:24:10 -04:00
Bryan Schumaker
b43725bbe8 ocarina: Use new list_queue() for filling queue
I might as well use the new function so I can remove the old
walk_queue() function.
2011-05-08 09:57:57 -04:00
Bryan Schumaker
45f293c6fa ocarina: Refresh queue when changed
I want the gui to be consistent with the internal state of the queue.
2011-05-07 18:53:01 -04:00
Bryan Schumaker
c1a2d74f7c libsaria: Move version information to new file
A bit of separation is good here, and it should help with managing the
code.
2011-05-07 15:58:33 -04:00
Bryan Schumaker
41e08fe248 Ocarina: Start through a function call
I was starting Ocarina through "import ocarina" in the launcher.  This
was apparently a bad idea, since the import lock will never be released.
This lock prevents other threads from importing modules, so when I tried
to use urllib2 to download album art the call blocked until after I
closed Ocarina.
2011-05-07 15:54:26 -04:00
Bryan Schumaker
975b153bea libsaria: Remove event.py
I've been looking forward to this.  The last several commits have
replaced the generic event system with a hardcoded callback system.
This should be more efficient, easier to understand, and easier to
follow.  I feel it is a better solution.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
e64f93ef39 libsaria: New library source callback
Triggered upon scanning a new path to add to the library.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
bc54ef0a98 libsaria: Add a load_playlist() callback
Called when playlists are loaded from file.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
a6bd531aee ocarina: Fetch image during load
I also set absolute sizes for album art.  Scaling to size 1 was causing
scale_simple() to block forever.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
d0198cdd1a libsaria: Get artwork when songs are loaded
I may change this to something that has to be requested by the front
end, rather than always fetching it.  We'll see.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
889e17fab9 libsaria: Remove event system from controls
This is a big step forward for reving the event system entirely.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
34dcb7998f libsaria: Add in absolute seeking by percentage
I give a percentage and gstreamer will seek to that position in the
song.
2011-05-01 12:46:17 -04:00
Bryan Schumaker
99771a34fb libsaria: on_like() callback
This replaces the LIKE event for setting if the user likes the current
song.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
69481ffa70 libsaria: Shut down gstreamer on exit
This gives gstreamer a chance to clean up while exiting.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
6e6705736e libsaria: Add a load_file() callback 2011-05-01 12:46:16 -04:00
Bryan Schumaker
6c73a9c43a libsaria: Remove STOP event
I can double up on the pause callback in place of a stop callback.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
7879c53fe7 libsaria: Created pause callback
This replaces the (PRE, POST)PAUSE events
2011-05-01 12:46:16 -04:00
Bryan Schumaker
b562fff0ed libsaria: Began implementing better callback system
The event system was evil, hard to use, and hard to follow.  This patch
is the beginning of a new, more straightforward system.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
8574cda529 libsaria: Ported over Ocarina 5.0 audio functions
The new audio code I developed makes more sense and should be easier to
work with.  It makes sense to port it over.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
6cb857d988 ocarina: Switch over to new preferences methods
I removed the old methods, so I need to use the new methods for ocarina
to start up.  This patch switches everything over.

NOTE: As of this patch, ocarina should work again.
2011-05-01 12:46:16 -04:00
Bryan Schumaker
3bc5c05ab1 libsaria: disable plugins
With my recent changes, my old plugins are incompatible.  I'm going to
come up with a new system in a few releases, so I'm going to wait until
then.
2011-05-01 12:28:19 -04:00
Bryan Schumaker
34f2ffe227 ocarina: enable window drag-n-drop
This calls universal_open() to open whatever file is dropped onto the
window
2011-05-01 12:28:09 -04:00
Bryan Schumaker
2c5d873cd0 ocarina: Remove settings directory
I can add in a settings tab later.  Cleaning up code is a higher
priority
2011-05-01 12:27:58 -04:00
Bryan Schumaker
19f2597936 ocarina: Remove components directory
I've implemented everything that was here.  Time to remove it
2011-05-01 12:27:49 -04:00
Bryan Schumaker
cf164deb44 ocarina: Remove old code from library and playlist 2011-05-01 12:27:38 -04:00
Bryan Schumaker
dc8a69bc0d ocarina: Refresh library after loading
To show changes.  I also use the v1.3 decoder function to decode
exported libraries.
2011-05-01 12:27:30 -04:00
Bryan Schumaker
9684ecce40 ocarina: Refresh playlist when loaded 2011-05-01 12:27:21 -04:00
Bryan Schumaker
3b131f33ef ocarina: Added universal open button
I want to redo the chooser for this, but I'll need to redo the sources
first.  I guess it'll have to wait for 4.5?
2011-05-01 12:27:11 -04:00
Bryan Schumaker
8891cb8c36 ocarina: Added new save button
This saves playlists
2011-05-01 12:27:03 -04:00
Bryan Schumaker
df3c9702be ocarina: Remove old image file
It's been replaced
2011-05-01 12:26:54 -04:00
Bryan Schumaker
71d73ecdd1 ocarina: Manually set album art when image clicked 2011-05-01 12:26:44 -04:00
Bryan Schumaker
091aa3972c ocarina: Added update button
I think it works... I may not have gotten updating the library correct
in v<4.3.  I'll fix it in 4.5 when I rewrite libsaria.
2011-05-01 12:26:34 -04:00
Bryan Schumaker
3f173b9468 ocarina: remove old volume button
not needed anymore...
2011-05-01 12:26:24 -04:00
Bryan Schumaker
5ff0419633 ocarina: Added volume button to header 2011-05-01 12:25:44 -04:00
Bryan Schumaker
6291cb6686 ocarina: clean up like / dislike button functions
these functions are now created as part of the button generating
functions
2011-05-01 12:25:34 -04:00
Bryan Schumaker
1a86edca35 ocarina: clean up button generating code
I use a generic "set attributes" function to set the default attributes,
rather than having this function essentially twice (once for normal
buttons and once for toggle buttons)
2011-05-01 12:25:25 -04:00
Bryan Schumaker
97af3d50e4 ocarina: Call toggle buttons without toggling enabled
I disable the toggle callback, call a function, and then reconnect the
callback.
2011-05-01 12:25:15 -04:00
Bryan Schumaker
55730d3dbf ocarina: Remove old footer code 2011-05-01 12:25:06 -04:00