From 1860fb3a9275be1ed3567d561030f478fcbb2351 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Wed, 19 Sep 2018 19:36:16 -0700 Subject: [PATCH] Remove upload/download toggle buttons --- onionshare_gui/mode.py | 1 + onionshare_gui/receive_mode/__init__.py | 19 ------------------- onionshare_gui/share_mode/__init__.py | 19 ------------------- share/images/download_window_gray.png | Bin 440 -> 0 bytes share/images/download_window_green.png | Bin 761 -> 0 bytes share/images/upload_window_gray.png | Bin 298 -> 0 bytes share/images/upload_window_green.png | Bin 483 -> 0 bytes 7 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 share/images/download_window_gray.png delete mode 100644 share/images/download_window_green.png delete mode 100644 share/images/upload_window_gray.png delete mode 100644 share/images/upload_window_green.png diff --git a/onionshare_gui/mode.py b/onionshare_gui/mode.py index 4c21de76..dad58bf3 100644 --- a/onionshare_gui/mode.py +++ b/onionshare_gui/mode.py @@ -78,6 +78,7 @@ class Mode(QtWidgets.QWidget): # Layout self.layout = QtWidgets.QVBoxLayout() self.layout.addWidget(self.primary_action) + self.layout.addStretch() # Hack to allow a minimum width on self.layout min_width_widget = QtWidgets.QWidget() min_width_widget.setMinimumWidth(450) diff --git a/onionshare_gui/receive_mode/__init__.py b/onionshare_gui/receive_mode/__init__.py index 0f3105e1..74b67e32 100644 --- a/onionshare_gui/receive_mode/__init__.py +++ b/onionshare_gui/receive_mode/__init__.py @@ -53,12 +53,6 @@ class ReceiveMode(Mode): self.new_upload = False # For scrolling to the bottom of the uploads list # Information about share, and show uploads button - self.info_show_uploads = QtWidgets.QToolButton() - self.info_show_uploads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/upload_window_gray.png'))) - self.info_show_uploads.setCheckable(True) - self.info_show_uploads.toggled.connect(self.uploads_toggled) - self.info_show_uploads.setToolTip(strings._('gui_uploads_window_tooltip', True)) - self.info_in_progress_uploads_count = QtWidgets.QLabel() self.info_in_progress_uploads_count.setStyleSheet(self.common.css['mode_info_label']) @@ -72,7 +66,6 @@ class ReceiveMode(Mode): self.info_layout.addStretch() self.info_layout.addWidget(self.info_in_progress_uploads_count) self.info_layout.addWidget(self.info_completed_uploads_count) - self.info_layout.addWidget(self.info_show_uploads) self.info_widget = QtWidgets.QWidget() self.info_widget.setLayout(self.info_layout) @@ -189,7 +182,6 @@ class ReceiveMode(Mode): self.uploads_in_progress = 0 self.update_uploads_completed() self.update_uploads_in_progress() - self.info_show_uploads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/upload_window_gray.png'))) self.uploads.reset() def update_uploads_completed(self): @@ -211,7 +203,6 @@ class ReceiveMode(Mode): image = self.common.get_resource_path('images/share_in_progress_none.png') else: image = self.common.get_resource_path('images/share_in_progress.png') - self.info_show_uploads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/upload_window_green.png'))) self.info_in_progress_uploads_count.setText(' {1:d}'.format(image, self.uploads_in_progress)) self.info_in_progress_uploads_count.setToolTip(strings._('info_in_progress_uploads_tooltip', True).format(self.uploads_in_progress)) @@ -226,13 +217,3 @@ class ReceiveMode(Mode): # Resize window self.adjustSize() - - def uploads_toggled(self, checked): - """ - When the 'Show/hide uploads' button is toggled, show or hide the uploads window. - """ - self.common.log('ReceiveMode', 'toggle_uploads') - if checked: - self.uploads.show() - else: - self.uploads.hide() diff --git a/onionshare_gui/share_mode/__init__.py b/onionshare_gui/share_mode/__init__.py index 28881220..a9c6e8d7 100644 --- a/onionshare_gui/share_mode/__init__.py +++ b/onionshare_gui/share_mode/__init__.py @@ -79,12 +79,6 @@ class ShareMode(Mode): self.info_label = QtWidgets.QLabel() self.info_label.setStyleSheet(self.common.css['mode_info_label']) - self.info_show_downloads = QtWidgets.QToolButton() - self.info_show_downloads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/download_window_gray.png'))) - self.info_show_downloads.setCheckable(True) - self.info_show_downloads.toggled.connect(self.downloads_toggled) - self.info_show_downloads.setToolTip(strings._('gui_downloads_window_tooltip', True)) - self.info_in_progress_downloads_count = QtWidgets.QLabel() self.info_in_progress_downloads_count.setStyleSheet(self.common.css['mode_info_label']) @@ -99,7 +93,6 @@ class ShareMode(Mode): self.info_layout.addStretch() self.info_layout.addWidget(self.info_in_progress_downloads_count) self.info_layout.addWidget(self.info_completed_downloads_count) - self.info_layout.addWidget(self.info_show_downloads) self.info_widget = QtWidgets.QWidget() self.info_widget.setLayout(self.info_layout) @@ -316,16 +309,6 @@ class ShareMode(Mode): # Resize window self.adjustSize() - def downloads_toggled(self, checked): - """ - When the 'Show/hide downloads' button is toggled, show or hide the downloads window. - """ - self.common.log('ShareMode', 'toggle_downloads') - if checked: - self.downloads.show() - else: - self.downloads.hide() - def reset_info_counters(self): """ Set the info counters back to zero. @@ -334,7 +317,6 @@ class ShareMode(Mode): self.downloads_in_progress = 0 self.update_downloads_completed() self.update_downloads_in_progress() - self.info_show_downloads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/download_window_gray.png'))) self.downloads.reset() def update_downloads_completed(self): @@ -356,7 +338,6 @@ class ShareMode(Mode): image = self.common.get_resource_path('images/share_in_progress_none.png') else: image = self.common.get_resource_path('images/share_in_progress.png') - self.info_show_downloads.setIcon(QtGui.QIcon(self.common.get_resource_path('images/download_window_green.png'))) self.info_in_progress_downloads_count.setText(' {1:d}'.format(image, self.downloads_in_progress)) self.info_in_progress_downloads_count.setToolTip(strings._('info_in_progress_downloads_tooltip', True).format(self.downloads_in_progress)) diff --git a/share/images/download_window_gray.png b/share/images/download_window_gray.png deleted file mode 100644 index bf9c168ef72f8c49afdaa4ba0be7eac407d072db..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 440 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$0wn*`OvwRKEa{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8ZEE?e4U2r-o{kZwy(p zCYaOiKy8DKpM!wl(NmY)1w?eWcv^9@Dn_`syoq|kUUbUxumPh|b)L+Ft2_Jcgo3TS ze0`UmGnvut!*KA_CJt`Fw6h+ES533jo&E88eAI^bhi2+BI=(!zIk0JA^v|TM!*dy5 zb}#z&?DWLaKQDF$eO>zT!igih{f{53S{EwiD)?yex_lKsRk@HGW%EzIoyAe%B)wI( zGVR5s2;NsWH=8!s*EMM$P<85`5A=&_iEBhjN@7W>RdP`(kYX@0FtpG$Fw!+L4>2^e zGPSfaG|)CQv@$SApZeeliiX_$l+3hBbPX0(rsfb0JDxKO0W~mqy85}Sb4q9e0MrVb Ay8r+H diff --git a/share/images/download_window_green.png b/share/images/download_window_green.png deleted file mode 100644 index 8f9a899b1d3b4535755ae69894e61a3a27c8c4a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 761 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$3?vg*uel1OSkfJR9T^xl_H+M9WCijSl0AZa z85pY67#JE_7#My5g&JNkFq9fFFuY1&V6d9Oz#v{QXIG#N0|O&>fKP}kP(j!s{ZaJ) z|Nkp?lWzfoBfKQYFBlk-$A0`crr`7Imrua&-+_UD{sgh{#r^pc&&Q^@o;*sX2&I%JiVDDj$bks6%!K{785nPwEFU?lP6D}IC<*w zYUi_yKvBY&kSaCQELJ2)*&9;qb~sPuXnZSl@hR zZ*tI(=`3*NN(72z;YDq^~Y?{>8a1}n4b+yV@msCD=RF}|}tqkgn+WyjaZh4ciur=E^o7HPh zS?PMrnRSDW`FGr%r-lbFL|pz~Ri5Lbabv^F3#}q^i^J`*o*a?Chc6!YYg-TgQu&X%Q~loCIHg9Y|H=v diff --git a/share/images/upload_window_green.png b/share/images/upload_window_green.png deleted file mode 100644 index 652ddaffab94dc23d69039aaf2099bf00585d5fb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 483 zcmeAS@N?(olHy`uVBq!ia0vp^JRr=$3?vg*uer*=z{ncl6XF_nNPmQ*|NsBz#!j9G z3>U_dAirP+hi5m^K%69RcNc~ZR#^`qhqJ&VvY3H^TNs2H8D`Cq01C2~c>21sKVoHN zFqe6gFj)X76z=Kb7{YNq`NOAgAHRO)|G>?|#h17ty@A=Et(fIFpOd7da?2Jc=dFo3 zQv(zNS~o0BO>uU9`b2a=(4vJ4lL~DAEL_M`z*nB3!9VA)oYX1C=LSZGn;SA1X0!9? U^LuFs01boFyt=akR{0Du#)E&u=k