[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Progress bar cancellation



I've implemented cancellable progress bar support in cdebconf (0.95, not
uploaded yet). For now, it only works in the newt frontend; I looked at
implementing it in the gtk frontend too, but the way that the gtk
frontend sets all its widgets up in advance meant I had to think a bit
too much about it and gave up for now. I may do that later if nobody
beats me to it.

For obvious compatibility reasons, this isn't enabled by default; you
need to say 'db_capb progresscancel' or equivalent before starting up
the progress bar if you want to get the cancel button. Once you've done
that, the PROGRESS SET, PROGRESS STEP, and PROGRESS INFO commands may
all return 30 to indicate that the user cancelled the progress bar; you
may then do whatever's convenient in your UI, which will usually involve
either going back to the previous screen or perhaps skipping the step if
it's optional.

I haven't uploaded cdebconf 0.95 yet because I haven't tested it enough
to be sure that it won't get in the way of etch d-i beta 2, but, since
previous versions of cdebconf never returned 30 from any of the PROGRESS
subcommands, you can start using this in your udebs any time you like.
I've already added cancel buttons to the DHCP and wireless configuration
progress bars in netcfg, which were probably the most frequent cause of
users requesting this feature.

For now, the newt cancel button says "Go Back" rather than "Cancel".
I'll change this once we're out of the string freeze for beta 2.

Cheers,

-- 
Colin Watson                                       [cjwatson@debian.org]



Reply to: