Merge branch 'develop' into chat

This commit is contained in:
Saptak S 2020-05-02 02:49:49 +05:30
commit 22732b8c41
14 changed files with 1027 additions and 98 deletions

View file

@ -284,7 +284,5 @@ class MainWindow(QtWidgets.QMainWindow):
e.accept()
def cleanup(self):
for index in range(self.tabs.count()):
tab = self.tabs.widget(index)
tab.cleanup()
self.tabs.cleanup()
self.common.gui.onion.cleanup()

View file

@ -79,6 +79,16 @@ class TabWidget(QtWidgets.QTabWidget):
self.observer.schedule(self.event_handler, self.common.gui.events_dir)
self.observer.start()
def cleanup(self):
# Stop the event thread
self.observer.stop()
self.observer.join()
# Clean up each tab
for index in range(self.count()):
tab = self.widget(index)
tab.cleanup()
def move_new_tab_button(self):
# Find the width of all tabs
tabs_width = sum(