Commit Graph

1247 Commits

Author SHA1 Message Date
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 6e47ec49df libsaria: Added a stop function
I stop playback, and seek to the beginning.  I do this as to different
function calls in the Libsaria class so callbacks will still trigger
(once they have been implemented).
2011-08-22 08:27:34 -04:00
Bryan Schumaker edc46f9ced ocarina: Smaller window
I only have two buttons.  I don't need to take up an 800 x 600 window
yet.
2011-08-21 19:28:54 -04:00
Bryan Schumaker 3e2f374bf8 libsaria: created Audio() class
This class will be used to control gstreamer functions.  So far, it can
load a song, play, and pause.
2011-08-21 19:24:33 -04:00
Bryan Schumaker c716f62aaa ocarina: Use new play and pause functions
Eventually the global functions are going away, so I convert to using
the functions as part of the Libsaria instance.
2011-08-21 18:11:17 -04:00
Bryan Schumaker ec2c848a90 Libsaria class can play and pause music
Eventually the class will contain an audio instance, so there won't be a
global play or pause function anymore.
2011-08-21 18:10:18 -04:00
Bryan Schumaker 0173f97fba Call libsaria_quit()
This should free up any memory currently in use.
2011-08-21 15:46:00 -04:00
Bryan Schumaker dd5ad9e87d Began Libsaria() class
This class will act as an interface for the Ocarina front-end.
2011-08-21 15:45:15 -04:00
Bryan Schumaker b939fa12a4 Print function only prints if debugging is enabled
I want to keep actual output to a minimum when running a release
version.
2011-08-21 15:27:59 -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 9c0a00dd48 Created version.h
This is an auto-generated file that provides a way to get the current
version.
2011-08-21 15:14:49 -04:00
Bryan Schumaker ae5b3a358e Play and pause buttons work
They play and pause music...
2011-08-20 12:12:53 -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 4b7762c589 Update Makefile
Now it should compile linking against gtk and gstreamer
2011-08-18 08:26:51 -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
Bryan Schumaker 53d8718053 Open a window and play a song
I start ocarina with a file.  I play the song right away, and open a
window so that gtk_main() can quit when closed.
2011-08-15 07:53:25 -04:00
Bryan Schumaker c0ace6fed6 Basic initializiation code
I print some messages to the screen and I have a makefile to compile
libsaria and gui code.
2011-08-14 11:35:37 -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 1a45e95f9a Ocarina 4.9 2011-06-24 23:45:04 -04:00
Bryan Schumaker 4b852eff28 libsaria: Fix dattr access
dattrs need a song id to search the dictionary.  I was passing the name
of the requested attribute instead.  As a result, dattrs were always
returning the default value.
2011-06-24 23:21:44 -04:00
Bryan Schumaker 9be5b10112 libsaria: Clear cur_id when loading file
This allows me to return the correct attributes for a random song loaded
by the user.
2011-06-23 10:21:24 -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 f87f5f25cf libsaria: Run server based on stored stetting
I have a toggle_state() function to toggle the server and save the state
for the next session.
2011-06-18 14:09:27 -04:00
Bryan Schumaker 868359a4a4 libsaria: Catch errors when writing cache files
The user doesn't want to see these...
2011-06-18 13:27:21 -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 e6ba5c3139 libsaria: Remove path from library
I need to delete it, save the library, and rebulid the tree and index.
2011-06-18 11:22:24 -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 083cbf738c libsaria: Added function for listing the library
This makes it easier for the gui to know what is in the library.
2011-06-18 11:09:44 -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 e055976e07 libsaria: Start server in a try / except block
I can catch the exception and print out a nicer message this way.
2011-06-18 10:24:45 -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 72f7ec90eb libsaria: Remove unused function
I don't need the file_empty() function in the cache anymore
2011-06-18 09:44:34 -04:00
Bryan Schumaker 7319767ac3 libsaria: Don't automatically create cache file
The cache filler function will pass back a string to be written to this
file.  If this string != None, then I create the file and fill it.
2011-06-18 09:39:55 -04:00
Bryan Schumaker e6849dc5cd libsaria: Only delete empty cache files
For some reason I was trying to delete files that don't even exist in
the cache!  This was stupid and caused an error.  Now I only delete
empty files
2011-06-18 09:28:53 -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