On Fri, Nov 21, 2025 at 08:52:39AM -0800, Mike Castle wrote:
> $ dialog --version
> Version: 1.3-20250116
> 
> This is on a work machine as described here:
> https://cloud.google.com/blog/topics/developers-practitioners/how-google-got-to-rolling-linux-releases-for-desktops
> 
> XFCE DE and verified with both xfce4-terminal and xterm(398)
> 
> Can provide straces, typescripts or --trace files if needed.
> ---
> 
> First: RC files fail to parse (fg,bg) attributes.
> 
> From the generated file comment:
> # Attribute  -  (foreground,background,highlight?,underline?,reverse?)
> 
> it seems to imply that hl,ul, and rv are all optional.  But in
> reality, it fails:

no - they are not optional.
The "?" dates back to the original dialog program,
apparently meaning that the field is a boolean (ON/OFF).

I suppose some English would help...
 
> $ cat test.rc
> screen_color = (GREEN,BLACK)
> 
> $ env DIALOGRC=test.rc dialog --msgbox test 0 0
> test.rc:1: expected attribute value
> 
> init_dialog: dlg_parse_rc
> 
> Interestingly, adding just a trailing comma, without the usual ON |
> OFF seems to work:
> 
> $ cat test.rc
> screen_color = (GREEN,BLACK,)
> 
> $ env DIALOGRC=test.rc dialog --msgbox test 0 0
>                                ┌──────────────┐
>                                │ test         │
>                                ├──────────────┤
>                                │   <  OK  >   │
>                                └──────────────┘
> 
> ---
> 
> Second: It appears that Shift-TAB does not work with --tailboxbg by default.
> 
> The way I read the man page, it is implied that it should.
> 
> From Built-in Bindings:
> KEY_BTAB          backward tab-traversal, e.g., with --tailboxbg.

grep helps to see which that actually applies to:

CHANGES:2511:   + add logic for KEY_BTAB.
buildlist.c:525:        DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
calendar.c:678: DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
checklist.c:171:        DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
dialog.1:1748:KEY_BTAB/backward tab-traversal, e.g., with \fB\-\-tailboxbg\fP.
dlg_keys.h:174: DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
editbox.c:310:  DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
formbox.c:448:  DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
fselect.c:542:  DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
inputbox.c:36:  DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
menubox.c:330:  DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
rangebox.c:177: DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
textbox.c:721:  DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
timebox.c:157:  DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
treeview.c:176: DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
ui_getc.c:515:      case KEY_BTAB:
ui_getc.c:527:               isBeforeFkey(KEY_BTAB))) {

The dlg_keys.h mention is for TRAVERSE_BINDINGS, used in four widgets:

msgbox.c:43:    TRAVERSE_BINDINGS,
pause.c:58:     TRAVERSE_BINDINGS,
progressbox.c:315:      TRAVERSE_BINDINGS,
yesno.c:41:     TRAVERSE_BINDINGS,

That last file is what I had in mind (it "does" the traversal).
If there's more than one widget on the screen, then back-tab and
tab "work" for traversal between the widgets.  But it only works
if (as noted) the key is bound, and if the widget waits for keyboard input.
 
> And in the next paragraph in the Example section:
> 
> Tabs are also recognized as a special case for traversing between
> widgets, e.g., when using multiple tailboxbg widgets.

...looks like (from history) that was the initial goal, but in
redoing the keybinding several years later, I overlooked providing
that in tailboxbg's keybinding tables.

Fixing that, and reviewing the tables to see which ones could use
the TRAVERSE_BINDINGS (without interfering with existing bindings)
seems a good thing to do.
 
> In practice it does not.  But, adding the following to the RC does:
> bindkey tailbox BTAB FIELD_PREV

will see - sounds like I missed one (thanks)
 
> Third: When using --backtitle and --tailboxbg, the backtitle will
> disappear on a resize.

perhaps this is the problem:

dialog keeps a list of windows to repaint, but really only handles
resizing/repaint within the current widget.  If there are other widgets
on the screen, those won't get repainted (since resize/repaint isn't done
globally).
 
> There seems to be about a 1 second pause after the resize before the
> backtitle disappears.

perhaps this accounts for the pause - 

       --timeout secs
              Timeout  if  no user response within the given number of seconds.
              A timeout of zero seconds is ignored.
 
> I actually only noticed this after seeing some release note about it
> being fixed in the past and gave it a try.
> 
> It does NOT disappear --taibox, only with --tailboxbg and some other
> box (tried with both --msgbox and --tailbox).
> 
> ---
> 
> Cheers,
> mrc
> 
> 

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to