code: def delete_event(self, widget, event, data=None):
          
          if not self.close_win:
              if self.thread.isAlive():
                  dlg = self.gui_helper.create_message_dialog("Do you want to cancel project creation?",
                                                              buttons=Gtk.ButtonsType.YES_NO)
                  response = dlg.run()
                  if response == Gtk.ResponseType.YES:
                      if self.thread.isAlive():
                          self.info_label.set_label('<span color="#FFA500">Cancelling...</span>')
                          self.dev_assistant_runner.stop()
                          self.project_canceled = True
                      else:
                          self.info_label.set_label('<span color="#008000">Done</span>')
                      self.allow_close_window()
                  dlg.destroy()
                  return True
          else:
              return False
docs: Event cancels the project creation