Re: a Wizard/Druid/Assistant widget for gtk



> Matthias Clasen wrote:
> 
> >>>void gtk_assistant_set_buttons_sensitive (GtkAssistant  *assistant,
> >>>                                          gboolean      
> back_sensitive,
> >>>                                          gboolean      
> >>>forward_sensitive, 
> >>>                                          gboolean      
> >>>cancel_sensitive);
> >>>      
> >>>
> >>What about finish?  Is that a different button?
> >>    
> >>
> >
> >I think I explained that in the docs further down: Since only on
> >forward-going (i.e. next/finish/close) button will be displayed at a
> >time, it is enough to have one flag controlling their visibility. 
> >  
> >
> Eclipse often has wizards with both Next and Finish buttons visible. 
> They change sensitivity depending on selected options or entered text. 
> It is used in such situations: there are other pages with additional 
> options or preview, and you can go to them by pressing Next. However, 
> you can go with defaults or don't look at preview by pressing Finish.
> 
> Other times the only Finish button is replaced by Next if depending on 
> selected options another step is required. 
>
> All of that is quite convenient, I don't think it would be a good thing 
> to prevent doing that in API.

Maybe I followed the Java LAF too closely here. The argument is that
there should be a confirmation page summarising the settings made by the 
user/action which the wizard will do. That is the page containing the finish
button. The finish button you're thinking of would be an "early exit to the
confirmation page", which has the obvious usability problem that the user 
doesn't know which steps he would skip by choosing it. A better design might
be to have a checkbox on the page saying "allow me to do blah, blah and
blah".
If the user deselects it before pressing next, you can directly go to the
confirmation 
page.

> Another problem with this function is that you often want to change 
> sensitivity of only one button (Next or Finish), and leave others as is. 
> I doubt you ever need to disable back or cancel buttons at all?

The current code works by always making all visible buttons sensitive before
emitting ::prepare.
If you need to make visible buttons insensitive, you can do that by calling
gtk_assistant_set_buttons_sensitive () from the ::prepare handler. 
Again following the Java LAF, the back, cancel and next buttons on a
progress page should be 
insensitive until the operation is completed or explicitly stopped by the
user (there should be a 
stop button on the page).

Matthias

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post




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