Commit Graph

16 Commits

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