diff --git a/toxygen/mainscreen.py b/toxygen/mainscreen.py index 669ec65..834ae32 100644 --- a/toxygen/mainscreen.py +++ b/toxygen/mainscreen.py @@ -567,13 +567,15 @@ class MainWindow(QtWidgets.QMainWindow, Singleton): def call_finished(self): self.update_call_state('call') - def update_call_state(self, fl): + def update_call_state(self, state): os.chdir(curr_directory() + '/images/') - pixmap = QtGui.QPixmap(curr_directory() + '/images/{}.png'.format(fl)) + + pixmap = QtGui.QPixmap(curr_directory() + '/images/{}.png'.format(state)) icon = QtGui.QIcon(pixmap) self.callButton.setIcon(icon) self.callButton.setIconSize(QtCore.QSize(50, 50)) - pixmap = QtGui.QPixmap(curr_directory() + '/images/{}_video.png') + + pixmap = QtGui.QPixmap(curr_directory() + '/images/{}_video.png'.format(state)) icon = QtGui.QIcon(pixmap) self.videocallButton.setIcon(icon) self.videocallButton.setIconSize(QtCore.QSize(35, 35)) diff --git a/toxygen/profile.py b/toxygen/profile.py index b479cb1..32d9abd 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -1257,7 +1257,7 @@ class Profile(basecontact.BaseContact, Singleton): if hasattr(self, '_call_widget'): self._call_widget[friend_number].close() del self._call_widget[friend_number] - threading.Timer(3.0, lambda: cv2.destroyWindow(str(friend_number))).start() + threading.Timer(2.0, lambda: cv2.destroyWindow(str(friend_number))).start() friend = self.get_friend_by_number(friend_number) friend.append_message(InfoMessage(text, time.time())) if friend_number == self.get_active_number():