aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_play.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* hscroll: don't compile source in ncmpc-mini modeMax Kellermann2008-12-101-1/+4
| | | | This source is not required with --enable-mini.
* support: renamed source to hscroll.cMax Kellermann2008-12-101-1/+1
| | | | | There is only strscroll() left in support.c. Give the source a better name.
* sreen_play: fixed the g_completion_set_compare() callback typeMax Kellermann2008-12-051-2/+15
| | | | | | Passing strncmp to g_completion_set_compare() is incorrect, because the type of the third parameter (n) differs. This patch adds a wrapper function with the correct type.
* screen_play: fix scrolling in auto-center modeMax Kellermann2008-12-011-5/+7
| | | | | | | Commit cfad0fdf enabled horizontal scrolling, but broke auto-center mode: regardless of whether the current song has changed, it re-centered the list. Moved the options.scroll check to another "if" branch.
* list_window: converted "flags" to one "bool" variableMax Kellermann2008-11-271-3/+3
| | | | | | Currently, there is only one known list_window flag ("hide_cursor"). Replace the "flags" bit field with a boolean variable. If we run out of space some day, we can convert that to bool:1.
* list_window: use "bool" instead of "int"Max Kellermann2008-11-271-2/+2
| | | | | For flags and return values, use the "bool" data type instead of "int".
* ncmpc-mini: disable scrollingMax Kellermann2008-11-251-1/+9
| | | | | The scrolling code broke in the ncmpc-mini build. Disable it when --enable-mini was specified.
* po: improved translatable strings for easier translationMax Kellermann2008-11-251-1/+1
| | | | Remove exclamation marks and other markup from the strings.
* screen_play.c: replaced mpd_unused by G_GNUC_UNUSEDThomas Jansen2008-11-241-5/+6
|
* screen_play: scroll long song names in the playlistMatt Portas2008-11-211-1/+20
| | | | | If the song name under the cursor is too long for the terminal, scroll it like in the statusbar.
* screen_song: check CMD_VIEW only if song screen is enabledMax Kellermann2008-11-191-0/+2
|
* screen_song: new screen which views song informationMax Kellermann2008-11-181-0/+8
| | | | | This new screen views all information available on a song: its location, file name, and tags.
* screen: method cmd() returns boolMax Kellermann2008-11-181-16/+16
| | | | Return true/false instead of 1/0.
* command: added CMD_LOCATE to locate song in databaseMax Kellermann2008-11-181-0/+8
| | | | | Pressing 'l' switches to the file browser (screen_file) and locates the previously selected song in the server's database.
* wreadln: return NULL instead of empty stringMax Kellermann2008-11-071-2/+2
| | | | | | No wreadln() caller cares about an empty string. Simplify the callers by returning NULL instead of an allocated empty string. This fixes several memory leaks.
* mpdclient: expect UTF-8 stringsMax Kellermann2008-11-071-5/+18
| | | | | | Don't convert the character set of strings to and from the current locale. This library cannot know what the strings are going to be used for, so it should not mess with them.
* screen_play: free the wreadln() return valueMax Kellermann2008-11-071-0/+1
|
* disable more features with --enable-miniMax Kellermann2008-11-071-1/+24
| | | | | | | | | | | | | | Disable lots of smaller features which don't have a separate configure option: - xterm title - screen list - horizontal scrolling - MPD version number check - key binding checks - character set conversion - bitrate display - highlighting in the file browser - completion / history
* 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-22/+14
| | | | | 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-14/+14
| | | | | None of the paint() implementations acutally uses the mpdclient pointer. Remove it from the method signature.
* screen_play: remember playlistMax Kellermann2008-10-031-18/+20
| | | | | | | Remove the last paint() dependency on the mpdclient pointer: remember a pointer to the playlist object, and don't take it from mpdclient every time we paint. Also add the variable "current_song_id" which is calculated in update().
* removed LIST_FORMAT, STATUS_FORMATMax Kellermann2008-10-021-2/+1
| | | | | Use options.list_format and options.status_format directly instead of these two macros.
* moved i18n macros to i18n.hMax Kellermann2008-10-021-0/+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-5/+0
| | | | gdb is for debugging. We don't need D() calls littered all over.
* screen_lyrics: add screen_lyrics_switch()Max Kellermann2008-10-021-0/+11
| | | | | | 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.
* screen_play: no song means id=-1Max Kellermann2008-09-281-3/+3
| | | | | | "prev_song_id" and "current_song_id" had value 0 if MPD was not playing at all. This way, ncmpc cannot see the difference between "song 0 playing" and "not playing". Change "not playing" to -1.
* screen_play: repaint highlight when mpd starts playingMax Kellermann2008-09-281-1/+2
| | | | | When deciding whether to repaint the current highlight, test if MPD is actually playing. If MPD starts playing, repaint.
* screen_play: repaint if current song has changedMax Kellermann2008-09-261-8/+10
| | | | | | | | The play_update() function was reduced too much: it didn't repaint the screen when the current song changed. Add check for that. Don't repaint the screen in center_playing_item(), make the caller do it.
* 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 pass screen pointer to method update()Max Kellermann2008-09-251-2/+4
| | | | | play_update() is the only update() implementation left, and it does not use the screen pointer. Remove it from the method signature.
* screen_play: hide cursor with a timerMax Kellermann2008-09-251-20/+45
| | | | | Instead of hiding the cursor in the update() callback, hide it with a glib main loop timeout.
* screen_playlist: don't repaint in update()Max Kellermann2008-09-251-17/+45
| | | | | Repaint the playlist window on demand. Don't repaint it unconditionally in play_update().
* 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-10/+3
| | | | | 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-166/+161
| | | | Follow the same code style als MPD itself.
* screen_play: use list_window_check_selected()Max Kellermann2008-09-231-5/+1
| | | | Instead of manually adjusting the selection, let list_window.c do it.
* screen: simplified CMD_SCREEN_UPDATE handlersMax Kellermann2008-09-221-3/+2
| | | | | 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-6/+1
| | | | | | Several screens ignore the attribute list_window->repaint. Don't set it there. It will be replaced with a more intelligent repaint algorithm later.
* screen: moved input_timestamp to screen_play.cMax Kellermann2008-09-221-1/+6
| | | | Since the input_timestamp is only used by screen_play, move it there.
* 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.
* playlist: removed "updated" flagMax Kellermann2008-09-181-2/+3
| | | | | The caller may check the playlist.id instead of checking the old "updated" flag.
* screen: check MPD status only if connectedMax Kellermann2008-09-181-4/+7
| | | | | | Fix several segmentation faults: when the connection to the MPD server is lost, there were NULL pointer dereferences because client->status==NULL. Check before accessing it.
* screen: removed NULL checkMax Kellermann2008-09-181-2/+1
| | | | | Since the screen's initialization is guaranteed, we can remove the NULL check in center_playing_item().
* make several functions return voidMax Kellermann2008-09-171-4/+4
|
* playlist: use playlist_get() instead of playlist_get_song()Max Kellermann2008-09-171-2/+3
|
* 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.
* list_window: added list_window_center()Max Kellermann2008-09-171-8/+3
| | | | | Merge code which used to be duplicated in the screens "play", "help", "lyrics".
* 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.