| Commit message (Collapse) | Author | Files | Lines |
|
The wide character version of wreadln() is currently a non-functional
mess. Remove it for now, I will reimplement that later.
|
|
Variables which store integer seconds should be declared as GTime.
This fixes a gcc warning.
|
|
|
|
Another occurence of the non-portable basename() wasn't converted to
glib yet.
|
|
The glib function g_timeout_add() wants the interval as guint in
milliseconds. Store the update interval in this form, instead of
having to multiply MPD_UPDATE_TIME with 1000.
|
|
Don't reset sa_mask and sa_flags after every sigaction() call. Do it
once.
|
|
Set option SA_RESTART for the SIGWINCH handler. The screen resizer
function is called by the glib main loop anyway, no need to interrupt
any random system call here.
|
|
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.
|