| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Just make everybody use the global "options" variable. This
eliminates namespace confusion and the NO_GLOBAL_OPTIONS hack.
|
|
|
|
| |
Follow the same code style als MPD itself.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Don't pass "noconvert" to charset_init(). Let charset_init()
determine that with g_get_charset() and return its name.
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
| |
Ignore SIGPIPE, and handle errno==EPIPE instead.
|
|
|
|
|
| |
If the lyrics screen is disabled at compile time, don't initialize the
lyrics library in main().
|
|
|
|
| |
Static variables, pointers vs integers, void function returning, ...
|
|
|
|
|
| |
Moved basic libncurses initialization to ncu.c and ncu.h. Keep
generic code out of screen.c.
|
|
|
|
| |
Before terminating ncmpc, free the keyboard GIOChannel object.
|
|
|
|
|
|
|
|
|
|
|
| |
When I replaced ncmpc's old main loop with g_main_loop from libglib,
SIGWINCH (i.e. window resizing) stopped working. This regression was
caused by the fact that ncurses' wgetch() function was only called
when there was actually data on STDIN. wgetch() has several side
effects besides reading data from STDIN, for example it checks whether
there has been a window resize.
Fix this with a custom SIGWINCH handler.
|
|
|
|
|
| |
Call g_main_loop_quit() on CMD_QUIT, instead of exit() with an
atexit() handler.
|
|
|
|
|
|
|
|
|
|
| |
This big patch replaces our custom main loop with the event based glib
main loop. This has several advantages: we can make all the tiny code
bits in the main loop independent from each others, we can add
additional file descriptors for polling (e.g. the mpdclient socket).
We don't need the ncurses timeout() anymore, because glib will poll
stdin for us.
|
|
|
|
|
|
|
|
| |
Display the UI always, and show connection errors there. This fixes a
lot of consistency problems: error messages used to be printed to
stderr, but afterwards, the atexit() handlers deinitialized ncurses
and the screen was cleared. This patch is still problematic, but
constitutes a good step forward.
|
|
|
|
| |
Follow the same code style als MPD itself.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Follow the same code style als MPD itself.
|
|
|
|
|
| |
Add the "unused" attribute to all function parameters which are indeed
going to be ignored.
|
|
|
|
|
|
|
|
|
| |
In main.c, the global variable "options" is used all over, except in
main(), which contains a shadowing declaration of it. Remove this
local variable, and use the global "options" instead. Also don't
pollute conf.c's namespace with the global variable with a CPP hack
(to be removed when we have fixed more of ncmpc's namespace
pollution).
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Add missing prototypes, and fix wrong prototypes. Convert lots of
functions to "static" when they are only used within the current
source file.
|
|
|
|
|
| |
Convert pointers to const whenever it is possible. Fixes all those
-Wconst warnings.
|
|
|
|
|
| |
NDEBUG is more commonly used than DEBUG, e.g. in assert.h. Convert
all macros to NDEBUG, and declare NDEBUG when debugging is disabled.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also remove some commented code and unused function parameters.
|
|
|
|
|
| |
The code looks strange and spews lots of warnings. Since it does
nothing useful, and wastes the user's precious time, simply remove it.
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5314 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5220 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5217 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4953 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4741 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4543 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3304 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2948 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1868 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1864 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1858 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1856 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1780 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1743 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1649 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1648 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1643 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1612 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|
|
|
|
| |
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1582 09075e82-0dd4-0310-85a5-a0d7c8717e4f
|