Re: GtkNotebook signals
- From: Todd Berman <tberman off net>
- To: Jean Bréfort <jean brefort normalesup org>
- Cc: GTK-DEVEL-LIST gnome org, "ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN" <apaprocki bloomberg net>
- Subject: Re: GtkNotebook signals
- Date: Wed, 23 Nov 2005 11:46:27 -0800
On Wed, 2005-11-23 at 08:41 +0100, Jean Br�rt wrote:
> Le mardi 22 novembre 2005 �5:20 -0500, ANDREW PAPROCKI, BLOOMBERG/ 731
> LEXIN a �it :
> > Can someone fill me in if there is proper documentation for the signals on
> > GtkNotebook? Specifically, these:
> >
> > "change-current-page"
> > "focus-tab"
> > "select-page"
> > "switch-page"
> >
> > If an application wishes to prevent the notebook from switching pages if some
> > type of validation fails on the current existing page, is "select-page" the
> > proper signal to use with a return of FALSE?
>
Since gtk+ is an object oriented toolkit (it is, right?), the proper way
(and way we have solved it here) is to create a subclass of GtkNotebook,
override the default switch-page handler, and only call down to the base
handler (that actually switches the page) if your validation allows the
switch. Otherwise, just return out of your new default handler.
--Todd
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]