aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_lyrics.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-10-06include ncursesw/ncurses.h if availableMax Kellermann1-1/+0
When compiling with libncursesw, include <ncursesw/ncurses.h> instead of <ncurses.h> (if available).
2008-10-03screen: export the global variable "screen"Max Kellermann1-4/+3
screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
2008-10-03screen: don't pass mpdclient pointer to method paint()Max Kellermann1-3/+3
None of the paint() implementations acutally uses the mpdclient pointer. Remove it from the method signature.
2008-10-02screen_lyrics: character set conversionMax Kellermann1-1/+9
Convert the lyrics to the current character set before displaying them.
2008-10-02moved i18n macros to i18n.hMax Kellermann1-1/+1
Don't make everybody include ncmpc.h just to have generic features. Move generic i18n macros to a separate header.
2008-10-02screen_lyrics: add screen_lyrics_switch()Max Kellermann1-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.
2008-10-02strfsong: constant pointersMax Kellermann1-1/+1
Pass constant pointers to strfsong() and screen_lyrics_load().
2008-09-25screen: replaced get_cur_mode_id() with screen_is_visible()Max Kellermann1-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.
2008-09-25screen: don't compile disabled sourcesMax Kellermann1-4/+0
Instead of evaluating macros from config.h in the disabled source, don't start the compiler on it at all.
2008-09-25screen_lyrics: removed the "update" methodMax Kellermann1-13/+4
Automatically redraw the screen on demand, whenever data has changed.
2008-09-25screen_lyrics: added lyrics_repaint()Max Kellermann1-10/+27
lyrics_repaint() or lyrics_repaint_if_active() are called after data has changed, and the screen needs an update.
2008-09-25screen: don't pass screen pointer to method paint()Max Kellermann1-2/+2
None of the paint() implementations actually use the screen pointer - remove it from the method signature.
2008-09-25screen: don't call wrefresh() in methods paint() and update()Max Kellermann1-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.
2008-09-25list_window: removed property "clear"Max Kellermann1-2/+0
Without clearing previous screen contents, there may be corruptions, make this mandatory and optimize screen clearing.
2008-09-23lyrics: added callbackMax Kellermann1-33/+22
Instead of letting our caller poll lyrics_result(), call it back as soon as we have the result.
2008-09-23screen_lyrics: set current.songMax Kellermann1-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()).
2008-09-17lyrics: don't check current.lines==NULLMax Kellermann1-2/+2
current.lines is always initialized, and cannot be NULL, no need to check it.
2008-09-17lyrics: removed lyrics_text_rows, use current.lines->len insteadMax Kellermann1-2/+1
lyrics_text_rows wasn't set anyway, I somehow removed the code in a patch some time ago.
2008-09-17list_window: added list_window_center()Max Kellermann1-9/+1
Merge code which used to be duplicated in the screens "play", "help", "lyrics".
2008-09-17list_window: added list_window_scroll_cmd()Max Kellermann1-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.
2008-09-17screen: removed screen_functions.get_lw()Max Kellermann1-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.
2008-09-17replaced get_screen_X() with static screen_functions variableMax Kellermann1-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.
2008-09-16lyrics: converted in-process plugins to external programsMax Kellermann1-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
2008-09-15lyrics: missing "break"Max Kellermann1-1/+2
If get_text_line() fails, we should break from the loop.
2008-09-15lyrics: converted global variables to staticMax Kellermann1-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.
2008-09-15fix unused parameter warningsMax Kellermann1-4/+5
Add the "unused" attribute to all function parameters which are indeed going to be ignored.
2008-09-15use size_t and unsigned integersMax Kellermann1-17/+23
2008-09-15fixed mixed declaration + codeMax Kellermann1-6/+6
Although they are allowedd in C99, try to avoid them. Move variable declarations to the top of the current scope.
2008-09-15fix shadow warningsMax Kellermann1-7/+7
Rename local variables and function parameters, so they don't shadow global variables.
2008-09-15include cleanupMax Kellermann1-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.
2008-09-15fix function prototypesMax Kellermann1-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.
2008-09-15const pointersMax Kellermann1-2/+2
Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings.
2008-09-15code style, indent with tabsMax Kellermann1-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.
2008-09-15remove unused static functionsMax Kellermann1-1/+1
Also remove some commented code and unused function parameters.
2007-03-29fix segfaultAndreas Obergrusberger1-3/+7
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5773 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-03-14ugh!Andreas Obergrusberger1-1/+1
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5621 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-02-01lyrics updates, leoslyrics fixesAndreas Obergrusberger1-2/+2
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5314 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-01-03added a plugin system for lyrics sourcesAndreas Obergrusberger1-297/+49
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5217 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-28use older revision till serious bugfixAndreas Obergrusberger1-394/+376
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4704 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26make compilation work againAndreas Obergrusberger1-3/+6
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4697 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-26code cleanupAndreas Obergrusberger1-210/+225
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4695 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-08fix a bug that doubled empty lines when loading lyrics from hdAndreas Obergrusberger1-1/+1
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4601 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-08avuton fixed some warningsAndreas Obergrusberger1-3/+5
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4600 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-07fix a bug when writing lyrics. 1st line is written nowAndreas Obergrusberger1-1/+1
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4588 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-07delte debug msgAndreas Obergrusberger1-1/+0
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4580 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-07important compile fix!Andreas Obergrusberger1-1/+0
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4578 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-07lots of cool stuff!Andreas Obergrusberger1-143/+216
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4577 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-06fixed up lyrics loading interruptionAndreas Obergrusberger1-1/+1
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4576 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-06fix bug in lyrics screenAndreas Obergrusberger1-6/+9
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4572 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2006-08-05interruption of lyrics loading + po blablaAndreas Obergrusberger1-4/+5
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4567 09075e82-0dd4-0310-85a5-a0d7c8717e4f