Re: GtkAssistant API thoughts



On Wed, 2005-09-07 at 11:29 -0400, Matthias Clasen wrote:

> After thinking some more about the different approaches here, I think I
> want to try and merge the best aspects of both patches. 
> 
> - no page objects in the API, use child properties for title, image, etc
> - ditch the "forward" and "back" signals, and use a user-specified function 
>   to compute the next page
> - derive the assistant from  GtkWindow (I don't think the GtkDialog response
>   API is a very good match for an assistant)
> - use a stack of visited pages as you do to implement "back". I don't think 
>   there is a need to specify a custom back function, it should always go back 
>   to the previous page
> - keep the page types of the first patch
> - add a per-page boolean property "complete", which indicates whether all 
>   required fields on the page have been filled in
> 
> I think by combining the "forward" function, the page types and the "complete"
> information, we can do a very good job with flow control. E.g if all pages
> following the current page are already marked complete (because they only
> contain optional fields), we can show a "finish" button (if the sequence of
> following pages ends in a page of type "confirm", we would show a "last" button
> instead, which would jump to the confirm page).

Have you thought through how it works in a GUI builder?

The "user-specified function" thing looks problematic. Signals work
better with a GUI builder (especially when a code editor is available -
you just click on the '...' button beside the signal and add the code).

Other than that I think it looks good.

Damon





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