aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_lyrics.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* include ncursesw/ncurses.h if availableMax Kellermann2008-10-061-1/+0
| | | | | When compiling with libncursesw, include <ncursesw/ncurses.h> instead of <ncurses.h> (if available).
* screen: export the global variable "screen"Max Kellermann2008-10-031-4/+3
| | | | | screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
* screen: don't pass mpdclient pointer to method paint()Max Kellermann2008-10-031-3/+3
| | | | | None of the paint() implementations acutally uses the mpdclient pointer. Remove it from the method signature.
* screen_lyrics: character set conversionMax Kellermann2008-10-021-1/+9
| | | | | Convert the lyrics to the current character set before displaying them.
* 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.
* screen_lyrics: add screen_lyrics_switch()Max Kellermann2008-10-021-2/+18
| | | | | | screen_lyrics_switch() opens the lyrics screen and displays the lyrics of the specified song. This way, the user may view the lyrics of any song in the database browser.
* strfsong: constant pointersMax Kellermann2008-10-021-1/+1
| | | | Pass constant pointers to strfsong() and screen_lyrics_load().
* 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-4/+0
| | | | | Instead of evaluating macros from config.h in the disabled source, don't start the compiler on it at all.
* screen_lyrics: removed the "update" methodMax Kellermann2008-09-251-13/+4
| | | | Automatically redraw the screen on demand, whenever data has changed.
* screen_lyrics: added lyrics_repaint()Max Kellermann2008-09-251-10/+27
| | | | | lyrics_repaint() or lyrics_repaint_if_active() are called after data has changed, and the screen needs an update.
* screen: don't pass screen pointer to method paint()Max Kellermann2008-09-251-2/+2
| | | | | 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-4/+1
| | | | | | 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-2/+0
| | | | | Without clearing previous screen contents, there may be corruptions, make this mandatory and optimize screen clearing.
* lyrics: added callbackMax Kellermann2008-09-231-33/+22
| | | | | Instead of letting our caller poll lyrics_result(), call it back as soon as we have the result.
* screen_lyrics: set current.songMax Kellermann2008-09-231-2/+2
| | | | | | The variable current.song was never set, thus the cache did not work. Don't reset it in screen_lyrics_clear() (which is called from screen_lyrics_set()).
* lyrics: don't check current.lines==NULLMax Kellermann2008-09-171-2/+2
| | | | | current.lines is always initialized, and cannot be NULL, no need to check it.
* lyrics: removed lyrics_text_rows, use current.lines->len insteadMax Kellermann2008-09-171-2/+1
| | | | | lyrics_text_rows wasn't set anyway, I somehow removed the code in a patch some time ago.
* list_window: added list_window_center()Max Kellermann2008-09-171-9/+1
| | | | | Merge code which used to be duplicated in the screens "play", "help", "lyrics".
* list_window: added list_window_scroll_cmd()Max Kellermann2008-09-171-32/+4
| | | | | | It is similar to list_window_cmd(), but it scrolls the window instead of moving the selection. It is used by the "lyrics" and the "help" screen.
* screen: removed screen_functions.get_lw()Max Kellermann2008-09-171-7/+0
| | | | | | If it is really important to set the curser, we should think of a better way, instead of exporting one non-generic method. For now, just set the cursor to the origin.
* replaced get_screen_X() with static screen_functions variableMax Kellermann2008-09-171-19/+13
| | | | | | Compile time initialization saves resources, compared to run-time initialization. Declare all screen_function structs as global variables, and remove all get functions.
* lyrics: converted in-process plugins to external programsMax Kellermann2008-09-161-169/+186
| | | | | | | | | | | | | In-process plugins are very problematic. It is much easier and flexible to move the lyrics plugins to external programs, with a trivial protocol. This is work in progress, among the things missing: - protocol specification, including exit codes - plugin installation - plugin search directory - run-time configuration (currently hard coded) - automatic polling (using glib's main loop?) - better and more robust error handling
* lyrics: missing "break"Max Kellermann2008-09-151-1/+2
| | | | If get_text_line() fails, we should break from the loop.
* lyrics: converted global variables to staticMax Kellermann2008-09-151-1/+3
| | | | | | The variables "lyrics_text_rows" and "lw" were declared in src_lyrics.h as static, but they were only actually used in screen_lyrics.c. Move both there.
* fix unused parameter warningsMax Kellermann2008-09-151-4/+5
| | | | | Add the "unused" attribute to all function parameters which are indeed going to be ignored.
* use size_t and unsigned integersMax Kellermann2008-09-151-17/+23
|
* fixed mixed declaration + codeMax Kellermann2008-09-151-6/+6
| | | | | Although they are allowedd in C99, try to avoid them. Move variable declarations to the top of the current scope.
* fix shadow warningsMax Kellermann2008-09-151-7/+7
| | | | | Rename local variables and function parameters, so they don't shadow global variables.
* include cleanupMax Kellermann2008-09-151-10/+10
| | | | | | 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.
* fix function prototypesMax Kellermann2008-09-151-4/+4
| | | | | | Add missing prototypes, and fix wrong prototypes. Convert lots of functions to "static" when they are only used within the current source file.
* const pointersMax Kellermann2008-09-151-2/+2
| | | | | Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings.
* code style, indent with tabsMax Kellermann2008-09-151-240/+235
| | | | | | | Follow the same code style als MPD itself. This patch only fixes parts of the code which are going to be touched in the following bunch of patches, i.e. there will be more "code style" patches in the future.
* remove unused static functionsMax Kellermann2008-09-151-1/+1
| | | | Also remove some commented code and unused function parameters.
* fix segfaultAndreas Obergrusberger2007-03-291-3/+7
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5773 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* ugh!Andreas Obergrusberger2007-03-141-1/+1
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5621 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* lyrics updates, leoslyrics fixesAndreas Obergrusberger2007-02-011-2/+2
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5314 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* added a plugin system for lyrics sourcesAndreas Obergrusberger2007-01-031-297/+49
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5217 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* use older revision till serious bugfixAndreas Obergrusberger2006-08-281-394/+376
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4704 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* make compilation work againAndreas Obergrusberger2006-08-261-3/+6
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4697 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* code cleanupAndreas Obergrusberger2006-08-261-210/+225
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4695 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix a bug that doubled empty lines when loading lyrics from hdAndreas Obergrusberger2006-08-081-1/+1
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4601 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* avuton fixed some warningsAndreas Obergrusberger2006-08-081-3/+5
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4600 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix a bug when writing lyrics. 1st line is written nowAndreas Obergrusberger2006-08-071-1/+1
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4588 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* delte debug msgAndreas Obergrusberger2006-08-071-1/+0
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4580 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* important compile fix!Andreas Obergrusberger2006-08-071-1/+0
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4578 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* lots of cool stuff!Andreas Obergrusberger2006-08-071-143/+216
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4577 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed up lyrics loading interruptionAndreas Obergrusberger2006-08-061-1/+1
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4576 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fix bug in lyrics screenAndreas Obergrusberger2006-08-061-6/+9
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4572 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* interruption of lyrics loading + po blablaAndreas Obergrusberger2006-08-051-4/+5
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4567 09075e82-0dd4-0310-85a5-a0d7c8717e4f