| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This source is not required with --enable-mini.
|
|
|
|
|
| |
There is only strscroll() left in support.c. Give the source a better
name.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
For flags and return values, use the "bool" data type instead of
"int".
|
|
|
|
|
| |
The scrolling code broke in the ncmpc-mini build. Disable it when
--enable-mini was specified.
|
|
|
|
| |
Remove exclamation marks and other markup from the strings.
|
| |
|
|
|
|
|
| |
If the song name under the cursor is too long for the terminal, scroll
it like in the statusbar.
|
| |
|
|
|
|
|
| |
This new screen views all information available on a song: its
location, file name, and tags.
|
|
|
|
| |
Return true/false instead of 1/0.
|
|
|
|
|
| |
Pressing 'l' switches to the file browser (screen_file) and locates
the previously selected song in the server's database.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
When compiling with libncursesw, include <ncursesw/ncurses.h> instead
of <ncurses.h> (if available).
|
|
|
|
|
| |
screen_t is a singleton. We do not have to pass it around
everywhere. Export the one global variable.
|
|
|
|
|
| |
None of the paint() implementations acutally uses the mpdclient
pointer. Remove it from the method signature.
|
|
|
|
|
|
|
| |
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().
|
|
|
|
|
| |
Use options.list_format and options.status_format directly instead of
these two macros.
|
|
|
|
|
| |
Don't make everybody include ncmpc.h just to have generic features.
Move generic i18n macros to a separate header.
|
|
|
|
| |
gdb is for debugging. We don't need D() calls littered all over.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
"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.
|
|
|
|
|
| |
When deciding whether to repaint the current highlight, test if MPD is
actually playing. If MPD starts playing, repaint.
|
|
|
|
|
|
|
|
| |
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 code shouldn't know anything about the screen ids (which will
be eliminated completely later). Instead of comparing ids, compare
the screen_functions pointer.
|
|
|
|
|
| |
play_update() is the only update() implementation left, and it does
not use the screen pointer. Remove it from the method signature.
|
|
|
|
|
| |
Instead of hiding the cursor in the update() callback, hide it with a
glib main loop timeout.
|
|
|
|
|
| |
Repaint the playlist window on demand. Don't repaint it
unconditionally in play_update().
|
|
|
|
|
| |
None of the paint() implementations actually use the screen pointer -
remove it from the method signature.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Without clearing previous screen contents, there may be corruptions,
make this mandatory and optimize screen clearing.
|
|
|
|
| |
Follow the same code style als MPD itself.
|
|
|
|
| |
Instead of manually adjusting the selection, let list_window.c do it.
|
|
|
|
|
| |
Since screen.c has default code for CMD_SCREEN_UPDATE, return 0 from
the command handlers and let screen.c do the rest.
|
|
|
|
|
|
| |
Several screens ignore the attribute list_window->repaint. Don't set
it there. It will be replaced with a more intelligent repaint
algorithm later.
|
|
|
|
| |
Since the input_timestamp is only used by screen_play, move it there.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The caller may check the playlist.id instead of checking the old
"updated" flag.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Since the screen's initialization is guaranteed, we can remove the
NULL check in center_playing_item().
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Merge code which used to be duplicated in the screens "play", "help",
"lyrics".
|
|
|
|
|
|
| |
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.
|