Commit Graph

232 Commits

Author SHA1 Message Date
Bryan Schumaker
ef78427954 Clean up window creation
I do as much as I can outside of the init() function to make the code
more readable.  Doing everything in init() can make things more
complicated and annoying.
2011-05-01 12:00:09 -04:00
Bryan Schumaker
6d08dedba5 ocarina: Single add_to_queue() function
This function is similar to the add_to_playlist() function I recently
added.  The idea is to have the queue add things to itself, rather than
having the playlist and library implement this function independently.
2011-05-01 11:59:07 -04:00
Bryan Schumaker
f8ed280ba1 ocarina: Playlist adds selected to playlist
It was silly to have the library control adding songs to the playlist.
The playlist should provide an easy function that takes the selected
songs and adds them.
2011-05-01 11:58:47 -04:00
Bryan Schumaker
377c1a496d ocarina: Set header / footer visibility when adding page
This allows me to store the visible settings in the Page() class, rather
than having to store it with the rest of the content.
2011-05-01 11:54:23 -04:00
Bryan Schumaker
c185524d62 ocarina: Selectively add header and footer to tab pages
If I don't want the header or footer on a tab page, I shouldn't have to
draw it.  This patch gives me a way to do that.
2011-05-01 11:54:06 -04:00
Bryan Schumaker
94f428e615 ocarina: sources.cur_lib_id doesn't exist anymore
I should use sources.get_attrs("id") to find the current id instead.
2011-05-01 11:53:42 -04:00
Bryan Schumaker
c78f806244 plugins: All plugins have a __NAME__ value 2011-05-01 11:43:50 -04:00
Bryan Schumaker
d28ca013f3 ocarina: Added initial plugin configuration page
This page will eventually be used to stop, start, and uninstall plugins.
2011-05-01 11:43:32 -04:00
Bryan Schumaker
8c2e7605ef ocarina: Create settings window every time
Trying to save the window each time wasn't working well.  I found that
clicking the preferences button a second time would display an empty
window, rather than what was saved.  The user probably won't notice the
time it takes to create the window again.
2011-05-01 11:43:14 -04:00
Bryan Schumaker
1e52558279 ocarina: Horizontal like / dislike buttons
This patch changes the like and dislike buttons to be arranged
horizontally, rather than vertically.
2011-05-01 11:42:53 -04:00
Bryan Schumaker
847b51908a ocarina: General settings page
The settings will be shown in a notebook, with a tabbed interface.  This
patch adds a "general" page for basic settings.
2011-05-01 11:42:32 -04:00
Bryan Schumaker
471db697e9 ocarina: Selectively create settings window
We should only do this if the window doesn't already exist.
2011-05-01 11:42:12 -04:00
Bryan Schumaker
93dcfe5f8e ocarina: New window for settings
Clicking the settings button will now create a new window for
configuring settings.
2011-05-01 11:41:58 -04:00
Bryan Schumaker
fd1514202f ocarina: Create settings module
This module is for controlling various settings.  It will create a new
window and respond to any events.
2011-05-01 11:40:52 -04:00
Bryan Schumaker
f5d6990bc0 ocarina: Create preferences button
This button will open a window for configuring Ocarina when clicked.
For now, clicking it will print out a message.
2011-05-01 11:40:30 -04:00
Bryan Schumaker
23cd4da304 Track version in libsaria
Tracking two different versions for Ocarina and libsaria was too much
work.  From now on, Ocarina and libsaria will have the same version.
Ocarina's version string will be set based on libsaria.
2011-05-01 11:40:09 -04:00
Bryan Schumaker
cd914936f3 Bump minor version and mark development as True 2011-05-01 11:39:41 -04:00
Bryan Schumaker
5903d085b2 Current version is 4.3.3 2011-05-01 11:05:55 -04:00
Bryan Schumaker
7c4f32c30b ocarina: User cancels manual album art
This used to cause the album art to change to the Ocarina icon.  When
the user cancels setting album art, None is returned from the selector
function.  We should check for this before trying to set the image and
return early if path is None.
2011-05-01 11:05:55 -04:00
Bryan Schumaker
50cded315e bump bug version 2011-05-01 11:05:55 -04:00
Bryan Schumaker
6201f707cb Mark __dev__ as False
4.3 is almost done!
2010-12-30 11:26:20 -05:00
Bryan Schumaker
f6b20e345a Use slash key to grab filter focus
This may be more natural to people familiar with vim.
2010-12-29 13:29:27 -05:00
Bryan Schumaker
4a34ce51f1 Added uptime() to ocarina package
Calling this function will return an object representing the total
uptime of Ocarina.
2010-12-27 12:22:47 -05:00
Bryan Schumaker
bdd9c331e8 Track startup time in ocarina/__init__.py
The ocarina package can track the startup time better than the launcher
script.  Tracking it in the package will also make startup time
available to other callers.
2010-12-27 12:19:22 -05:00
Bryan Schumaker
1c4621a79a Set random directly
This makes much more sense than toggling it.  Toggling caused an
inconsistent state during testing.
2010-12-23 09:51:09 -05:00
Bryan Schumaker
aa0f832356 Refresh the playlist after loading
After we load an xspf file, we should refresh the playlist to reflect
changes.
2010-12-18 16:44:18 -05:00
Bryan Schumaker
77f065b703 Export playlist to xspf
This patch adds support for saving a playlist as an xspf xml file.  I
only use the <location> tag to keep it simple.
2010-12-18 16:22:06 -05:00
Bryan Schumaker
f869b17e2f Rename backup functions
Backup has been renamed to export
Restore has been renamed to import_xml
2010-12-18 14:52:31 -05:00
Bryan Schumaker
29152aca1d ToggleButton generic toggled signal
The ToggleButton should automatically respond to the toggled signal
2010-12-18 11:19:55 -05:00
Bryan Schumaker
d8c5814f5a ToggleButton tooltip 2010-12-18 11:17:58 -05:00
Bryan Schumaker
e1a709b6c3 Create ToggleButton class
The ToggleButton class is a base class for buttons to inherit from.  So
far, this is only the RandomButton, LikeButton, and DislikeButton
2010-12-18 11:15:12 -05:00
Bryan Schumaker
44ee38dd91 Remove pointless whitespace 2010-12-18 11:10:45 -05:00
Bryan Schumaker
a0d231e964 Move RandomButton()
This puts it closer to the like / dislike buttons, since they are all
toggle buttons
2010-12-18 11:09:41 -05:00
Bryan Schumaker
05297d850c Remove unused code from like / dislike buttons 2010-12-18 11:08:37 -05:00
Bryan Schumaker
a1293fb351 Draw like / dislike buttons
This patch adds the like and dislike buttons to the gui.
2010-12-18 11:05:53 -05:00
Bryan Schumaker
47dbd200ab Add like / dislike buttons
This patch adds buttons for liking and disliking a song.  I also use
this patch to add like / dislike icons.
2010-12-18 11:05:17 -05:00
Bryan Schumaker
d380d0ec45 Use built-in selected_foreach
I also made a wrapper so I can do things with each selected ID.
2010-12-17 08:18:33 -05:00
Bryan Schumaker
23e93ee7ae Reorder shortcuts
If they are in arranged alphabetically the code is easier to read...
2010-12-17 08:09:02 -05:00
Bryan Schumaker
77130b0251 Added more shortcuts
I can now switch between the full and compact footer.  I can also goto
the current song.
2010-12-17 08:06:54 -05:00
Bryan Schumaker
07272cf65e Remove the timeout add function pointer
This is no longer needed for the filter entry, so I'll remove it
2010-12-16 22:42:07 -05:00
Bryan Schumaker
c2e7b1bc31 Escape key focuses nothing
Pressing the escape key will no longer focus the tabs, but instead will
focus nothing.  I think this is better visually.
2010-12-16 22:33:50 -05:00
Bryan Schumaker
10eafb61b5 Improved shortcut behavior
When we successfully execute a shortcut, we shouldn't let anything else
happen in the event path.  Therefore, I stop the key-press-event if it
is successfully handled.

This patch also adds shortcuts for seeking during playback.
2010-12-16 22:16:39 -05:00
Bryan Schumaker
f5e21df148 Button seeking controls
The gui seeking buttons should use the controls seeking functions,
rather than seeking through the audio layer directly.
2010-12-16 22:09:45 -05:00
Bryan Schumaker
d45ea464ef Use a better shortcut system
The gtk.Entry() approach wasn't working.  My new way allows me to catch
keypresses directly from the window, rather than waiting for an entry to
change.
2010-12-16 22:02:34 -05:00
Bryan Schumaker
29665add24 Prevent gtk warning on startup
I need to check if the Source() has height 0 before scrolling.  A better
solution is to scroll when everything becomes visible, but I don't want
to figure that out right now... :P
2010-12-16 21:54:19 -05:00
Bryan Schumaker
243eb63f8a Don't keep saving window size
If the window size hasn't changed, we should not keep setting it.
2010-12-16 11:03:09 -05:00
Bryan Schumaker
21083ab1f7 Hide filter entry by default 2010-12-15 22:29:31 -05:00
Bryan Schumaker
9d08c5ce36 Added basic keyboard shortcuts
This patch adds an entry for keyboard shortcuts.  Right now, I only
support play/pause, stop and next.  I eventually plan to add more,
though.
2010-12-15 22:28:07 -05:00
Bryan Schumaker
add6a61c30 Add body_box
The body_box is a vbox containing the main tabs (for now).  This will
soon be used for a keyboard shortcut entry, too.
2010-12-15 21:57:01 -05:00
Bryan Schumaker
aa8f7d6188 Remove filter delay
I don't think I need this anymore ... filtering still feels fast without
it.
2010-12-15 09:32:52 -05:00