aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_utils.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* support: renamed source to hscroll.cMax Kellermann2008-12-101-1/+0
| | | | | There is only strscroll() left in support.c. Give the source a better name.
* list_window: use "bool" instead of "int"Max Kellermann2008-11-271-16/+12
| | | | | For flags and return values, use the "bool" data type instead of "int".
* screen_utils: check for NULL passwordMax Kellermann2008-11-171-1/+10
| | | | | | | Fix a NULL pointer dereference and a memory leak: check if screen_read_password() returns NULL, and don't call mpd_sendPasswordCommand(NULL) in this case. Free the password when done.
* wreadln: return NULL instead of empty stringMax Kellermann2008-11-071-1/+1
| | | | | | 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.
* disable more features with --enable-miniMax Kellermann2008-11-071-0/+2
| | | | | | | | | | | | | | Disable lots of smaller features which don't have a separate configure option: - xterm title - screen list - horizontal scrolling - MPD version number check - key binding checks - character set conversion - bitrate display - highlighting in the file browser - completion / history
* removed my_wgetch(), switch to wgetch()Max Kellermann2008-10-061-1/+1
| | | | | There are no special cases left for my_wgetch() to handle. We can remove it and use the original wgetch() instead.
* use g_basename() instead of basename()Max Kellermann2008-10-041-1/+1
| | | | | Another occurence of the non-portable basename() wasn't converted to glib yet.
* screen: export the global variable "screen"Max Kellermann2008-10-031-20/+20
| | | | | screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
* moved i18n macros to i18n.hMax Kellermann2008-10-021-1/+1
| | | | | Don't make everybody include ncmpc.h just to have generic features. Move generic i18n macros to a separate header.
* screen_utils: don't call wmove() twiceMax Kellermann2008-09-251-3/+0
| | | | | The second wmove() is redundant, because the cursor is already there after waddstr(). This also repairs wide characters in the prompt.
* list_window: removed property "repaint"Max Kellermann2008-09-251-3/+1
| | | | | The property "repaint" is never read, since all callers repaint the list window on demand.
* code style, indent with tabs XMax Kellermann2008-09-251-3/+1
| | | | Follow the same code style als MPD itself.
* screen_utils: simplified call to wreadln_masked()Max Kellermann2008-09-221-3/+2
| | | | | | If prompt is NULL, do not add a second call to wreadln_masked() with a literal string, but assign this literal string to the variable "prompt". This saves several bytes in the compiled binary.
* screen_utils: hide cursor after screen_read_password()Max Kellermann2008-09-221-2/+5
| | | | | The call to curs_set(0) in screen_read_password() was dead code, because it was after the function return. Repair that.
* screen: unsigned integers for screen dimensionsMax Kellermann2008-09-221-3/+3
| | | | Store screen width and height as unsigned integer.
* code style, indent with tabs IXMax Kellermann2008-09-221-158/+154
| | | | Follow the same code style als MPD itself.
* use the glib main event loopMax Kellermann2008-09-181-2/+0
| | | | | | | | | | 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.
* screen: added struct namesMax Kellermann2008-09-161-2/+4
| | | | | Let us declare struct names in addition to typedef names, so we can forward-declare them.
* include cleanupMax Kellermann2008-09-151-10/+5
| | | | | | 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.
* screen_auth() returns resultMax Kellermann2008-09-151-1/+2
| | | | | | screen_auth() returns an int, and its result is actually being used. Only the "return" was missing in its implementation. Return _screen_auth()'s result.
* fix function prototypesMax Kellermann2008-09-151-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.
* const pointersMax Kellermann2008-09-151-7/+7
| | | | | Convert pointers to const whenever it is possible. Fixes all those -Wconst warnings.
* code style, indent with tabsMax Kellermann2008-09-151-14/+13
| | | | | | | 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.
* remove unused static functionsMax Kellermann2008-09-151-8/+0
| | | | Also remove some commented code and unused function parameters.
* multi liner ;) fixed segfaultAndreas Obergrusberger2006-09-081-2/+2
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4749 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* due to bensonk's demand i added a splash screen.Andreas Obergrusberger2006-09-071-2/+50
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/branches/tradiaz@4741 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* New configuraton option: find-show-lastKalle Wallin2005-06-151-1/+2
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@3359 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added a search screenKalle Wallin2004-11-151-3/+4
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@2668 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Use glib's str functions (g_strlcat, g_strlcpy, g_snprintf, g_strdup_vprintf)Kalle Wallin2004-07-131-3/+4
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1868 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Use my_wgetch() instead of wgetch(), added --[no-]mouse optionKalle Wallin2004-07-131-11/+1
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1864 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Support SIGSTOP, SIGCONT in raw modeKalle Wallin2004-07-121-0/+5
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1858 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Ignore mouse events in wreadln, screen_getchKalle Wallin2004-07-031-2/+10
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1778 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Made the xterm title dynamic, added configuration option xterm-title-formatKalle Wallin2004-06-241-8/+13
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1647 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* added screen_bell() for optional audible/visible bellsKalle Wallin2004-06-221-1/+28
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1612 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* fixed the display of completion listsKalle Wallin2004-06-191-4/+22
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1565 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added completion stuffKalle Wallin2004-06-181-0/+22
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1556 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Use the alert color in screen_readln()Kalle Wallin2004-06-161-0/+1
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1509 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Major cleanup of the mpd client code (mpc->mpdclient)Kalle Wallin2004-06-141-4/+5
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1481 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added wreadln.c, wreadln.h a simple line editorKalle Wallin2004-06-061-19/+25
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1351 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Added initial i18n supportKalle Wallin2004-06-051-3/+4
| | | | git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1346 09075e82-0dd4-0310-85a5-a0d7c8717e4f
* Changed directory layout (for future use of gettext)Kalle Wallin2004-06-051-0/+153
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1342 09075e82-0dd4-0310-85a5-a0d7c8717e4f