aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_search.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2008-11-18screen: method cmd() returns boolMax Kellermann1-6/+6
Return true/false instead of 1/0.
2008-11-18screen_{file,artist,search}: repaint only if screen is visibleMax Kellermann1-1/+2
Don't repaint the screen after browser_cmd() if another screen has been selected meanwhile.
2008-11-07wreadln: return NULL instead of empty stringMax Kellermann1-5/+0
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.
2008-11-07mpdclient: expect UTF-8 stringsMax Kellermann1-3/+5
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.
2008-11-07screen_search: fixed 2 memory leaksMax Kellermann1-0/+6
Free the old pattern before prompting for a new one. Free the old filelist object before retrieving the new one.
2008-10-03screen: export the global variable "screen"Max Kellermann1-10/+10
screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
2008-10-03screen: don't pass mpdclient pointer to method paint()Max Kellermann1-3/+3
None of the paint() implementations acutally uses the mpdclient pointer. Remove it from the method signature.
2008-10-03screen_search: array index is tag idMax Kellermann1-24/+19
Save some bytes again: remove search_tag.id, make the array index equal to the tag id.
2008-10-03don't import mpdclient_finish_command() twiceMax Kellermann1-2/+0
mpdclient_finish_command() is already imported by mpdclient.h, don't do it again in the sources.
2008-10-03screen_search: removed the FUTURE macroMax Kellermann1-11/+0
The future is now!
2008-10-02moved code to charset.cMax Kellermann1-1/+1
Move everything which deals with UTF-8 strings and character set conversion to charset.c, header charset.h.
2008-10-02moved i18n macros to i18n.hMax Kellermann1-1/+1
Don't make everybody include ncmpc.h just to have generic features. Move generic i18n macros to a separate header.
2008-10-02removed the debugging function D()Max Kellermann1-3/+0
gdb is for debugging. We don't need D() calls littered all over.
2008-10-02screen_browser: added browser_cmd()Max Kellermann1-47/+1
Merge a lot of code from the 3 browser screen into browser_cmd().
2008-09-25screen_browser: added hotkey for adding songMax Kellermann1-0/+8
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.
2008-09-25screen: replaced get_cur_mode_id() with screen_is_visible()Max Kellermann1-1/+1
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.
2008-09-25screen: don't compile disabled sourcesMax Kellermann1-5/+0
Instead of evaluating macros from config.h in the disabled source, don't start the compiler on it at all.
2008-09-25filelist: removed attribute "updated"Max Kellermann1-4/+0
Since all screen updating is now on demand, we don't need this flag anymore.
2008-09-25screen_search: removed update() methodMax Kellermann1-25/+44
Repaint the search screen on demand. No need for the update() method anymore.
2008-09-25screen_search: removed version check from paint() methodMax Kellermann1-5/+1
The check wasn't actually doing anything, except leaking memory. Remove it.
2008-09-25screen: don't pass screen pointer to method paint()Max Kellermann1-4/+4
None of the paint() implementations actually use the screen pointer - remove it from the method signature.
2008-09-25screen: don't call wrefresh() in methods paint() and update()Max Kellermann1-3/+0
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.
2008-09-25list_window: removed property "clear"Max Kellermann1-2/+0
Without clearing previous screen contents, there may be corruptions, make this mandatory and optimize screen clearing.
2008-09-25code style, indent with tabs XMax Kellermann1-3/+1
Follow the same code style als MPD itself.
2008-09-21browse: ensure that filelist!=NULLMax Kellermann1-4/+15
There are several places where browser.filelist can become NULL. Catch that everywhere and generate an empty filelist in this case.
2008-09-19screen_search: free second file listMax Kellermann1-0/+1
Fix a memory leak: the concatened list was never freed.
2008-09-19filelist: provide more functions for working with a filelistMax Kellermann1-14/+8
Avoid direct accesses to the filelist struct, provide an API for that.
2008-09-19filelist: drop "mpdclient" prefixMax Kellermann1-3/+3
The separate filelist library does not depend on mpdclient, so the prefix is superfluous.
2008-09-18screen_browser: moved code to browser_playlist_changed()Max Kellermann1-12/+2
Merge code from all 3 browser screens into one generic browser function.
2008-09-18screen_browser: moved code to screen_browser.cMax Kellermann1-10/+7
Isolate the generic browser code from the directory browser.
2008-09-18screen_browser: added struct screen_browserMax Kellermann1-49/+54
We are going to separate the browser functions from screen_file.c. Move all variables which are going to be needed by this code.
2008-09-18renamed screen_browse.h to screen_browser.hMax Kellermann1-1/+1
2008-09-18code style, indent with tabs VIMax Kellermann1-218/+204
Follow the same code style als MPD itself.
2008-09-18screen: removed empty methodsMax Kellermann1-6/+0
Declaring empty methods is of no use. If a method is empty, we should set it to NULL in the screen_functions struct.
2008-09-17make several functions return voidMax Kellermann1-3/+4
2008-09-17screen: removed screen_functions.get_lw()Max Kellermann1-7/+0
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.
2008-09-17replaced get_screen_X() with static screen_functions variableMax Kellermann1-20/+12
Compile time initialization saves resources, compared to run-time initialization. Declare all screen_function structs as global variables, and remove all get functions.
2008-09-17code style, indent with tabs IIIMax Kellermann1-19/+19
Follow the same code style als MPD itself.
2008-09-15fix unused parameter warningsMax Kellermann1-6/+9
Add the "unused" attribute to all function parameters which are indeed going to be ignored.
2008-09-15use size_t and unsigned integersMax Kellermann1-2/+2
2008-09-15fixed mixed declaration + codeMax Kellermann1-5/+3
Although they are allowedd in C99, try to avoid them. Move variable declarations to the top of the current scope.
2008-09-15fix shadow warningsMax Kellermann1-15/+18
Rename local variables and function parameters, so they don't shadow global variables.
2008-09-15include cleanupMax Kellermann1-6/+7
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.
2008-09-15fix function prototypesMax Kellermann1-2/+2
Add missing prototypes, and fix wrong prototypes. Convert lots of functions to "static" when they are only used within the current source file.
2008-09-15const pointersMax Kellermann1-6/+6
Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings.
2008-09-15code style, indent with tabsMax Kellermann1-129/+115
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.
2008-09-15remove unused static functionsMax Kellermann1-1/+1
Also remove some commented code and unused function parameters.
2007-11-30cmd_select_all addedAndreas Obergrusberger1-0/+5
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@7061 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-02-16way too much stuff to describe hereAndreas Obergrusberger1-13/+40
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
2007-02-01lyrics updates, leoslyrics fixesAndreas Obergrusberger1-12/+5
git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@5314 09075e82-0dd4-0310-85a5-a0d7c8717e4f