summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2013-09-11 07:32:14 +0200
committerSven Eden <yamakuzure@gmx.net>2013-09-11 07:32:14 +0200
commite40b5a85d8ad6e97828b989164db3fcb5264c31b (patch)
tree09d8b10df4a425959734dc7371cbde6d41ea537b /ufed-curses.c
parentToggling description display using F9/F10 needs a full draw() (diff)
downloadufed-e40b5a85d8ad6e97828b989164db3fcb5264c31b.tar.gz
ufed-e40b5a85d8ad6e97828b989164db3fcb5264c31b.tar.bz2
ufed-e40b5a85d8ad6e97828b989164db3fcb5264c31b.zip
Changed the indicator to show F9/F10 state as well, now in a condensed 4-char-limited line that needs less space.
Diffstat (limited to 'ufed-curses.c')
-rw-r--r--ufed-curses.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/ufed-curses.c b/ufed-curses.c
index 8441c56..2428cfd 100644
--- a/ufed-curses.c
+++ b/ufed-curses.c
@@ -331,15 +331,24 @@ void drawStatus(bool withSep)
mvwaddstr(w, 0, minwidth + 5, "Si"); // Scope, installed
mvwaddch (w, 0, minwidth + 7, ACS_VLINE); // After scope
- // Use the unused right side to show the filter status
- sprintf(buf, "%*s%-6s / %-13s / %-6s] ",
- max(2, iWidth - 40 - minwidth), " [",
- eScope_global == e_scope ? "global" :
- eScope_local == e_scope ? "local" : "all",
- eState_installed == e_state ? "installed" :
- eState_notinstalled == e_state ? "not installed" : "all",
- eMask_masked == e_mask ? "masked" :
- eMask_unmasked == e_mask ? "normal" : "all");
+ /* Use the unused right side to show the filter status
+ * The Order and layout is:
+ * [Scope|State|Mask|Order|Desc] with
+ * all items limited to four characters.
+ * 5 * 4 = 20
+ * + 2 brackets = 22
+ * + 4 pipes = 26
+ */
+ sprintf(buf, "%*s%-4s|%-4s|%-4s|%-4s|%-4s] ",
+ max(2, iWidth - 33 - minwidth), " [",
+ eScope_global == e_scope ? "glob"
+ : eScope_local == e_scope ? "loca" : "all",
+ eState_installed == e_state ? "inst"
+ : eState_notinstalled == e_state ? "noti" : "all",
+ eMask_masked == e_mask ? "mask"
+ : eMask_unmasked == e_mask ? "norm" : "all",
+ eOrder_left == e_order ? "left" : "righ",
+ eDesc_ori == e_desc ? "orig" : "stri");
waddstr(w, buf);
}