Commit Graph

48 Commits

Author SHA1 Message Date
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 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 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 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 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 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 9d22d6b278 ocarina: Split footer into multiple files
This should help keep things organized
2011-10-28 17:06:18 -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 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 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 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 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 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 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 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 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 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 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 a097e751b2 ocarina: Remove custom icon size from button constructor
All buttons are the same size, so there is no point in requesting the
size for each button.
2011-09-06 07:57:06 -04:00
Bryan Schumaker 39a8f861c7 ocarina: Added a fast-forward button
Clicking it advances the song by 5 seconds
2011-09-03 23:15:30 -04:00
Bryan Schumaker c2c3a1eea9 ocarina: Added a rewind button
Pressing the rewind button rewinds the song by 5 seconds.
2011-09-03 23:06:13 -04:00
Bryan Schumaker cfc86bd891 Added callback.h
This should have been added a long time ago, but my include/ocarina
directory was being ignored by git...
2011-09-03 09:14:03 -04:00
Bryan Schumaker 6137ec8a83 ocarina: Added volume button
This button will eventually be used to control the libsaria volume.  It
doesn't do anything useful yet.
2011-09-02 08:26:44 -04:00
Bryan Schumaker f6ac48219e ocarina: Move pause button code
I moved it from the generic button.cpp file to the controls.cpp file to
keep everything together.  I also changed the button list to use the new
show / hide functions.
2011-08-31 08:26:40 -04:00
Bryan Schumaker bd907ecfe0 ocarina: Remove show_play_buttons() and hide_play_buttons()
I replaced these functions with a generic show_button_list() and
hide_button_list() functions.
2011-08-31 08:20:45 -04:00
Bryan Schumaker 8234e4072b ocarina: Move play button to new file
I moved all the button code into a new subdirectory.  From there, I
moved the play button code into a file named controls.cpp.  This should
help clean up button code.
2011-08-30 08:26:23 -04:00
Bryan Schumaker ac03eed3f5 ocarina: Show and hide play and pause buttons
I hide the play button when music is playing and show it when music has
been stopped.  I hide the pause button when music is not playing and
show it when music has been stopped.  This can give the effect of one
button replacing the other.
2011-08-27 13:38:01 -04:00
Bryan Schumaker 20756aac14 Created an open button
Clicking the button will open a file chooser to select a file to play.
2011-08-23 08:26:23 -04:00
Bryan Schumaker 7d3769a1a2 ocarina: Clean up button code
I didn't like using macros...
2011-08-23 07:53:25 -04:00
Bryan Schumaker b23d912f64 ocarina: Added a stop button
This calls the Libsaria stop function
2011-08-22 08:29:23 -04:00
Bryan Schumaker bf3d41f8d2 Set window icon
Just to my basic ocarina image for now.
2011-08-21 15:19:56 -04:00
Bryan Schumaker b802b31d42 Set window title
I set the title based on the current version, but I do this through a
function to make it easier to change later.
2011-08-21 15:15:40 -04:00
Bryan Schumaker 8c49544efd Created helper for connecting signals
This should make connecting signals easier, since I don't need to use
any conversion macros.
2011-08-20 11:47:26 -04:00
Bryan Schumaker 1413a31aa7 Create wrapper function for gtk_container_add()
I don't want to have to keep typing out the conversion macros, so this
function puts them all in one place.
2011-08-20 11:36:29 -04:00
Bryan Schumaker d75227b6af Added a wrapper function for gtk_box_pack_start()
This will call the conversion macros for packing items into a box.
2011-08-20 11:32:20 -04:00
Bryan Schumaker 467cedf828 Added a pause button
I just put in next to the play button for now.
2011-08-20 11:17:01 -04:00
Bryan Schumaker 0f5303503c Improve play button creation
I made a function to create a play button.  I suspect that
pre-configured buttons will be easier to use than having to build them
up every time.
2011-08-20 11:08:42 -04:00
Bryan Schumaker 7efcfddcde Add a button to the window
The button doesn't do anything yet, but I may eventually modify it for
playing and pausing music.
2011-08-18 08:20:56 -04:00