On Sat, 2013-05-18 at 17:47 +0900, Tristan Van Berkom wrote:
> Here's an idea, ... in the GtkAssistant documentation for apply[0],
> it says:
> 
>     "The default behavior of the GtkAssistant is to switch to the page
>      after the current page, unless the current page is the last one."
> 
> Which means, you could do possibly two things:
> 
>   a.) In your derived GtkAssistant object, decide whether or not
>        to invoke the parent class ->apply() method from your own
>        ->apply() method which you override in your sublcass

Hey Tristan. Thanks for both suggestions. This first one I don't know
how to do because the GtkAssistant is being created by glade, and unless
there's some kind of Python magic I could rely on, I don't know of an
easy way to subclass it when it is already instantiated.

>   b.) Connect to the "apply" signal on an assistant which you did
>        not derive, and if the page is not valid, then just call:
>           g_signal_stop_emission_by_name (assistant, "apply");
>        to avoid the default behaviour of switching pages.
> 
> Both 'a' and 'b' would have the same effect (I have a preference
> for 'a' since I feel like 'b' is a sort of hack, but that's just my 
> preference).

'b' is definitely a hack, but it might do the trick if I can get it to
work. I am trying the following,

        assistant.stop_emission("apply")

, except that the assistant still advances to the next page regardless.
Hmm...

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to