On Di, 2008-12-23 at 15:46 +0100, Frédéric wrote:
> 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'
This is just a hunch, but shouldn't you be returning a boolean to
indicate whether the event should propogate further or not? My guess is
that you are selecting page 1, and then the event is handled normally
and the clicked one is selected.
Just a guess from a quick look.
Friedel
--
Recently on my blog:
http://translate.org.za/blogs/friedel/en/content/re-bringing-all-translation-management-tools-together
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/