bug with clearing history fixed, close to tray on esc

This commit is contained in:
ingvar1995 2016-05-08 00:47:10 +03:00
parent 8df2e3ebce
commit 78c376a0b0
3 changed files with 9 additions and 1 deletions

View File

@ -117,6 +117,8 @@ class Toxygen(object):
if not self.ms.isActiveWindow():
self.ms.setWindowState(self.ms.windowState() & ~QtCore.Qt.WindowMinimized | QtCore.Qt.WindowActive)
self.ms.activateWindow()
if self.ms.isHidden():
self.ms.show()
m.connect(show, QtCore.SIGNAL("triggered()"), show_window)
m.connect(exit, QtCore.SIGNAL("triggered()"), lambda: app.exit())

View File

@ -310,6 +310,12 @@ class MainWindow(QtGui.QMainWindow):
self.account_status.setGeometry(QtCore.QRect(100, 50, self.width() - 520, 25))
self.profile.update()
def keyPressEvent(self, event):
if event.key() == QtCore.Qt.Key_Escape:
self.hide()
else:
super(MainWindow, self).keyPressEvent(event)
# -----------------------------------------------------------------------------------------------------------------
# Functions which called when user click in menu
# -----------------------------------------------------------------------------------------------------------------

View File

@ -207,7 +207,7 @@ class Friend(Contact):
"""
if hasattr(self, '_message_getter'):
del self._message_getter
self._corr = filter(lambda x: x.get_type() == 2 and x.get_status() in (2, 4), self._corr)
self._corr = filter(lambda x: x.get_type() == 2 and x.get_status() in (2, 3, 4), self._corr)
self._unsaved_messages = 0
def update_transfer_data(self, file_number, status, inline=None):