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

Re: Progress bar cancellation



Colin Watson wrote:
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.

For sure the cancel button is very useful, but i'm wondering what's the best way to implement it in the GTK frontend: two options came to my mind

-Graying out "screenshot", "back" and "next" buttons (without hiding them) and adding a "Cancel" button below the progressbar that is displayed only when the progressbar runs

-Hiding "progress" and "back" buttons and turning "next" into "Cancel" when the progressbar runs, to revert buttons back to their original state later, when a question is displayed by gtk_go()

ciao

Attilio



Reply to: