aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_artist.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* moved code to charset.cMax Kellermann2008-10-021-1/+1
| | | | | Move everything which deals with UTF-8 strings and character set conversion to charset.c, header charset.h.
* moved i18n macros to i18n.hMax Kellermann2008-10-021-1/+1
| | | | | Don't make everybody include ncmpc.h just to have generic features. Move generic i18n macros to a separate header.
* removed the debugging function D()Max Kellermann2008-10-021-1/+0
| | | | gdb is for debugging. We don't need D() calls littered all over.
* screen_browser: added browser_cmd()Max Kellermann2008-10-021-30/+15
| | | | Merge a lot of code from the 3 browser screen into browser_cmd().
* screen_artist: call artist_lw_cmd() at the end of artist_cmd()Max Kellermann2008-10-021-5/+5
| | | | | By calling artist_lw_cmd() after the big switch, we can override behaviour, and we can modify the command.
* screen_artist: don't call wrefresh() twiceMax Kellermann2008-10-021-1/+0
| | | | | artist_repaint() calls wrefresh(), don't call it again after that.
* screen_artist: separate artist and album listsMax Kellermann2008-10-011-36/+55
| | | | | | "metalist" can have different meanings, depending on the mode. Replace it with two separate variables "artist_list" and "album_list". This way, we can optimize screen updates later.
* screen_artist: replaced update_metalist()Max Kellermann2008-10-011-30/+42
| | | | | Replaced update_metalist() with three specialized functions for mode switching.
* screen_artist: added reload_lists()Max Kellermann2008-10-011-3/+23
| | | | | | Some callers of update_metalist() want to reload the list contents. Add an optimized function reload_lists() which does not modify the global variables "mode", "artist", "album".
* screen_artist: splitted update_metalist()Max Kellermann2008-10-011-46/+86
| | | | | Moved special cases for loading artist, album, song lists to separate functions.
* screen_artist: convert metalist to GPtrArrayMax Kellermann2008-10-011-33/+72
| | | | | | | | | A linked list is quite uncomfortable here because there is a lot of indexed access to the list. Use a GPtrArray of strings instead. Note that mpdclient_get_artists_utf8() and mpdclient_get_albums_utf8() return a linked list, and sorting is also performed on the linked list. This will be optimized later.
* screen_artist: don't insert ".." and "all albums" into listMax Kellermann2008-10-011-6/+17
| | | | Generate these special list entries on the fly.
* screen_artist: moved code to artist_lw_cmd()Max Kellermann2008-10-011-12/+20
| | | | | To unify the code, wrap list_window_cmd() in artist_lw_cmd(), which properly checks the current mode.
* screen_browser: added hotkey for adding songMax Kellermann2008-09-251-1/+6
| | | | | CMD_ADD ('a') appends a song to the playlist, no matter if it is already there, i.e. unlike CMD_SELECT, it does not toggle the song.
* screen: replaced get_cur_mode_id() with screen_is_visible()Max Kellermann2008-09-251-1/+1
| | | | | | Screen code shouldn't know anything about the screen ids (which will be eliminated completely later). Instead of comparing ids, compare the screen_functions pointer.
* screen: don't compile disabled sourcesMax Kellermann2008-09-251-5/+0
| | | | | Instead of evaluating macros from config.h in the disabled source, don't start the compiler on it at all.
* filelist: removed attribute "updated"Max Kellermann2008-09-251-2/+0
| | | | | Since all screen updating is now on demand, we don't need this flag anymore.
* screen_artist: removed update() methodMax Kellermann2008-09-251-25/+59
| | | | | Repaint the artist screen on demand. No need for the update() method anymore.
* screen: don't pass screen pointer to method paint()Max Kellermann2008-09-251-3/+3
| | | | | None of the paint() implementations actually use the screen pointer - remove it from the method signature.
* screen: don't call wrefresh() in methods paint() and update()Max Kellermann2008-09-251-2/+0
| | | | | | screen_paint() and screen_update() are responsible for refreshing the screen. We can remove all wrefresh() and wnoutrefresh() invocations from all paint() and update() method implementations.
* list_window: removed property "clear"Max Kellermann2008-09-251-4/+0
| | | | | Without clearing previous screen contents, there may be corruptions, make this mandatory and optimize screen clearing.
* code style, indent with tabs XMax Kellermann2008-09-251-3/+1
| | | | Follow the same code style als MPD itself.
* screen: simplified CMD_SCREEN_UPDATE handlersMax Kellermann2008-09-221-2/+0
| | | | | Since screen.c has default code for CMD_SCREEN_UPDATE, return 0 from the command handlers and let screen.c do the rest.
* screen: don't set list_window->repaintMax Kellermann2008-09-221-2/+0
| | | | | | Several screens ignore the attribute list_window->repaint. Don't set it there. It will be replaced with a more intelligent repaint algorithm later.
* browse: ensure that filelist!=NULLMax Kellermann2008-09-211-0/+3
| | | | | There are several places where browser.filelist can become NULL. Catch that everywhere and generate an empty filelist in this case.
* screen_artist: check if anything is selectedMax Kellermann2008-09-211-0/+8
| | | | | Don't try to call add_query() with no valid selection, this causes a segfault. This usually happens when ncmpc isn't connected.
* filelist: provide more functions for working with a filelistMax Kellermann2008-09-191-9/+4
| | | | Avoid direct accesses to the filelist struct, provide an API for that.
* filelist: drop "mpdclient" prefixMax Kellermann2008-09-191-3/+3
| | | | | The separate filelist library does not depend on mpdclient, so the prefix is superfluous.
* screen_browser: moved code to browser_playlist_changed()Max Kellermann2008-09-181-13/+2
| | | | | Merge code from all 3 browser screens into one generic browser function.
* screen_browser: moved code to screen_browser.cMax Kellermann2008-09-181-9/+6
| | | | Isolate the generic browser code from the directory browser.
* screen_browser: added struct screen_browserMax Kellermann2008-09-181-79/+91
| | | | | We are going to separate the browser functions from screen_file.c. Move all variables which are going to be needed by this code.
* renamed screen_browse.h to screen_browser.hMax Kellermann2008-09-181-1/+1
|
* screen: removed empty methodsMax Kellermann2008-09-181-6/+0
| | | | | Declaring empty methods is of no use. If a method is empty, we should set it to NULL in the screen_functions struct.
* screen_artist: fix compilation errorsMax Kellermann2008-09-171-26/+29
| | | | | | Unfortunately when I fixed the GCC warnings and refactored lots of the code, the "artist" screen was disabled. This patch applies all API changes and fixes all warnings.
* code style, indent with tabs IVMax Kellermann2008-09-171-335/+316
| | | | Follow the same code style als MPD itself.
* list_window: don't reset *highlight to 0Max Kellermann2008-09-171-1/+0
| | | | | Since the list_window code sets highlight to 0 before it calls the list_callback, the callback itself doesn't have to reset the flag.
* replaced get_screen_X() with static screen_functions variableMax Kellermann2008-09-171-20/+12
| | | | | | Compile time initialization saves resources, compared to run-time initialization. Declare all screen_function structs as global variables, and remove all get functions.
* include cleanupMax Kellermann2008-09-151-6/+7
| | | | | | A header should include all headers which he needs. Move local includes on top, and let foo.c include foo.h in the first line, to automatically test its dependencies.
* remove unused static functionsMax Kellermann2008-09-151-2/+2
| | | | Also remove some commented code and unused function parameters.
* Daniel rocked the houseAndreas Obergrusberger2006-11-111-0/+34
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5041 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* sort artists and albums (metalist)Kalle Wallin2005-06-161-0/+18
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3361 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added exact_match parameter to mpdclient_filelist_search()Kalle Wallin2005-06-141-36/+94
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3357 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Moved list window state code to list_window.cKalle Wallin2005-06-141-53/+50
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3353 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added an experimental artist (browser) screenKalle Wallin2005-06-061-0/+389
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3322 09075e82-0dd4-0310-85a5-a0d7c8717e4f