Le mardi 22 novembre 2005 à 15:20 -0500, ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN a écrit : > 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?
I had this problem with GChemPaint a long time ago. To solve it, I use the "expose-event" signal for the child widget. When this signal is fired, I check the state of the current active page, and if the validation fails, I use gtk_notebook_set_current_page to set the active page. http://savannah.nongnu.org/cgi-bin/viewcvs/gchempaint/gchempaint/src/standaloneapp.cc the code is in : gcpStandaloneApp::SetActive (gcpDocument* pDoc, GtkWidget* w) (line 963 or so). This code is somewhat old now, so I can't remember why I could not use the GtkNotebook signals... so there might beis a better solution ;-) > If someone can explain these in a bit more detail, we could update the > function > comments so the docs are more clear. > > Thanks, > > Andrew > Bloomberg LP > > > > _______________________________________________ > gtk-devel-list mailing list > gtk-devel-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-devel-list > _______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list