aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_browser.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* screen: moved list_window mouse code to list_window.cMax Kellermann2008-09-221-1/+2
| | | | | | Move the portion of screen_get_mouse_event() which handles list_window clicks to list_window.c. The code contained a NULL pointer dereference, which is now fixed.
* browser: check if the selection is validMax Kellermann2008-09-211-1/+2
| | | | Don't call filelist_get() with an invalid index.
* filelist: use GPtrArray instead of GListMax Kellermann2008-09-191-19/+15
| | | | | Since we do a lot of indexed accesses to the filelist, a linked list doesn't seem appropriate. Use GPtrArray instead.
* browser: added function browser_get_selected()Max Kellermann2008-09-191-9/+11
| | | | | browser_get_selected() checks if there is a file list and a valid selection, and returns the selected entry.
* filelist: provide more functions for working with a filelistMax Kellermann2008-09-191-6/+7
| | | | Avoid direct accesses to the filelist struct, provide an API for that.
* filelist: drop "mpdclient" prefixMax Kellermann2008-09-191-2/+2
| | | | | The separate filelist library does not depend on mpdclient, so the prefix is superfluous.
* browser: use mpdclient_filelist_find_song() in set_highlight()Max Kellermann2008-09-191-18/+9
| | | | | A song should not be twice in the browser. Simplify set_highlight() by finding the entry with mpdclient_filelist_find_song().
* browser: song must not be NULL in set_highlight()Max Kellermann2008-09-191-2/+1
| | | | | The caller must not pass NULL to set_highlight(). Replaced check with assertion.
* screen_browser: removed entity.song!=NULL checkMax Kellermann2008-09-181-6/+5
| | | | | It is guaranteed that the "song" attribute is not NULL, remove the check.
* screen_browser: removed redundant highlight checkMax Kellermann2008-09-181-6/+5
| | | | | | browser_select_entry() checked the entry's "highlight" flag twice: the first time, it was toggled, and the second time, action was performed based on the flag. Merge the two checks.
* screen_browser: removed redundant entity type checksMax Kellermann2008-09-181-14/+10
| | | | | The function browser_select_entry() returns early when the entity type is not "SONG". No need to double check that.
* screen_browser: moved code to browser_select_entry()Max Kellermann2008-09-181-51/+24
| | | | | | Moved code from browser_handle_select(). Call this new function also from browser_handle_select_all(). This fixes a bug in select_all(): it actually did not select all, but stopped after the first song.
* screen_browser: removed commented codeMax Kellermann2008-09-181-15/+0
|
* screen_browser: moved code to browser_playlist_changed()Max Kellermann2008-09-181-2/+29
| | | | | Merge code from all 3 browser screens into one generic browser function.
* screen_browser: moved code to screen_browser.cMax Kellermann2008-09-181-0/+474
Isolate the generic browser code from the directory browser.