ui fixes for video
This commit is contained in:
parent
8bc4613407
commit
0a378c1682
@ -7,7 +7,6 @@ import wave
|
|||||||
import settings
|
import settings
|
||||||
from util import curr_directory
|
from util import curr_directory
|
||||||
|
|
||||||
# TODO: widget for video
|
|
||||||
# TODO: improve IncomingCallWidget
|
# TODO: improve IncomingCallWidget
|
||||||
|
|
||||||
|
|
||||||
@ -56,7 +55,7 @@ class IncomingCallWidget(widgets.CenteredWidget):
|
|||||||
self.call_type.setText(text)
|
self.call_type.setText(text)
|
||||||
pr = profile.Profile.get_instance()
|
pr = profile.Profile.get_instance()
|
||||||
self.accept_audio.clicked.connect(lambda: pr.accept_call(friend_number, True, False) or self.stop())
|
self.accept_audio.clicked.connect(lambda: pr.accept_call(friend_number, True, False) or self.stop())
|
||||||
self.accept_video.clicked.connect(lambda: pr.accept_call(friend_number, True, True))
|
self.accept_video.clicked.connect(lambda: pr.accept_call(friend_number, True, True) or self.stop())
|
||||||
self.decline.clicked.connect(lambda: pr.stop_call(friend_number, False) or self.stop())
|
self.decline.clicked.connect(lambda: pr.stop_call(friend_number, False) or self.stop())
|
||||||
|
|
||||||
class SoundPlay(QtCore.QThread):
|
class SoundPlay(QtCore.QThread):
|
||||||
|
@ -14,6 +14,8 @@ import avwidgets
|
|||||||
import plugin_support
|
import plugin_support
|
||||||
import basecontact
|
import basecontact
|
||||||
import items_factory
|
import items_factory
|
||||||
|
import cv2
|
||||||
|
import threading
|
||||||
|
|
||||||
|
|
||||||
class Profile(basecontact.BaseContact, Singleton):
|
class Profile(basecontact.BaseContact, Singleton):
|
||||||
@ -1255,6 +1257,7 @@ class Profile(basecontact.BaseContact, Singleton):
|
|||||||
if hasattr(self, '_call_widget'):
|
if hasattr(self, '_call_widget'):
|
||||||
self._call_widget[friend_number].close()
|
self._call_widget[friend_number].close()
|
||||||
del self._call_widget[friend_number]
|
del self._call_widget[friend_number]
|
||||||
|
threading.Timer(3.0, lambda: cv2.destroyWindow(str(friend_number))).start()
|
||||||
friend = self.get_friend_by_number(friend_number)
|
friend = self.get_friend_by_number(friend_number)
|
||||||
friend.append_message(InfoMessage(text, time.time()))
|
friend.append_message(InfoMessage(text, time.time()))
|
||||||
if friend_number == self.get_active_number():
|
if friend_number == self.get_active_number():
|
||||||
|
Loading…
Reference in New Issue
Block a user