| Commit message (Collapse) | Author | Files | Lines |
|
|
|
Using the advanced search led to a segmentation fault, because with
g_malloc0(), the filelist's "entries" array was not allocated. Use
the "official" filelist constructor instead.
|
|
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".
|
|
|
|
screen.h has a check whether to include ncursesw/ncurses.h or
ncurses.h. screen_search.c doesn't need to include it a second time,
and was missing the check.
|
|
Return true/false instead of 1/0.
|
|
Don't repaint the screen after browser_cmd() if another screen has
been selected meanwhile.
|
|
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.
|
|
Free the old pattern before prompting for a new one. Free the old
filelist object before retrieving the new one.
|
|
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.
|
|
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!
|
|
Move everything which deals with UTF-8 strings and character set
conversion to charset.c, header charset.h.
|
|
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.
|
|
Merge a lot of code from the 3 browser screen into browser_cmd().
|
|
CMD_ADD ('a') appends a song to the playlist, no matter if it is
already there, i.e. unlike CMD_SELECT, it does not toggle the song.
|
|
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.
|
|
Instead of evaluating macros from config.h in the disabled source,
don't start the compiler on it at all.
|
|
Since all screen updating is now on demand, we don't need this flag
anymore.
|
|
Repaint the search screen on demand. No need for the update() method
anymore.
|
|
The check wasn't actually doing anything, except leaking memory.
Remove it.
|
|
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.
|
|
There are several places where browser.filelist can become NULL.
Catch that everywhere and generate an empty filelist in this case.
|
|
Fix a memory leak: the concatened list was never freed.
|
|
Avoid direct accesses to the filelist struct, provide an API for that.
|
|
The separate filelist library does not depend on mpdclient, so the
prefix is superfluous.
|
|
Merge code from all 3 browser screens into one generic browser
function.
|
|
Isolate the generic browser code from the directory browser.
|
|
We are going to separate the browser functions from screen_file.c.
Move all variables which are going to be needed by this code.
|
|
|
|
Follow the same code style als MPD itself.
|
|
Declaring empty methods is of no use. If a method is empty, we should
set it to NULL in the screen_functions struct.
|
|
|
|
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.
|
|
Compile time initialization saves resources, compared to run-time
initialization. Declare all screen_function structs as global
variables, and remove all get functions.
|
|
Follow the same code style als MPD itself.
|
|
Add the "unused" attribute to all function parameters which are indeed
going to be ignored.
|
|
|
|
Although they are allowedd in C99, try to avoid them. Move variable
declarations to the top of the current scope.
|
|
Rename local variables and function parameters, so they don't shadow
global variables.
|
|
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.
|