untested support for #30

This commit is contained in:
ingvar1995 2016-09-26 21:58:14 +03:00
parent 006b3cd197
commit 8025c6a638
2 changed files with 5 additions and 0 deletions

View File

@ -183,6 +183,7 @@ class Toxygen:
self.tray.setObjectName('tray') self.tray.setObjectName('tray')
self.ms = MainWindow(self.tox, self.reset, self.tray) self.ms = MainWindow(self.tox, self.reset, self.tray)
app.aboutToQuit.connect(self.ms.close_window)
class Menu(QtGui.QMenu): class Menu(QtGui.QMenu):

View File

@ -341,6 +341,10 @@ class MainWindow(QtGui.QMainWindow, Singleton):
event.ignore() event.ignore()
self.hide() self.hide()
def close_window(self):
Settings.get_instance().closing = True
self.close()
def resizeEvent(self, *args, **kwargs): def resizeEvent(self, *args, **kwargs):
self.messages.setGeometry(0, 0, self.width() - 270, self.height() - 155) self.messages.setGeometry(0, 0, self.width() - 270, self.height() - 155)
self.friends_list.setGeometry(0, 0, 270, self.height() - 125) self.friends_list.setGeometry(0, 0, 270, self.height() - 125)