Commit Graph

447 Commits

Author SHA1 Message Date
Bryan Schumaker
6385c1f342 Ocarina: Begin rewriting header
I show the entry, and I call a filter function for the current page.
2011-05-01 12:05:59 -04:00
Bryan Schumaker
d20d4c3fcd Ocarina: Playlist and library tabs
I've readded these tabs, but I don't fill them in yet.  That'll wait
until I rewrite sources.
2011-05-01 12:05:46 -04:00
Bryan Schumaker
b2db7d3327 Began gui rewrite
Cleaning up the code was proving to be more difficult than I initially
thought.  I have decided to rewrite the gui to make it less intimidating
and more easily modified.
2011-05-01 12:05:31 -04:00
Bryan Schumaker
8255c17ad1 Initialize library, playlist, queue from ocarina/__init__.py
It can't be done in ocarina.py anymore, so it has to be moved there.
2011-05-01 12:04:23 -04:00
Bryan Schumaker
36c3770e4b ocarina: Initialize from ocarina/__init__.py
This will allow me me to replace ocarina.py easily..
2011-05-01 12:03:54 -04:00
Bryan Schumaker
dfa3eb0af1 Move Page() class to new file
This helps with my cleanup
2011-05-01 12:03:42 -04:00
Bryan Schumaker
3aee2cd867 move body.py to new directory
This should help to clean up everything a bit more.
2011-05-01 12:03:27 -04:00
Bryan Schumaker
fb4e863b64 Move Source() class to ocarina/sources/__init__.py
This finishes my initial attempt at cleaning up this portion of the gui.
2011-05-01 12:03:12 -04:00
Bryan Schumaker
965ff4dc18 Move listview to new file
Continuing my source gui cleanup
2011-05-01 12:02:26 -04:00
Bryan Schumaker
f194444895 Move ListStore creation code to new file
This continues my sources cleanup.
2011-05-01 12:02:15 -04:00
Bryan Schumaker
74545558a7 Move source column code to new file
This patch also moves the column into a new file.  This is the beginning
of my attempt to clean up the code used to display the song list.
2011-05-01 12:01:40 -04:00
Bryan Schumaker
2c1865d257 Measure startup time in ocarina/__init__.py
I was doing some of the calculation in ocarina.py, but it can be done
easier (and more accurately) in ocarina/__init__.py
2011-05-01 12:01:25 -04:00
Bryan Schumaker
08fa12d76d Don't create menu items in ocarina.py
I was creating the "Pause after current track" menu item in ocarina.py,
but it can easily be done in menu.py.
2011-05-01 12:00:55 -04:00
Bryan Schumaker
c62ffd7e1f Initialize body in ocarina/__init__.py
This helps clean up ocarina.py a bit more.
2011-05-01 12:00:40 -04:00
Bryan Schumaker
7caeddf615 More window cleanups
This is looking like a less intimidating file now.  It should be more
usable going forward.
2011-05-01 12:00:23 -04:00
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
Bryan Schumaker
c0a27fb02c Move update library button
I moved it to the other side of the clear button so that it's farther
away from the goto button.
2010-12-15 08:00:13 -05:00
Bryan Schumaker
ee53d76238 Added a comment 2010-12-14 22:53:29 -05:00
Bryan Schumaker
d57db55d46 Don't scroll if Source widget not realized
This was giving a gtk warning, and is fairly easy to check for.
2010-12-14 22:44:39 -05:00
Bryan Schumaker
bcc622f06c Scroll to middle
When scrolling on song change, it looks better if we go to the middle
rather than somewhere near the top.
2010-12-14 22:39:58 -05:00
Bryan Schumaker
5a17c9c76f Added button tooltips
This patch adds tooltips to ALL gui buttons
2010-12-14 21:34:26 -05:00
Bryan Schumaker
f74239a0e2 Add update button
When clicked, the entire library will be updated in the background.
2010-12-14 20:37:40 -05:00
Bryan Schumaker
5b555b841f Album art in footer bar
I now draw a small version of the album art in the footer bar.
2010-12-12 15:45:42 -05:00
Bryan Schumaker
8bd3ca0ffa Custom album art size
The size of the album art is now a parameter passed on construction.
The default is 64.
2010-12-12 15:42:20 -05:00
Bryan Schumaker
14f4cccb87 Don't hide AlbumArtImage()
The AlbumArtImage() was alwas hidden at first.  I don't think we need
this...
2010-12-12 15:40:49 -05:00
Bryan Schumaker
5c0f30c544 Set footer based on single variable
For some reason I was using ocarina.footer.up and ocarina.footer.down to
track the status of the footer.  This should really only be tracked
using one boolean...
2010-12-12 15:38:16 -05:00
Bryan Schumaker
ce88872997 Initialize TimeLabel() to 00:00
This sets the inital value of a TimeLabel() to 00:00.  I found it
awkward to look at the inital time of a song as " / 03:55" or something
similar.  Now it will show "00:00 / 03:55"
2010-12-12 15:28:34 -05:00
Bryan Schumaker
cfd30e8eac Smaller header buttons
I can scale down the 6 sided die image better than the old 20 sided die,
so it is ok to make the header images smaller.
2010-12-12 15:21:46 -05:00
Bryan Schumaker
6fc8415838 next() selects from queue
We check the queue for a song first, then go to the playlist.
2010-12-12 14:45:30 -05:00
Bryan Schumaker
4acb972583 Play songs in the queue
Selecting songs in the queue will play the song and remove it from the
queue.
2010-12-12 14:28:19 -05:00
Bryan Schumaker
f47aa206d1 Remove songs from queue
I can now remove songs from the queue.  Additionally, I only add songs
to the queue if they are not already in it.
2010-12-12 14:20:12 -05:00
Bryan Schumaker
c7c81c1b03 Queue reset
I can now reset the queue to an empty state.
2010-12-12 14:13:18 -05:00
Bryan Schumaker
e7bab2fc94 Queue filtering
The queue can now be filtered using the default text entry.
2010-12-12 14:04:36 -05:00
Bryan Schumaker
e997d4df33 Fill queue page
This patch shows what songs are currently in the queue.
2010-12-12 13:57:26 -05:00
Bryan Schumaker
1e3c48bbf1 Add songs to the Queue
I can add songs from both the library and the playlist to the queue
2010-12-12 13:54:38 -05:00
Bryan Schumaker
25dcd0619c Added framework for Queue
This patch adds the queue as a tab on the main window.  I also added the
libsaria queue functions, but right now the don't do anything.
2010-12-12 13:46:49 -05:00
Bryan Schumaker
a233861cfd Playlist with generic init function
The playlist is now initialized using the generic init function.
2010-12-09 08:10:42 -05:00
Bryan Schumaker
9acd22b402 Library with generic init function
The library is now initialized with the generic init function.
2010-12-09 08:09:37 -05:00
Bryan Schumaker
b9eb5609fc ocarina labels with generic get_attrs()
Labels can use the generic get_attrs() function to set their tags.
2010-12-07 08:10:17 -05:00
Bryan Schumaker
1089b85e88 Get_attrs current source
The generic get_attrs() function now works correctly.  I had to
introduce a "get_cur_id()" function for each source to get this working.
2010-12-07 08:07:10 -05:00
Bryan Schumaker
f063da5b56 Began work on virtual sources
Virtual sources should make it easier to do things with the current song
without having to know anything about it (such as a song id or file
path).
2010-12-05 17:11:41 -05:00
Bryan Schumaker
3eeb35d81c Stop using file_to_id
We should now use file_id located in libsaria.path
2010-12-05 13:40:39 -05:00
Bryan Schumaker
fbfc5738c6 Bump version numbers
We are now developing Ocarina 4.3!
2010-12-05 13:40:15 -05:00
Bryan Schumaker
7638fea8de Bump versions
Bump the minimum version required for plugins.  Also marked __dev__ =
False in Ocarina and Libsaria
2010-12-05 12:54:32 -05:00
Bryan Schumaker
43fd01e1cd Fill list with or without lock
The gtk.gdk lock is alread held when we add selected songs to the
playlist.  I deadlock if I try to grab it again.
2010-12-04 13:40:04 -05:00
Bryan Schumaker
86462fc6ec gdk lock when populating lists
Getting this lock seems to stop an assertion failure I was getting when
trying to fill and scroll at the same time.
2010-12-03 23:55:52 -05:00
Bryan Schumaker
84b220fae9 Return after list scrolling
We don't need to keep iterating over the list once we have scrolled to
the current song.  We can return early instead.
2010-12-03 23:33:25 -05:00
Bryan Schumaker
d20a007c77 Filechooser callback in background
We should call the filechooser callback in the background so that gdk
threads have a chance to unlock and prevent deadlock.
2010-12-03 08:36:13 -05:00
Bryan Schumaker
d20693bba7 Select and goto song improvements
When we select a song through the gui, we should call either the
playlist or library play_id() function for appropriate bookkeeping.

Additionally, on startup we seek to sources.cur_lib_id
2010-12-03 08:36:13 -05:00
Bryan Schumaker
4f5c3e8b57 Reorder header
Elements in the header have been reordered so they make more sense
2010-12-03 08:35:15 -05:00
Bryan Schumaker
a6090a4247 Switch pages before removing current page
If we are asked to remove the current page, we should first switch to a
different page.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
f05e6c6336 Set default page
During startup, we should check if the initial page exists.  If it
doesn't we will switch to the default page instead.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
72f85f9f92 Create a set locked function for album art
We appear to already be locked when we get to the setter function.  I
was getting deadlocked when trying to do anything.  To fix this, I
made it so I can set images without needing the lock.
2010-12-03 08:35:15 -05:00
Bryan Schumaker
ba9e25c846 Change goto icon
I am now using the stock "jump to" icon, rather than "index"
2010-12-03 08:35:14 -05:00
Bryan Schumaker
bf6a770e89 Lock image
This was uncommented, and led to problems.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
accb75848c Goto current song on load
When a song has been loaded, we should scroll to it.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
b12894d5a7 Goto song when filtering
When filtering, we should select the currently playing song if it is
visible.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
5a508cefd3 Goto current song return early
We should return early if there is no currently playing song in the
list.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
742333f1af Goto current song
There is no a button to scroll to the currently playing song.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
a71ae8319f AlbumArt widget is now an event box
This allows me to catch a button-press-event and show a file chooser to
select an image as the new album art for the currently playing song.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
ad45b10544 Fix fsselect
Selecting files through fsselect was broken at some point.  This commit
fixes it.
2010-12-03 08:35:14 -05:00
Bryan Schumaker
9198ad130e Tooltip correct attributes
We should use the correct attributes for setting the list tooltip
2010-12-03 08:35:13 -05:00
Bryan Schumaker
89f87c265b Footer remove page
I added a remove page function to the footer for plugins that make use
of it.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
4680134ab3 Progress bar seek to click
When the user clicks on the progess bar, we should seek to the location
of the click.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
1a6146ec1e Progress bar tooltip
The tooltip shows the time corresponding to the mouse location on the
widget.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
b112f1d034 Unselect rows in list
Before exiting from for_each_selected, we should unselect all selected
rows in the list.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
558ee3dabe Remove from playlist
I can now remove songs from the playlist.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
ed13a467ea Rename ocarina.collection
I have ocarina.collection to ocarina.source to reflect the naming change
in libsaria.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
763b161299 Teased apart old ocarina.collection code
The new code is easier to read, and much less intimidating.  I also
changed the Library() and Playlist() classes into python modules to make
them easier to read.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
4122672a4f Delete tabs.py
This has been replaced with ocarina.body.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
54c2528e48 Remove commented out code 2010-12-03 08:35:13 -05:00
Bryan Schumaker
c664e1cadb Made a remove page function
The remove page function will remove a page from the notebook.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
e2f0af1ac1 Remove old tab related code
I have relocated all of these features to ocarina.body, so the old code
in __init__.py is no longer needed.
2010-12-03 08:35:13 -05:00
Bryan Schumaker
04b24f94e3 Delete ocarina/info.py 2010-12-03 08:34:48 -05:00
Bryan Schumaker
4657c96179 Changed up and down buttons
I have replaced the plus and minus icons with up and down arrows.
2010-12-03 08:32:04 -05:00
Bryan Schumaker
3bf990f8c8 Up and Down buttons
The up and down buttons have been re-added.  They store their state
between sessions.
2010-12-03 08:32:04 -05:00
Bryan Schumaker
d74d294ea1 Footer add page
I can now add generic pages to the footer displayed on each main tab.
2010-12-03 08:32:04 -05:00
Bryan Schumaker
070ea3e465 Added page footer
This is the second half of my old ocarina.info file.  So far it is just
the toolbar.
2010-12-03 08:32:04 -05:00
Bryan Schumaker
f0604ffa83 Formatting fixes
I remove the old filter bar from ocarina.info, and fix some spacing
issues in ocarina.header
2010-12-03 08:31:36 -05:00
Bryan Schumaker
79244acb07 Added header
The header is shown at the top of each notebook page.
2010-12-03 08:31:04 -05:00
Bryan Schumaker
856a0935c6 ocarina.body improvements
The current tab is saved between sessions, and the visible / invisible
functions are called for each page.
2010-12-03 08:31:04 -05:00
Bryan Schumaker
c1c00f72d7 Began new tab interface
Right now, I am calling it body.py.  When I am done, I won't have to go
through ocarina/__init__.py to access the tabs.  Instead, I will just
have to import ocarina.body.
2010-12-03 08:31:04 -05:00
Bryan Schumaker
efe45371db Move set_volume() and toggle_rand() 2010-12-03 08:31:04 -05:00
Bryan Schumaker
cc6772d596 Move stop features to libsaria.controls.py 2010-12-03 08:31:04 -05:00
Bryan Schumaker
fefde40e82 Moved play and pause to libsaria/controls.py
They have been moved from libsaria/audio/__init__.py.
2010-12-03 08:31:04 -05:00
Bryan Schumaker
6f7381c221 pre-lookup libsaria.event.invite for buttons 2010-12-03 08:31:04 -05:00
Bryan Schumaker
b5da80d6c2 Add libsaria/controls.py
I will eventually be moving things over to here.  The general rule: if
it has to do with buttons on the gui, then it should probably be
considered a control.
2010-12-03 08:31:03 -05:00
Bryan Schumaker
986ece1943 Move more things to components 2010-12-03 08:31:03 -05:00
Bryan Schumaker
65edef6baf Move entry and pbar to ocarina.components 2010-12-03 08:31:03 -05:00
Bryan Schumaker
5e84823b23 Move buttons and image
They now live in ocarina.components, since they are used to build higher
level objects
2010-12-03 08:31:03 -05:00
Bryan Schumaker
5bde98ec88 Move ocarina.box
This has been moved to ocarina.components.box.  I don't think it has
been used recently, though.  Maybe it is safe to delete.
2010-12-03 08:31:03 -05:00
Bryan Schumaker
b3add42ed4 Optimize a little bit 2010-12-03 08:31:03 -05:00
Bryan Schumaker
7efbe9b76c Window standalone module
The window is now a standalone module, and no longer accessed through
ocarina.__init__.py
2010-12-03 08:31:03 -05:00
Bryan Schumaker
b0a6e5c36e OpenButton() needed the new location of universal_open() 2010-12-03 08:31:03 -05:00
Bryan Schumaker
487e8c39be Move generic saving / loading functions
These belong under path/
2010-12-03 08:31:03 -05:00
Bryan Schumaker
1e7f63aa2d Moved backup.py to path/
This moves the backup functions to a more reasonable place.
2010-12-03 08:31:03 -05:00
Bryan Schumaker
7c2c10cd50 Don't reload playlist every time it changes 2010-12-03 08:30:13 -05:00
Bryan Schumaker
c80dfcdf27 Finish new prefrences moveover
I have renamed libsaria.prefs2 to libsaria.prefs
2010-12-03 08:30:13 -05:00
Bryan Schumaker
2d99d70066 Info pane with new prefs
The information pane uses the new preferences tree now.
2010-12-03 08:30:13 -05:00
Bryan Schumaker
a051d5ac41 Volume through new preferences tree
The volume is now controlled through the preferences tree.
2010-12-03 08:30:13 -05:00
Bryan Schumaker
3f3d111fba Random new preferences
The random feature uses the new preferences tree, rather than the
preferences map.
2010-12-03 08:30:13 -05:00
Bryan Schumaker
7f82a08a3a Ocarina window new preferences tree
The main window will set its size based on the new preferences tree,
instead of the old preferences map.
2010-12-03 08:30:12 -05:00
Bryan Schumaker
701306fef6 libsaria sources change
Change files to reflect the rename of libsaria.collection to
libsaria.sources
2010-12-03 08:30:12 -05:00
Bryan Schumaker
33749eeb58 Add export button to gui
The button doesn't do much unless one is created and displayed
somewhere...
2010-12-03 08:29:16 -05:00
Bryan Schumaker
8328a83dcd Don't reload when refreshed
Lists should not be reloaded when they are refreshed.  Instead, use
everything already in memory.
2010-12-03 08:29:14 -05:00
Bryan Schumaker
e6b968ed13 Load in background
The library and playlist can be loaded in the background to save time!
Also, I changed the library list to use the new populate function.!
2010-12-03 08:29:14 -05:00
Bryan Schumaker
02704b4d7e Use get_attrs
This changes various parts of ocarina / libsaria to use get_attrs()
instead of get_attr().
2010-12-03 08:29:14 -05:00
Bryan Schumaker
2dc7f58206 Rename libsaria.music
I decided that libsaria.music should be known as libsaria.audio.  It
makes more sense to me.
2010-12-03 08:29:14 -05:00
Bryan Schumaker
7b99572f39 Added __bug__ to track bug fix versions. 2010-12-03 08:29:14 -05:00
Bryan Schumaker
52423d8b34 Collection Treeview / List cleanup
This removes the on_mouse_motion notifications that I was using for
setting the tooltip.
2010-12-03 08:29:13 -05:00
Bryan Schumaker
acdd0d9500 Treeview tooltips
The treeview tooltips will show detailed information about the selected
track (including album art!)
2010-12-03 08:29:13 -05:00
Bryan Schumaker
bd6522f76b Album art tooltip change
Use set_icon() instead of set_custom() to set the album art tooltip.
2010-12-03 08:29:13 -05:00
Bryan Schumaker
cac2ebbe23 Album Art tooltip
The album art tooltip is a large verison of the image set as the album
art.
2010-12-03 08:29:13 -05:00
Bryan Schumaker
15c4a273bf Playlist filtering
The new playlist module can be filtered again.
2010-12-03 08:29:13 -05:00
Bryan Schumaker
1de5243753 New playlist module
The playlist should be a standalone module rather than inheriting from
the same base class as the library.
2010-12-03 08:29:13 -05:00
Bryan Schumaker
f561e6b3e2 Remove library functions from collections.lens
I have removed some functions from the old library class since they have
been re-implemented in the library module.
2010-12-03 08:29:13 -05:00
Bryan Schumaker
643da7c12a New library filtering
The new library module can filter songs
2010-12-03 08:29:13 -05:00
Bryan Schumaker
ca331f6b64 Library play_id()
I have moved over the play_id function to the library module.
2010-12-03 08:29:13 -05:00
Bryan Schumaker
8356c58493 Library class -> library module
I think that the library will be cleaner if I turn it into a module
instead of keeping it a class.
2010-12-03 08:29:13 -05:00
Bryan Schumaker
85040621ed Bump the minor version number
This reflects that I am working on Ocarina 4.2 / Libsaria 1.2 now.
2010-12-03 08:28:05 -05:00
Bryan Schumaker
92014b15fb Common menu items
Common menu items are drawn for all right click menus, so the same
function won't need to be added multiple times to different menus.
2010-12-03 08:26:06 -05:00
Bryan Schumaker
49d7326816 Adjust ocarina bug version 2010-11-19 23:11:24 -05:00
Bryan Schumaker
1703fff378 Modified backup code
The backup code needed to be modified so that it works with Ocarina 4.1.
This involved writing a function to walk library ids, and using the
lib_get_attr function from the collection.
2010-11-19 23:05:57 -05:00
Bryan Schumaker
e0cfc08ba3 Export button
Clicking this button will convert the library from the in-memory Tree
based form to xml.
2010-11-19 22:52:05 -05:00
Bryan Schumaker
4c398537b8 Ocarina 4.1.4 2010-11-09 14:09:22 -05:00
Bryan Schumaker
3e9b96bf46 Added __bug__ to track bug fix versions. 2010-11-08 20:34:40 -05:00
Bryan Schumaker
bda392bc88 Correctly set __dev__ for libsaria and ocarina. 2010-11-06 13:36:03 -04:00
Bryan Schumaker
049e27c559 Ocarina 4.1 2010-11-05 18:38:44 -04:00
Bryan Schumaker
2b7b38da4f Merge branch 'master' of file:///home/bjschuma/public_html/git/ocarina
Conflicts:
	ocarina/image.py
2010-11-03 23:07:18 -04:00
Bryan Schumaker
5839190bb4 Image.set_height() should return True or False
If set_height() returns False, we know something went wrong and that we
should try again using the default image.
2010-11-03 22:15:03 -04:00
Bryan Schumaker
3ed0b10aab Only change play button when playing
If no song is playing and the play button is clicked we shouldn't switch
to the pause button.  This could confuse users.
2010-11-03 22:04:51 -04:00
Bryan Schumaker
0c3acb92d2 Don't set album art from pixbuf if pixbuf is None 2010-11-03 20:44:18 -04:00
Bryan Schumaker
ca46e8db4c remove unneeded whitespace 2010-11-03 08:15:36 -04:00
Bryan Schumaker
930834222a Reset page button
The reset page button will reset the library or playlist and then clear
the list on that page.
2010-11-03 08:13:23 -04:00
Bryan Schumaker
5803f74701 Button improvements
Changed the size of the random icon, and made the top row icons slightly
larger.
2010-11-02 20:49:48 -04:00
Bryan Schumaker
92b5de08ef Resizing image check
Check for a denominator of 0 before resizing an image.
2010-11-02 19:35:38 -04:00
Bryan Schumaker
ecbb6424af Don't keep calling show() whenever the album art changes. 2010-11-02 17:07:35 -04:00
Bryan Schumaker
cbaa8753bd gdk thread locking for album art
use gdk.threads_enter() and gdk.threads_leave() to lock the album art
changing section of the AlbumArt class.
2010-11-02 17:06:49 -04:00
Bryan Schumaker
cc8ea2d11f Import and initialize gtk.gdk threads for use in the image class (and
probably other places where there are gtk-related critical sections)
2010-11-02 17:04:56 -04:00
Bryan Schumaker
af7151a554 Lock when changing album art
If we lock, then we prevent the possibility that multiple threads will
attempt to change the art at the same time.  We hold the lock until
after the resize for the same reason.
2010-11-01 11:53:59 -04:00
Bryan Schumaker
685bd54bcb Merge branch 'master' of file:///home/bjschuma/public_html/git/ocarina 2010-10-31 17:25:35 -04:00
Bryan Schumaker
6f2d064480 Don't make empty menus
make_menu should only pop up a menu if there are menu items to show.
2010-10-31 17:24:07 -04:00
Bryan Schumaker
19d1f885cd Information pane remember position
The infopane will remember if it is currently up or down between
sessions.
2010-10-30 16:57:48 -04:00
Bryan Schumaker
63ee87fa16 Menu direct function call
Menu callback functions should not go through a lambda layer.  Instead,
call the given function directly.
2010-10-30 13:51:48 -04:00
Bryan Schumaker
adc3af3779 Menu tweaks
Playlists and libraries now have a right click menu, and a generic
function for making the menus.
2010-10-30 13:40:56 -04:00
Bryan Schumaker
3de6e94db1 Generic window icon function
I made a function to set the window icon, rather than doing it only when
the window is constructed.
2010-10-30 13:09:15 -04:00
Bryan Schumaker
4f771dd6e7 Default album art image
Use images/ocarina.png as the default album art image if none can be
found
2010-10-30 12:22:26 -04:00
Bryan Schumaker
2861e3d3b9 Window icon
The main window sets the image images/ocarina.png as the window manager
icon on startup.
2010-10-30 12:17:54 -04:00
Bryan Schumaker
b1534f082d Clear image file
Whenever a song changes, we need to clear the path that we tell the
album art image to load.  Otherwise, it will show art from the previous
track if none can be found for the current track.
2010-10-27 09:44:44 -04:00
Bryan Schumaker
ba90106588 ocarina/image.py
This adds two new classes.  Image() inherits from a gtk.Image, and adds
set_height(x) to scale an image so it is x pixels high.  AlbumArt()
inherits from Image, and will display the album art of the currently
playing song.
2010-10-26 22:45:59 -04:00
Bryan Schumaker
3680035ba1 Ocarina import pango
Ocarina should import pango so other modules don't have to.  Anything
that wants to use pango can do this instead:
  import ocarina
  pango = ocarina.pango
2010-10-26 22:35:43 -04:00
Bryan Schumaker
d46eca4823 Id 0 == False
When checking if we have a song id, we should check against None (id ==
None).  Doing "if id" will return False when id is 0.
2010-10-25 08:48:32 -04:00
Bryan Schumaker
03ed1489dc Move forward button
Move the forward button so it is next to the rewind button.
2010-10-24 17:25:31 -04:00
Bryan Schumaker
4f371987a0 Version strings
Libsaria and Ocarina have a __vers__ variable.  This contains a string
with the official version (eg. "Ocarina 4.1-dev" or "Libsaria 1.1").
"-dev" means that there have been changes since the last official
version.
2010-10-24 17:22:24 -04:00
Bryan Schumaker
b7efda1d80 Added version variables
libsaria is now known as libsaria version 1.1.
ocarina  is now known as ocarina  version 4.1.
Both are still under development (__dev__ == True)
2010-10-23 20:17:25 -04:00
Bryan Schumaker
9603e4cef0 Forward / Rewind buttons
I have created forward and rewind buttons to draw on the info bar.  In
addition, I have created seek_sec() to seek the song by X seconds.
Right now, the seek buttons add +/- 5 seconds to the current position.
2010-10-23 15:53:52 -04:00
Bryan Schumaker
f982fab96a More attribute labels
Year, count, length, and length2 labels have been created.  The length2
label adds a "/" before displaying the length of the current song.
2010-10-23 15:35:16 -04:00
Bryan Schumaker
af8eb41589 Attr labels
I created labels that automatically update whenever a song is changed.
These labels are used for displaying the artist, album, and title of the
currently playing song.  They can also be used in the future fir
displaying any attribute of a song.
2010-10-23 14:03:03 -04:00
Bryan Schumaker
816d97e3ea Now playing tab
I have replaced the "test" tab with a "now playing" tab that will tell
the artist, album, and title of the current song.
2010-10-23 12:16:50 -04:00
Bryan Schumaker
50f7e1203d Score system
The score system will help determine what users do and don't like.  When
the user chooses a song or listens to > 75% of a song, we increment the
score.  If the user selects a different song in the first 1/3 of
playback then we decrement the score.

Songs with a score >= 0 will always be played.  Songs with a score < 0
have a 50% chance of playing.
2010-10-21 17:11:33 -04:00
Bryan Schumaker
6d7b08f921 Random
- Made a random check button to toggle the random preference
- Playlists pick a random song from what is visible
2010-10-21 08:47:10 -04:00
Bryan Schumaker
f1fc5caf07 Bugfixes
data.py: Return after deciding to scan a new library

playlist: refresh during the PREPLISTREFRESH event, not the
POSTPLISTREFRESH event
2010-10-21 07:55:21 -04:00
Bryan Schumaker
dc1b6dd4a6 Playlists
I can add songs to a playlist and populate the playlist afterwards (and
on startup).
2010-10-20 21:53:47 -04:00
Bryan Schumaker
02fe6dc8ba Right click menus
I have started a system to create a right click menu on the fly and show
it.  Currently, it only works for the library.  This will be used to
populate the playlist and probably many other things (like plugins!)
2010-10-20 21:11:12 -04:00
Bryan Schumaker
8f370aa3bd Change all volume buttons
All existing volume buttons must be changed when the volume changes, not
just the one receiving the value-changed signal.
2010-10-20 20:08:21 -04:00
Bryan Schumaker
7b8d2288cd Player volume
I can now change the volume using a button in the gui.  Additionally,
the volume is stored between sessions, and the correct value is loaded
when libsaria is initialized.
2010-10-20 20:04:23 -04:00
Bryan Schumaker
507b539295 Only seek when the user updates the progress bar. 2010-10-20 08:24:54 -04:00
Bryan Schumaker
67676d2d62 TimeLabel()
Made a time label that updates ever 5 seconds to show the current time
into the song.
2010-10-18 21:05:50 -04:00
Bryan Schumaker
d56f3b2d0a Multiple changes
- Remove google from the web radio plugin
- Change ocarina.py to use python2
- Seek in song using slider
2010-10-18 21:04:39 -04:00
Bryan Schumaker
ff8d599008 removed print statements 2010-10-18 10:59:00 -04:00
Bryan Schumaker
98ded4f032 Progress bar slider movement
The progress bar slider updates every half second as a song plays.
2010-10-16 14:21:25 -04:00
Bryan Schumaker
1da55341d4 Fixed loading of random songs
I fixed loading of songs not in the library by correctly implementing
the path walk function in the DLTree class
2010-10-15 23:12:33 -04:00
Bryan Schumaker
519f4c0fd8 Began moving functions from the gui collection to the gui list where
they belong.
2010-10-14 17:11:38 -04:00
Bryan Schumaker
45e2b0325f Filtering improvements
When a list is filtered, if the Nth song is selected we should play song
N in the filtered list and not the original list.
2010-10-14 08:16:13 -04:00
Bryan Schumaker
eb7932fad2 Added the beginnings of a progress bar 2010-10-11 20:48:43 -04:00
Bryan Schumaker
6c6477b677 Index filtering
I have implemented simple filtering over the library.  This will return
a set of visible songs based on the search pattern.
2010-10-10 23:06:54 -04:00
Bryan Schumaker
168025fb60 Collection Indexing
I can now add songs to a collection's index.  The index only works for
unicode string right now (all others must be converted)
2010-10-10 13:45:52 -04:00
Bryan Schumaker
2c27185679 Use new collection structure to populate the library list. 2010-10-08 13:09:42 -04:00
Bryan Schumaker
adcb73dac9 Have a working doubly-linked tree based library.
I have a bit more to do before I support everything the old library did.
Mostly getattr work.
2010-10-06 23:31:36 -04:00
Bryan Schumaker
42dbdd2736 I now add buttons to the info tabs using an action widget. 2010-10-04 19:20:49 -04:00
Bryan Schumaker
6609e48d5c Play / Pause / Close tabs
I am using tabs in the info pane to act as buttons when the pane is
expanded.  Eventually I want to move this over to an action widget, but
pygtk doesn't support action widgets for notebooks yet.  Hopefully this
will be fixed by the next release.
2010-09-13 19:32:13 -04:00
Bryan Schumaker
4a5085d973 File chooser window
I have created my own file chooser window that can select both files and
directories.  Currently, the "OK" button must be clicked to select
anything.
2010-09-12 19:11:37 -04:00
Bryan Schumaker
2aded0e67f Filesystem Selecting
Began experimenting with a filesystem selector that can select both
files and directories.
2010-09-10 17:46:42 -04:00
Bryan Schumaker
2f562bcc81 Buttons
Added a button class, and attached play/pause buttons to the bottom of
the window.
2010-08-30 17:57:08 -04:00
Bryan Schumaker
4d41cbfc30 Playlist borders
Both top and bottom playlist borders are present, but both only have a
placeholder label for now.  Double clicking on a row in the list will
play a song now.
2010-08-25 08:18:57 -04:00
Bryan Schumaker
c5a7508573 Began bottom pane
I only need to create one bottom pane instance now.  When the tabs are
changed, the object will be removed from the old tab and added to the
new one.  This will preserve the state of the pane between tabs.
2010-08-22 12:40:39 -04:00
Bryan Schumaker
8674fd8f17 Declassify Window()
We should only ever have one instance of the main window, so there is no
reason for it to be a class.  I have turned it into a set of functions
that do the same thing.
2010-08-22 09:20:27 -04:00
Bryan Schumaker
1139ba09c3 Declassify Tabs()
We only have one instance of the main tabs, so there is no reason for it
to be a class.  I have changed this into a set of functions that do
everything the old class did.
2010-08-22 09:07:09 -04:00
Bryan Schumaker
3a764343d0 Generic TabPage for the main tabs
The main tabs now have a generic TabPage class that contains the content
added to the tab.  This TabPage will control visibility of the content
and make it easier to find a page with specific content (no looping
through gtk boxes!)
2010-08-20 22:00:15 -04:00
Bryan Schumaker
8594c3b330 Collection get_attr() and list hover popup
Collections now have a get_attr function.  This function takes a song id
and a string with the requested attribute.  The value of the attribute
is returned.  This is used for generating a hover popup with the
playcount.
2010-08-20 19:37:55 -04:00
Bryan Schumaker
304855c10d Use gtk.ListStore.insert
The append function of a ListStore is extremely slow.  Now I use  the
ListStore insert function, and manually track the size of the list
myself.
2010-08-20 08:27:12 -04:00
Bryan Schumaker
15cc5d22f0 Backend and frontend changes
Libsaria events now support starting specific callback functions in a
background thread.  This replaces starting a specific event in the
background.

I have a library tab that is added to the main window through use of the
ocarina.add_tab function.

I have new tests for walking the tree and running multiple threads with
locks.
2010-08-19 23:02:30 -04:00
Bryan Schumaker
66a8c5169e Web Radio Plugin
The web radio plugin can load pandora and grooveshark.  This happens
when a web radio tab is selected.  After the web document is loaded,
playing music will be paused.
2010-08-15 13:39:31 -04:00
Bryan Schumaker
853dde3ea7 Plugins Install
I can now install plugins through drag and drop / universal open.  For
now, installing plugins involves copying the file to ~/.saria/plugins/.
2010-08-15 01:05:37 -04:00
Bryan Schumaker
a87653f056 Main Tabs Implemented
I can now add pages to the main tab widget that is attached to the
window.  My next step is to work on libsaria plugins for Pandora and
Last.fm
2010-08-15 00:25:24 -04:00
Bryan Schumaker
7ce3da1a2a Ocarina GUI
I have begun creating the Ocarina 4.1 gui.  So far, I can create and
resize a window.  After a resize, the new size is saved and used again
when Ocarina is next started.  I am also investigating drag and drop for
use with plugin loading.
2010-08-13 23:58:19 -04:00
bjschuma
4d71ae824d Working Map class and test suite
I revised the Ocarina 4.0 map class so it will hopefully have better
performance.  I also began working on a new testing system so testing
specific changes should be easier than with Ocarina 4.0
2010-08-07 12:55:23 -04:00
bjschuma
77b7724509 Initial commit, begin work on ocarina 4.1 2010-08-07 11:29:28 -04:00