Hello, I use a Notebook widget. I added the following callback to the 'switch-page' signal:
def __onNoteBookSwitchedPage(self, widget, page, page_num): if page_num == 0 and self._model.camera.lens.type_ == 'fisheye': controller = WarningMessageController(_("Warning"), _("Can't set shooting mode")) controller.run() self.notebook.set_current_page(1) # Does not work!!! else: if page_num == 0: self._model.mode = 'mosaic' else: self._model.mode = 'preset' As you can see, depending of a config. parameter (self._model.camera.lens.type_), I show a warning saying that the selected TAB can't be used. I would like to stay on the current tab, but as soon as the warning is closed, the selected tab is shown; the self.notebook.set_current_page(1) call does not seem to work. Why ? If I change some widgets, here, it works; why not the Notebook? Thanks, -- Frédéric http://www.gbiloba.org _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/