Commits

TK Soh committed dc3837f

history: prevent delete events from killing the filter dialog

which caused the filter dialog to appear hangup on reopening, if
the dialog had been previously closed by the delete events, for e.g.
by clicking the [X] button on the dialogs' title bar, or pressing
Alt-F4 (in Windows)

Comments (0)

Files changed (1)

         def close_filter_dialog(dialog, response_id):
             dialog.hide()
 
+        def delete_event(dialog, event, data=None):
+            # return True to prevent the dialog from being destroyed
+            return True     
+
         revs = []
         if self.currow is not None:
             revs.append(self.currow[treemodel.REVID])
         dlg = FilterDialog(self.repo.root, revs, self.pats,
                 filterfunc=do_reload)
         dlg.connect('response', close_filter_dialog)
+        dlg.connect('delete-event', delete_event)
         dlg.set_modal(False)
         dlg.show()