Commit Graph

1175 Commits

Author SHA1 Message Date
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
Bryan Schumaker
c8daf92af4 libsaria: Save to XDG_CONFIG_HOME
I plan on storing all my preferences there rather than creating my own
save directory.  This will keep things consistent with other
applications the user may have.
2011-10-02 10:52:23 -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
cea236a757 libsaria: Introduce libsaria namespace
Now I don't need to define everything as libsaria_some_func(), instead
these functions will exist in the libsaria namespace.
2011-10-01 13:27:31 -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
1a7b8a5ae9 libsaria: Load a saved library
No point in saving a library if I can't make use of the save file later.
2011-09-30 08:12:26 -04:00
Bryan Schumaker
1d1ecc8d8c libsaria: Save the library scan results
I write each track to a file that will be read in on startup (once those
changes are committed)
2011-09-27 08:23:49 -04:00
Bryan Schumaker
517faceb99 libsaria: Add tasks to the front and back of the queue
Queueing a task to run immediately can be useful, especially if it's
something like saving data as part of a "checkpoint"
2011-09-27 08:22:24 -04:00
Bryan Schumaker
a97da1dd05 libsaria: Create the saria dir on startup
This is either ~/.saria or ~/.saria-debug, depending on if we're running
a debug build or not.
2011-09-22 08:21:57 -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
2017e8a2f1 libsaria: Play tracks based on inode number
This allows the UI to pass in an inode returned by the track list used
to set up the display.
2011-09-20 08:34:02 -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