removed audio/video messages functionality. tox dns fixed
This commit is contained in:
parent
6cbacef95b
commit
4d4fd21fe9
@ -132,29 +132,3 @@ class IncomingCallWidget(widgets.CenteredWidget):
|
||||
|
||||
def set_pixmap(self, pixmap):
|
||||
self.avatar_label.setPixmap(pixmap)
|
||||
|
||||
|
||||
class AudioMessageRecorder(widgets.CenteredWidget):
|
||||
|
||||
def __init__(self, friend_number, name):
|
||||
super(AudioMessageRecorder, self).__init__()
|
||||
self.label = QtWidgets.QLabel(self)
|
||||
self.label.setGeometry(QtCore.QRect(10, 20, 250, 20))
|
||||
text = QtWidgets.QApplication.translate("MenuWindow", "Send audio message to friend {}")
|
||||
self.label.setText(text.format(name))
|
||||
self.record = QtWidgets.QPushButton(self)
|
||||
self.record.setGeometry(QtCore.QRect(20, 100, 150, 150))
|
||||
|
||||
self.record.setText(QtWidgets.QApplication.translate("MenuWindow", "Start recording"))
|
||||
self.record.clicked.connect(self.start_or_stop_recording)
|
||||
self.recording = False
|
||||
self.friend_num = friend_number
|
||||
|
||||
def start_or_stop_recording(self):
|
||||
if not self.recording:
|
||||
self.recording = True
|
||||
self.record.setText(QtWidgets.QApplication.translate("MenuWindow", "Stop recording"))
|
||||
else:
|
||||
self.close()
|
||||
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.6 KiB |
@ -207,8 +207,8 @@ class DropdownMenu(QtWidgets.QWidget):
|
||||
super(DropdownMenu, self).__init__(parent)
|
||||
self.installEventFilter(self)
|
||||
self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
|
||||
self.setMaximumSize(180, 120)
|
||||
self.setMinimumSize(180, 120)
|
||||
self.setMaximumSize(120, 120)
|
||||
self.setMinimumSize(120, 120)
|
||||
self.screenshotButton = QRightClickButton(self)
|
||||
self.screenshotButton.setGeometry(QtCore.QRect(0, 60, 60, 60))
|
||||
self.screenshotButton.setObjectName("screenshotButton")
|
||||
@ -217,15 +217,9 @@ class DropdownMenu(QtWidgets.QWidget):
|
||||
self.fileTransferButton.setGeometry(QtCore.QRect(60, 60, 60, 60))
|
||||
self.fileTransferButton.setObjectName("fileTransferButton")
|
||||
|
||||
self.audioMessageButton = QtWidgets.QPushButton(self)
|
||||
self.audioMessageButton.setGeometry(QtCore.QRect(120, 60, 60, 60))
|
||||
|
||||
self.smileyButton = QtWidgets.QPushButton(self)
|
||||
self.smileyButton.setGeometry(QtCore.QRect(0, 0, 60, 60))
|
||||
|
||||
self.videoMessageButton = QtWidgets.QPushButton(self)
|
||||
self.videoMessageButton.setGeometry(QtCore.QRect(120, 0, 60, 60))
|
||||
|
||||
self.stickerButton = QtWidgets.QPushButton(self)
|
||||
self.stickerButton.setGeometry(QtCore.QRect(60, 0, 60, 60))
|
||||
|
||||
@ -233,22 +227,17 @@ class DropdownMenu(QtWidgets.QWidget):
|
||||
icon = QtGui.QIcon(pixmap)
|
||||
self.fileTransferButton.setIcon(icon)
|
||||
self.fileTransferButton.setIconSize(QtCore.QSize(50, 50))
|
||||
|
||||
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/screenshot.png')
|
||||
icon = QtGui.QIcon(pixmap)
|
||||
self.screenshotButton.setIcon(icon)
|
||||
self.screenshotButton.setIconSize(QtCore.QSize(50, 60))
|
||||
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/audio_message.png')
|
||||
icon = QtGui.QIcon(pixmap)
|
||||
self.audioMessageButton.setIcon(icon)
|
||||
self.audioMessageButton.setIconSize(QtCore.QSize(50, 50))
|
||||
|
||||
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/smiley.png')
|
||||
icon = QtGui.QIcon(pixmap)
|
||||
self.smileyButton.setIcon(icon)
|
||||
self.smileyButton.setIconSize(QtCore.QSize(50, 50))
|
||||
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/video_message.png')
|
||||
icon = QtGui.QIcon(pixmap)
|
||||
self.videoMessageButton.setIcon(icon)
|
||||
self.videoMessageButton.setIconSize(QtCore.QSize(55, 55))
|
||||
|
||||
pixmap = QtGui.QPixmap(util.curr_directory() + '/images/sticker.png')
|
||||
icon = QtGui.QIcon(pixmap)
|
||||
self.stickerButton.setIcon(icon)
|
||||
@ -256,8 +245,6 @@ class DropdownMenu(QtWidgets.QWidget):
|
||||
|
||||
self.screenshotButton.setToolTip(QtWidgets.QApplication.translate("MenuWindow", "Send screenshot"))
|
||||
self.fileTransferButton.setToolTip(QtWidgets.QApplication.translate("MenuWindow", "Send file"))
|
||||
self.audioMessageButton.setToolTip(QtWidgets.QApplication.translate("MenuWindow", "Send audio message"))
|
||||
self.videoMessageButton.setToolTip(QtWidgets.QApplication.translate("MenuWindow", "Send video message"))
|
||||
self.smileyButton.setToolTip(QtWidgets.QApplication.translate("MenuWindow", "Add smiley"))
|
||||
self.stickerButton.setToolTip(QtWidgets.QApplication.translate("MenuWindow", "Send sticker"))
|
||||
|
||||
@ -270,7 +257,7 @@ class DropdownMenu(QtWidgets.QWidget):
|
||||
def leaveEvent(self, event):
|
||||
self.close()
|
||||
|
||||
def eventFilter(self, object, event):
|
||||
def eventFilter(self, obj, event):
|
||||
if event.type() == QtCore.QEvent.WindowDeactivate:
|
||||
self.close()
|
||||
return False
|
||||
|
@ -30,7 +30,8 @@ def tox_dns(email):
|
||||
netman.setProxy(proxy)
|
||||
for url in urls:
|
||||
try:
|
||||
request = QtNetwork.QNetworkRequest(url)
|
||||
request = QtNetwork.QNetworkRequest()
|
||||
request.setUrl(QtCore.QUrl(url))
|
||||
request.setHeader(QtNetwork.QNetworkRequest.ContentTypeHeader, "application/json")
|
||||
reply = netman.post(request, bytes(json.dumps(data), 'utf-8'))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user