From 4d4fd21fe973cae278c16e10ae269edd20585a0f Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 20 Jun 2017 19:41:08 +0300 Subject: [PATCH] removed audio/video messages functionality. tox dns fixed --- toxygen/avwidgets.py | 26 -------------------------- toxygen/images/audio_message.png | Bin 4295 -> 0 bytes toxygen/images/video_message.png | Bin 3671 -> 0 bytes toxygen/mainscreen_widgets.py | 25 ++++++------------------- toxygen/tox_dns.py | 3 ++- 5 files changed, 8 insertions(+), 46 deletions(-) delete mode 100755 toxygen/images/audio_message.png delete mode 100755 toxygen/images/video_message.png diff --git a/toxygen/avwidgets.py b/toxygen/avwidgets.py index 9280f2a..8c81387 100644 --- a/toxygen/avwidgets.py +++ b/toxygen/avwidgets.py @@ -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() - - diff --git a/toxygen/images/audio_message.png b/toxygen/images/audio_message.png deleted file mode 100755 index 22ba2a053911650a480dce7444960f1902cfa7b0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4295 zcmV;&5IFCNP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59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7L$3LBVDC9;%95Va*#z9=GkRAbo`PBeJc4=Gek!K4&xxaM!vz0N1AMNW zdXOd;KJ1j~l81mhfEzIj4{9T%@gHyo_!;wV=5ydDIcBZ$@I8h{f%oL^TFiXda%uZ7 z3;5jYGBe-^oLnexYkSWCzsl1-9s%Tdo?zq=$c&c)Q6MS>qCiv%M1iOjhyqb55Cx)A zASwl-KvWgUw)Y{IVBT>At*x2BEPM-FZ&Z-`n-g-Ki`mNUDv(mG#B7B-9dez6iOU|O zc3^!7xN6J-yxV|(6iE3RQVm=gLs|u*EtH!e+5&L(A?nms3Phzq6o@Lny{sYNE8yRh p@|z`Nka1fIAol$ss_E(f0RZ5cK`mVAFQ)(i002ovPDHLkV1jJ^?a}}M diff --git a/toxygen/images/video_message.png b/toxygen/images/video_message.png deleted file mode 100755 index 37603ce69a04fa268c3a540ae5ef9b2e7c658f85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3671 zcma)8c{tQ>*Z*2#>|-ZJGsu>G-_2rQvt>kuVo28Xvqdx3u|$&Hh)Q;e8oL-fA!OgO zB}8Rulne`rLE8iTrusG#F%cVV5x*< zEI|seev0hw=vrKnhU4gkeE~42<`(Sku@D7t5U#0tNwAf+1)vBTWdH%KW;w00{IRDj z8^|n23TzZbYe0&s2?)ypz(bOdF9End1(uL0Vh!X|15W)nU6z5%Qh<}_gU_P?mT-_2 zN&z@LfpJpgrvOlPSG+FZt^t$}U5VEN(6RuBn@NWnFewGd8riuS0#&s@>mZn+8UQf@ zvX=O0aez7$aOx2f3Id|C01o{fJIx=LD#2?KXG&#NYt{>^>ERqeQhu~{cG3c3gGSt! zIFy|!owMQ6q~I)Gd7L84r``7eke|YN*6r?b&>(Z=;Gl96k@<$y#ygr*K^K?hlhvUz zUpN3P280ivNXpcl$7;}Ey-uE8+@^NF&X9kPoZwc?0)GqSuTR_U`u@>Iui#Pr)YR(A z%A|1z(!sgUF6;zDy3uNPeCJoV<`H@SQ_GStPW~FsfcoGQ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{0sGqPZ~Wy%M$(8}C<4eNplidC+0xv&MQ2Jw;ff<3KgkbEgY=1-V8 zE-V}lg@VB#5H&R=B?S%(2hRNef`ET8|7LykYxy0$RrU~_d@B1Rcz}!F;3zJXinT+X z9OERA34Jyx$n)BiQJ3eQ3u|91JPP)txtF>P&=pz#e~fcDx?QO-l(0H0(CZ_Pc$S$q?1P@)^CaTN{kZSz5#X zRC6r4LC(5Gr7IWybon!1T?J2oMU}f>kfret)ikdNkdTG2->BJ~_ko7h`VzEv-!NEv zgS~~$ubj`w@kqgAK~t6CI`#PFC5X}m4*B2bB$JRnDr8(|j)0&zSuK%{ga<8&{f4a; z!%dU5iVUY@-5?`=fC>T*6?g>(Nj@-V1DTkeDEoU+BHq0FF3m*(gGk@;(W<84DA*tC z;fqlKEy*IlG4OxbKNGqLRc2i4(m!SYcgg=h(ErZs@4_Ps5VbO17pe&{0#S1@=|Mqy zP}Qd(>QUW4x1g_Vpp~a0lnAju*7i#mnkho*ylJ;(S^%P^uwWK;G%1xo>xXgt>;R@+8nP$_Ui4O6FAa%?gHH^h&FhO z%DvlJ<-wLl87$9+Ny}FG{EAB@oE!FOL!*(`rh`w$%{(`59Ox4WpIX@5VgV8G>- zYGu^U&xS)%PM3gR6I=~T*!nGe}8$6Pg7i7r8OmMoNBrs^Q29(BS{uw{qHPb1utpEM^|7`*OHHrU%{$ox4X8jAYK0XHk cr>9iF_tm%t=(rv4+2#U9dgi*7NT-PZ0d2&0?EnA( diff --git a/toxygen/mainscreen_widgets.py b/toxygen/mainscreen_widgets.py index 74ae20f..ed0d94e 100644 --- a/toxygen/mainscreen_widgets.py +++ b/toxygen/mainscreen_widgets.py @@ -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 diff --git a/toxygen/tox_dns.py b/toxygen/tox_dns.py index 76614a4..26b9619 100644 --- a/toxygen/tox_dns.py +++ b/toxygen/tox_dns.py @@ -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'))