Frédéric wrote:
> On mercredi 24 décembre 2008, John Finlay wrote:
>
>   
>> Since you just want to stay on the same page (assuming you mean the
>> currently displayed page) then you should be able to stop the emission
>> of the 'switch-page' signal using:
>>
>> self.notebook.stop_emission('switch-page')
>>
>> which will prevent the page change.
>>     
>
> Ok, it works, thanks :)
>
> There is just a strange behaviour: once I have clicked on the blocked page 
> and showed the warning, then if I click again on the same page, 
> the 'switch-page' is not emitted anymore. I have to click on the current 
> page, and then click again on the other one.
>   
> It seems that the internal page_num var. is set to the new page. Blocking 
> the event just prevents to visualy switch to that page, but internally, 
> PyGTK thinks that he is on that page... I tried to use set_current_page(), 
> but it does not change anything.
>   
I don't see how that would happen. I guess a small self-contained 
example would illustrate the problem.

John
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to