summaryrefslogtreecommitdiff
path: root/src/interface.c
AgeCommit message (Collapse)AuthorFilesLines
2020-02-15Ellipsize long sink/source namesBenjamin Franzke1-28/+75
2020-02-15Fix column alignment for UTF-8 stringsBenjamin Franzke1-5/+44
2020-02-15Support UTF-8 charactersBenjamin Franzke1-1/+1
Switch to ncursesw (using pkg-config) for UTF-8 support. Fallback to a X/Open Curses specification compatible curses implementation if ncursesw is not available. The fallback is intended for non-ncurses systems only. UTF-8 multibyte does also work on the curses implementation of NetBSD. We may need a proper configure check to assert that the curses library is multibyte capable. Note that X/Open Curses doesn't specify wide character (utf-8) compatiblity.
2020-02-15Replace our custom signalfd() fallback with glib one (available as of 2.54)Benjamin Franzke1-3/+3
Back in 2011 SIGWINCH couldn't be used with g_unix_signal_add. This has changed in 2.54 (released Sep. 2017). That means we can drop our wrapper now.
2020-02-15Print status using mvwaddstr instead of mvwprintwBenjamin Franzke1-1/+1
The status message may container printf-style modifiers which would cause an incorrect buffer to be accessed.
2020-02-15Drop invalid call to delscreen(NULL)Benjamin Franzke1-1/+0
Some descriptions said that delscreen frees resources from initscr (which we use) and newterm (which we do not use). Therefore we added delscreen(NULL) in 489e2955687bccb263e1ece3a1615b3356c990f2. It turs out that delscreen does only free resources from newterm and that the argument *sp *must* not be NULL. (Only due to some unreference comparisons this didn't fail in ncurses, but could fail with other curses implementations)
2013-02-20interface: Fix unused variable errorsBenjamin Franzke1-0/+2
Caused by some curses functions being macros
2011-12-20interface: Add labels to the sink and source listsBenjamin Franzke1-1/+5
2011-12-20Get rid of chooser_main_ctl and chooser_childBenjamin Franzke1-58/+9
Use a current_ctl pointer in struct interface instead.
2011-12-19interface: Dont allocate volumebar if length is to lessBenjamin Franzke1-0/+2
2011-12-19command: Put main ctl length logic into interface.cBenjamin Franzke1-0/+8
2011-12-19Rename sink.h to ctl.hBenjamin Franzke1-1/+1
2011-12-19Rename chooser_{sink,input} to chooser_{main_ctl,child}Benjamin Franzke1-8/+10
2011-12-19Let sinks & sources and sink_inputs & source_outputs use same typesBenjamin Franzke1-44/+16
2011-12-19Implement "down" for both sink and source listBenjamin Franzke1-10/+41
2011-12-18Initial support for displaying source outputsBenjamin Franzke1-0/+3
2011-12-18Initial support for printing available sourcesBenjamin Franzke1-0/+8
2011-12-18Rename sink{,_input}_info to sink{,input}Benjamin Franzke1-5/+5
2011-12-18Move interface related properties into new interface structBenjamin Franzke1-88/+92
2011-12-18interface: (cosmetic) Move resize and clear functions aroundBenjamin Franzke1-46/+46
2011-12-18interface: Use printf precision and padding for volume bar printingBenjamin Franzke1-14/+25
2011-12-18interface: getmaxx is not standard, use getmaxyx insteadBenjamin Franzke1-2/+3
2011-12-18interface: Stop keeping track of cursor position ourselfBenjamin Franzke1-20/+20
2011-12-18interface: Unify drawing code for sinks and inputsBenjamin Franzke1-72/+39
They are drawn from the same function that calls itself recursiveley for childs of the currently drawn volume control. So its called for all sink_inputs that belong to a sink.
2011-12-18interface: Dont postfix spaces, always prefixBenjamin Franzke1-4/+4
This'll make it possible to have proper displaying when clamping ctx::max_name_len in future.
2011-12-18interface: print_volume can use vol_ctl parameter nowBenjamin Franzke1-5/+5
2011-12-18set_max_name_len: Simplify code to two calls to one helper functionBenjamin Franzke1-17/+18
2011-12-18Finally move interface_get_current_ctl into interface.cBenjamin Franzke1-0/+44
2011-12-18Rename vol_ctl_object to vol_ctlBenjamin Franzke1-1/+1
2011-12-18Unify common sink(_input) properties to a base objectBenjamin Franzke1-11/+10
2011-12-14Increase warning leaves, and fix new occured onesBenjamin Franzke1-2/+3
2011-12-13Let interface_set_status use va argsBenjamin Franzke1-2/+7
2011-12-13Add goto based error-path cleanup to mainBenjamin Franzke1-3/+5
2011-12-13Allow to quit with a non-ready contextBenjamin Franzke1-3/+0
2011-12-13Fix some leaksBenjamin Franzke1-1/+9
2011-12-13interface: Rename print_sink_list to interface_redrawBenjamin Franzke1-2/+3
2011-12-13Add a list_foreach makro for GListBenjamin Franzke1-16/+11
Saves around 1-2 lines per foreach, and should be more error prone.
2011-12-13config: Read keymap from configuration fileBenjamin Franzke1-189/+6
This needed a split of the switch that handled input before into several small callback functions.
2011-12-13sink: Remove struct typedefsBenjamin Franzke1-16/+16
2011-12-13Add config property to select display name to useBenjamin Franzke1-3/+2
2011-12-05interface: Fix unitialized variableBenjamin Franzke1-1/+1
2011-10-22interface: Derive new chooser_input directly when movingBenjamin Franzke1-26/+16
Dont schedule this until redraw, since this needed hacks to ensure we got the update.
2011-10-22interface: Dont move a sink_input if there is only one sinkBenjamin Franzke1-1/+4
2011-10-22Add License header to source filesBenjamin Franzke1-0/+19
2011-10-22Fix 80 column widthBenjamin Franzke1-28/+53
2011-10-21Fix selection when moving an input aroundBenjamin Franzke1-0/+1
We may not get the update for the moved index immediately, but we calculate the new position for the selection on redraw. So schedule redraw until we get the update, when we move around.
2011-10-21interface: Calculate offsets less oftenBenjamin Franzke1-17/+15
2011-10-21Store all input_infos in one big listBenjamin Franzke1-19/+55
This makes the lookup routines independent of each other, which allows gradual updates later.
2011-10-21Fix ident mistakes introduces by previous mass changesBenjamin Franzke1-118/+113
Variables were substituted by sed, so indentation got messed up.
2011-10-21Stop using global variables.Benjamin Franzke1-132/+114
Rather store it in a context, thats used everywhere as parameter, or as userdata.