Commit Graph

64 Commits

Author SHA1 Message Date
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