Made URL selectable by mouse and keyboard, commented out self.copy_url() to prevent overwriting clipboard

This commit is contained in:
codyroberts 2019-12-14 20:23:53 -06:00
parent 72dc6df362
commit 4c18a72616

View file

@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
import platform import platform
import textwrap import textwrap
from PyQt5 import QtCore, QtWidgets, QtGui from PyQt5 import QtCore, QtWidgets, QtGui
from PyQt5.QtCore import Qt
from onionshare import strings from onionshare import strings
@ -152,6 +153,7 @@ class ServerStatus(QtWidgets.QWidget):
self.url.setWordWrap(True) self.url.setWordWrap(True)
self.url.setMinimumSize(self.url.sizeHint()) self.url.setMinimumSize(self.url.sizeHint())
self.url.setStyleSheet(self.common.css["server_status_url"]) self.url.setStyleSheet(self.common.css["server_status_url"])
self.url.setTextInteractionFlags(Qt.TextSelectableByMouse | Qt.TextSelectableByKeyboard)
self.copy_url_button = QtWidgets.QPushButton(strings._("gui_copy_url")) self.copy_url_button = QtWidgets.QPushButton(strings._("gui_copy_url"))
self.copy_url_button.setFlat(True) self.copy_url_button.setFlat(True)
@ -483,7 +485,7 @@ class ServerStatus(QtWidgets.QWidget):
The server has finished starting. The server has finished starting.
""" """
self.status = self.STATUS_STARTED self.status = self.STATUS_STARTED
self.copy_url() # self.copy_url()
self.update() self.update()
self.server_started_finished.emit() self.server_started_finished.emit()