Run but_close when closing tab from tab button

This commit is contained in:
C?dric Krier 2008-03-11 20:37:02 +01:00
parent 1c54c7ac85
commit f9a671022b

View file

@ -796,6 +796,12 @@ class Main(object):
self.buttons['but_attach'].set_label(label) self.buttons['but_attach'].set_label(label)
def _sig_remove_book(self, widget, page_widget): def _sig_remove_book(self, widget, page_widget):
for page in self.pages:
if page.widget == page_widget:
if 'but_close' in page.handlers:
res = page.handlers['but_close']()
if not res:
return
self._win_del(page_widget) self._win_del(page_widget)
def _win_del(self, page_widget=None): def _win_del(self, page_widget=None):