| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
Somehow the "ignore SIGPIPE" patch had a fatal typo: instead of
ignoring SIGPIPE, it ignored SIGWINCH. Somehow ncurses managed to
hide the bug's symptoms, but a recent patch finally broke it. Repair
the typo.
|
|
|
|
|
| |
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().
|
|
|
|
| |
Repaint immediately instead of setting "painted=0".
|
|
|
|
|
| |
Since we are handling SIGWINCH, we do not need to handle KEY_RESIZE
from ncurses. Remove it.
|
|
|
|
|
| |
Save some bytes again: remove search_tag.id, make the array index
equal to the tag id.
|
|
|
|
|
| |
mpdclient_finish_command() is already imported by mpdclient.h, don't
do it again in the sources.
|
|
|
|
| |
The future is now!
|
|
|
|
|
| |
Global variables are already initialized with zero when the program
starts, don't memset(0) again.
|
|
|
|
|
| |
Just make everybody use the global "options" variable. This
eliminates namespace confusion and the NO_GLOBAL_OPTIONS hack.
|
|
|
|
|
| |
Default is colors disabled. Those who love colorful terminals have
the option to enable it with --enable-colors.
|
|
|
|
|
|
| |
Instead of calling printf() multiple times for every compile time
option, build the whole string at compile time and print it with
puts().
|
|
|
|
|
| |
The color ids are sequential, and we can save some bytes if we use it
for the array index.
|
|
|
|
|
| |
Instead of declaring a bunch of CPP macros, use a C enum for
identifying colors.
|
|
|
|
| |
Follow the same code style als MPD itself.
|
|
|
|
|
|
| |
The artist screen shouldn't be marked "experimental" anymore.
Describe the current state of the screen in the title, instead of
always writing "Artist".
|
|
|
|
|
|
|
|
| |
We do not need to save a stack of list window states. When we return
to a parent directory, we just have to find the directory which we
come from in the parent list. Note that this patch resets the cursor
when going to the root directory, but I think it's not that important,
and I will deal with that later.
|
|
|
|
|
| |
The function filelist_find_directory() will be useful for the
following patch.
|
|
|
|
|
|
|
| |
The variable "album" was set to _("All tracks") when it was empty.
When reloading the songs, ncmpc was trying to find an album named "All
tracks", which didn't seem to work. Leave "album" in its canonical
form and generate the title text on demand.
|
|
|
|
|
| |
The GTK charset functions accept "-1" if the parameter is null
terminated.
|
| |
|
|
|
|
|
| |
g_basename() is always available, no need to implement a fallback.
Also use g_path_get_dirname(), g_path_get_basename().
|
|
|
|
| |
Don't duplicate code which is already provided by glib.
|
|
|
|
| |
Don't duplicate code which is already provided by glib.
|
| |
|
|
|
|
|
| |
Moved the format string for playlist files to the constant
"playlist_format".
|
|
|
|
|
| |
The code did not compile when HAVE_LOCALE_H was not set. Also don't
compile all that code in charset.c, when there is no locale.h.
|
|
|
|
|
| |
Convert the lyrics to the current character set before displaying
them.
|
|
|
|
|
| |
Use g_convert_with_fallback() for charset conversion, and don't print
a status bar message on error.
|
|
|
|
|
| |
Don't pass "noconvert" to charset_init(). Let charset_init()
determine that with g_get_charset() and return its name.
|
|
|
|
|
|
| |
my_strlen() is a bad name for the function, since the return value is
not a length, but a visible width on the screen. Rename it to
utf8_width() and change its return type to "unsigned".
|
|
|
|
|
| |
Move everything which deals with UTF-8 strings and character set
conversion to charset.c, header charset.h.
|
|
|
|
|
| |
Moved constants which are only used in one source file. Remove
several unused macros.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Use the standard "bool" type instead of glib's "gboolean". This way,
options.h doesn't have to include the fat glib.h.
|
|
|
|
| |
This library isn't being used anymore, delete it.
|
|
|
|
|
| |
These macros are only used by options.c and conf.c. Move them to a
common internal header.
|
|
|
|
|
|
| |
Instead of checking whether options.list_format is set in the
LIST_FORMAT macro, initialize it once with options.list_format. Same
for options.status_format / STATUS_FORMAT.
|
|
|
|
| |
gdb is for debugging. We don't need D() calls littered all over.
|
|
|
|
|
|
| |
When we created created browser_cmd(), several functions of the
screen_browser API weren't used by other sources anymore. We can now
unexport them.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Provide an API for switching the currently displayed screen. Rename
switch_screen_mode() to screen_switch().
|
|
|
|
|
| |
Since the method types are used only once, we do not need typedefs for
that. Declare the method types within struct screen_functions.
|
|
|
|
| |
Merge a lot of code from the 3 browser screen into browser_cmd().
|
|
|
|
|
| |
By calling artist_lw_cmd() after the big switch, we can override
behaviour, and we can modify the command.
|
|
|
|
|
| |
artist_repaint() calls wrefresh(), don't call it again after
that.
|
|
|
|
| |
Pass constant pointers to strfsong() and screen_lyrics_load().
|
|
|
|
| |
Since screen.h checks the macros from config.h, we have to include it.
|