Commit Graph

1188 Commits

Author SHA1 Message Date
Bryan Schumaker 0eff7df5c4 ocarina: Add a progress bar 2011-10-29 17:24:21 -04:00
Bryan Schumaker 8987dddade libsaria: Added a get_progress() function to the audio namespace
This function is used to access how far into the song the current audio
position is.  The value is returned as a percentage of the total length
for easy use by the UI.
2011-10-29 17:23:25 -04:00
Bryan Schumaker 0da84e8151 libsaria: Find tags for songs not in the library
I always want to find tags if it's possible.  Since I already have a way
to find the tags, it's fairly simple to tag a random file and pass the
result back to the UI.
2011-10-29 16:26:26 -04:00
Bryan Schumaker 049f91e514 libsaria: Return default track values in error case
If we can't find the inode, I return some default values to the UI to
keep it happy (and clear out the information from the previous song).
2011-10-29 16:18:15 -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 136f12bc7c libsaria: Created a SourceModel class
The source model class is used to more tightly control how songs are
inserted into the UI.  I provide an insert() function that the library's
for_each() function can take advantage of.  This allows me to directly
insert songs into the UI rather than having to use a static function as
the "middle man"
2011-10-29 15:19:45 -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 39f74eb6b4 libsaria: Various cleanups
- Pass inodes by reference
- Change some namespace code formatting to match later code
2011-10-28 17:02:46 -04:00
Bryan Schumaker a975fcc2cc libsaria: Added a current_track() function
This function will generate a Track object based on the current file
stored by the audio.  I then pass this object to to provided function so
the UI can be updated.
2011-10-28 15:33:17 -04:00
Bryan Schumaker 9997e6ffa6 libsaria: Added TRACK_LOADED callback
This is triggered whenever a new track is loaded.
2011-10-28 14:37: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 c06106bff8 Remove config system
It was an interesting idea, but it really wasn't being used for
anything.  I'll stop trying to copy Kbuild now...
2011-10-28 14:17:59 -04:00
Bryan Schumaker 868898ec07 Begin Ocarina 5.3 2011-10-28 14:08:44 -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 707e7b3427 libsaria: Create an idle namespace
This cleans up the idle task code a lot, and reduces the size of
ocarina.bin to less than 1MB (with full debugging).  It probably won't
stay there long...
2011-10-27 15:18:03 -04:00
Bryan Schumaker c8dc6e1ee8 libsaria: Queue idle tasks from the task class
This is cleaner than calling an outside function since the task can
easily queue itself up.
2011-10-27 14:43:18 -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 90ac1ecfed libsaria: Massive audio cleanup
I removed libsaria/audio.cpp and did some namespace shuffling.  The new
code should be easier to follow and work with.
2011-10-27 14:31:30 -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 4f26d9ee2d libsaria: Update single paths
Updating a single LibraryPath may sometimes be faster than updating the
entire library.
2011-10-20 20:31:09 -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 245157c6b4 libsaria: Remove paths from library
If the user no longer wishes to track a certain path, they can remove it
from the library.  Note: it is unsafe to remove a path from the library
while that path is being scanned.  This could potentially lead to a
segmentation fault.
2011-10-20 20:18:35 -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 c4cdfbe4b3 libsaria: Added library::update()
This will rescan every library path and add new files to the library.
Eventually it should probably remove files that no longer exist...
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 2a6d05ebee libsaria: Fill out a struct PathInfo
This struct is used by the gui to show how large a library path is
and eventually to remove it from the library.
2011-10-20 13:24:08 -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 8cf3caeb27 libsaria: Added function for getting the library size
I like to show this on the library tab so I know how many songs are
currently in the library.
2011-10-19 09:58:30 -04:00
Bryan Schumaker a508b7ff72 libsaria: Rip out old library
The code was a bit messy and didn't make use of namespaces very well.
By converting to a set of functions (instead of a class) I can use
each function as a function pointer if I want to.  I am also able to
remove libsaria/library.cpp since this was just a set of wrapper
functions to the old static class functions.
2011-10-18 10:02:55 -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 ef7d9d0fe2 Bump minor version number
I'm no longer working on 5.1, so might as well change this
2011-10-02 10:53:52 -04:00