aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* hscroll: don't compile source in ncmpc-mini modeMax Kellermann2008-12-101-1/+4
| | | | This source is not required with --enable-mini.
* support: renamed source to hscroll.cMax Kellermann2008-12-101-1/+1
| | | | | There is only strscroll() left in support.c. Give the source a better name.
* screen: use print_hotkey() for the output screen tabMax Kellermann2008-12-101-4/+1
| | | | | Don't use markup in the translated string; use print_hotkey() as a simple wrapper.
* screen_outputs: new screen to control MPD's output devicesMikael Svantesson2008-12-051-0/+11
| | | | | The "outputs" screen allows the user to enable or disable MPD's audio output devices.
* screen: fixed "screen too small" typoMax Kellermann2008-12-041-2/+2
| | | | | The "too" had only one 'o'. Remove the newline character at the end to simplify translation.
* screen: don't show disabled help screen in screen listMax Kellermann2008-11-301-0/+2
| | | | | When the help screen was disabled at compile time, it was showed in the screen list anyway.
* po: improved translatable strings for easier translationMax Kellermann2008-11-251-6/+6
| | | | Remove exclamation marks and other markup from the strings.
* screen: simplify screen list stringsMax Kellermann2008-11-251-24/+20
| | | | | Removed the colon and the spaces from the translatable screen names. This aims to simplify the translator's job.
* mpdclient: removed _utf8 suffix from function namesMax Kellermann2008-11-071-1/+1
| | | | | All functions must receive UTF-8 file names. Delete all which still work with locale strings, and remove the _utf8 suffix from the others.
* disable more features with --enable-miniMax Kellermann2008-11-071-1/+30
| | | | | | | | | | | | | | 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
* configure.ac: added --disable-help-screenMax Kellermann2008-11-071-0/+2
|
* wreadln: convert public globals to local constantsMax Kellermann2008-10-061-4/+0
| | | | | Convert wrln_max_line_size and wrln_max_history_length to local constants. They have no real use outside of wreadln.c.
* removed my_wgetch(), switch to wgetch()Max Kellermann2008-10-061-2/+0
| | | | | There are no special cases left for my_wgetch() to handle. We can remove it and use the original wgetch() instead.
* screen: declare time constants as GTimeMax Kellermann2008-10-041-2/+2
| | | | | Variables which store integer seconds should be declared as GTime. This fixes a gcc warning.
* screen: export the global variable "screen"Max Kellermann2008-10-031-4/+4
| | | | | screen_t is a singleton. We do not have to pass it around everywhere. Export the one global variable.
* screen: don't pass mpdclient pointer to method paint()Max Kellermann2008-10-031-1/+1
| | | | | None of the paint() implementations acutally uses the mpdclient pointer. Remove it from the method signature.
* screen: removed "painted" flagMax Kellermann2008-10-031-9/+5
| | | | Repaint immediately instead of setting "painted=0".
* colors: make color support optional at compile timeMax Kellermann2008-10-031-0/+2
| | | | | Default is colors disabled. Those who love colorful terminals have the option to enable it with --enable-colors.
* code style, indent with tabs XIMax Kellermann2008-10-031-2/+0
| | | | Follow the same code style als MPD itself.
* charset: renamed my_strlen() to utf8_width()Max Kellermann2008-10-021-7/+7
| | | | | | 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".
* moved code to charset.cMax Kellermann2008-10-021-0/+1
| | | | | Move everything which deals with UTF-8 strings and character set conversion to charset.c, header charset.h.
* moved macros from ncmpc.h to main.c and screen.cMax Kellermann2008-10-021-1/+10
| | | | | Moved constants which are only used in one source file. Remove several unused macros.
* removed LIST_FORMAT, STATUS_FORMATMax Kellermann2008-10-021-1/+2
| | | | | Use options.list_format and options.status_format directly instead of these two macros.
* moved i18n macros to i18n.hMax Kellermann2008-10-021-0/+1
| | | | | Don't make everybody include ncmpc.h just to have generic features. Move generic i18n macros to a separate header.
* removed the debugging function D()Max Kellermann2008-10-021-4/+0
| | | | gdb is for debugging. We don't need D() calls littered all over.
* screen: export function screen_switch()Max Kellermann2008-10-021-10/+10
| | | | | Provide an API for switching the currently displayed screen. Rename switch_screen_mode() to screen_switch().
* fix miscellaneous sparse warningsMax Kellermann2008-09-251-1/+1
| | | | Static variables, pointers vs integers, void function returning, ...
* screen: removed screen.modeMax Kellermann2008-09-251-9/+6
| | | | | Everything is now managed with a pointer to the screen_functions struct.
* screen: pass screen_functions pointer to switch_screen_mode()Max Kellermann2008-09-251-12/+20
| | | | | Trying to get rid of the screen ids. A pointer to screen_functions is better for identifying a screen.
* screen: replaced get_cur_mode_id() with screen_is_visible()Max Kellermann2008-09-251-2/+3
| | | | | | 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.
* screen: moved code to screen_list.cMax Kellermann2008-09-251-110/+10
| | | | | Move the hard-coded screen list and everything which works with this array to screen_list.c.
* screen: don't compile disabled sourcesMax Kellermann2008-09-251-0/+2
| | | | | Instead of evaluating macros from config.h in the disabled source, don't start the compiler on it at all.
* screen: don't pass screen pointer to method update()Max Kellermann2008-09-251-1/+1
| | | | | play_update() is the only update() implementation left, and it does not use the screen pointer. Remove it from the method signature.
* screen: don't pass screen pointer to method paint()Max Kellermann2008-09-251-1/+1
| | | | | None of the paint() implementations actually use the screen pointer - remove it from the method signature.
* screen: moved input_timestamp to screen_play.cMax Kellermann2008-09-221-2/+0
| | | | Since the input_timestamp is only used by screen_play, move it there.
* screen: moved list_window mouse code to list_window.cMax Kellermann2008-09-221-21/+1
| | | | | | Move the portion of screen_get_mouse_event() which handles list_window clicks to list_window.c. The code contained a NULL pointer dereference, which is now fixed.
* screen: moved code to ncu.cMax Kellermann2008-09-221-31/+2
| | | | | Moved basic libncurses initialization to ncu.c and ncu.h. Keep generic code out of screen.c.
* added option "welcome-screen-list"David Shakaryan2008-09-221-1/+2
| | | | | "welcome-screen-list" shows the screen list in the top row shortly after startup, and is enabled by default.
* added optional bitrate display to status barJ. Alexander Treuman2008-09-211-4/+14
| | | | | If visible-bitrate is enabled, then the current bitrate will be drawn next to the song time in the status bar. By default it will not be displayed.
* Adding crop feature in ncmpcYannick LM2008-09-211-0/+3
| | | | | The "crop" command deletes all songs from the playlist, except the one currently being played.
* removed the clock screenMax Kellermann2008-09-181-10/+0
| | | | Why should an audio player display a large clock?
* screen: don't handle CMD_PLAYMax Kellermann2008-09-181-0/+2
| | | | | | | | | | CMD_PLAY is mapped to the Enter key by default. Some screens (mis-)use it for navigation, for entering a directory. The playlist screen actually plays the file under the cursor. On all other screens, pressing Enter may be confusing, since it is more of a "confirmation" key instead of "play". We should probaby add CMD_CONFIRM later, but for now, disable the general CMD_PLAY handler in screen.c. This fixes bug 240.
* quit with g_main_loop_quit()Max Kellermann2008-09-181-2/+0
| | | | | Call g_main_loop_quit() on CMD_QUIT, instead of exit() with an atexit() handler.
* 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: check MPD status only if connectedMax Kellermann2008-09-181-38/+51
| | | | | | Fix several segmentation faults: when the connection to the MPD server is lost, there were NULL pointer dereferences because client->status==NULL. Check before accessing it.
* screen: moved code to screen_client_cmd()Max Kellermann2008-09-181-9/+24
| | | | | | Move all command handlers which need a connection to the MPD server to screen_client_cmd(). This will allow us to unify error handling later.
* code style, indent with tabs IVMax Kellermann2008-09-171-16/+15
| | | | Follow the same code style als MPD itself.
* make several functions return voidMax Kellermann2008-09-171-6/+2
|
* screen: return early in switch_screen_mode() on errorMax Kellermann2008-09-171-7/+7
| | | | | When the selected screen does not exist, return before calling close().
* screen: added macro NUM_SCREENSMax Kellermann2008-09-171-25/+16
| | | | | Since the number of screens is known at compile time, define a macro which calculates this, instead of having a sentinel element.