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
Bryan Schumaker
40751a9eed
ocarina: Remove old body code
2011-05-01 12:24:57 -04:00
Bryan Schumaker
3b8411f175
ocarina: Remove old listview code
2011-05-01 12:24:48 -04:00
Bryan Schumaker
b2e7054458
ocarina: Remove old window init code
...
Everything is covered now
2011-05-01 12:24:37 -04:00
Bryan Schumaker
0aa618ee5a
ocarina: remove old shortcut code
...
The new code is more generic and easier to maintain / add new shortcuts
2011-05-01 12:24:27 -04:00
Bryan Schumaker
a4d27d0b0f
ocarina: Catch exception on empty album art file
...
I don't want to set the image to an empty file. Improving the cache so
that it doesn't store empty files is the best solution, so for now I
just check the error (and keep the function from uninviting itself from
the POSTGETART event)
2011-05-01 12:24:17 -04:00
Bryan Schumaker
29a47e84ad
Ocarina: g key goes to currently playing song
2011-05-01 12:24:04 -04:00
Bryan Schumaker
2b0c7792d0
ocarina: f key toggles footer
2011-05-01 12:23:53 -04:00
Bryan Schumaker
dc418df572
ocarina: Window grabs focus on escape
...
Pressing the escape key will cause the window to grab focus
2011-05-01 12:23:43 -04:00
Bryan Schumaker
a639c520f5
ocarina: Added control shortcuts
2011-05-01 12:23:33 -04:00