Skip to content
Snippets Groups Projects
Commit 427afe01 authored by Allen, Bruce (CIV)'s avatar Allen, Bruce (CIV)
Browse files

remove spellcheck whitelist copy button

parent ac5993eb
No related branches found
No related tags found
No related merge requests found
......@@ -23,9 +23,6 @@ class Ui_SpellcheckWhitelistDialog(object):
if not SpellcheckWhitelistDialog.objectName():
SpellcheckWhitelistDialog.setObjectName(u"SpellcheckWhitelistDialog")
SpellcheckWhitelistDialog.resize(572, 320)
self.copy_pb = QPushButton(SpellcheckWhitelistDialog)
self.copy_pb.setObjectName(u"copy_pb")
self.copy_pb.setGeometry(QRect(140, 290, 83, 25))
self.close_pb = QPushButton(SpellcheckWhitelistDialog)
self.close_pb.setObjectName(u"close_pb")
self.close_pb.setGeometry(QRect(260, 290, 83, 25))
......@@ -43,7 +40,6 @@ class Ui_SpellcheckWhitelistDialog(object):
def retranslateUi(self, SpellcheckWhitelistDialog):
SpellcheckWhitelistDialog.setWindowTitle(QCoreApplication.translate("SpellcheckWhitelistDialog", u"MP Code Whitelist", None))
self.copy_pb.setText(QCoreApplication.translate("SpellcheckWhitelistDialog", u"Copy", None))
self.close_pb.setText(QCoreApplication.translate("SpellcheckWhitelistDialog", u"Close", None))
# retranslateUi
......@@ -13,19 +13,6 @@
<property name="windowTitle">
<string>MP Code Whitelist</string>
</property>
<widget class="QPushButton" name="copy_pb">
<property name="geometry">
<rect>
<x>140</x>
<y>290</y>
<width>83</width>
<height>25</height>
</rect>
</property>
<property name="text">
<string>Copy</string>
</property>
</widget>
<widget class="QPushButton" name="close_pb">
<property name="geometry">
<rect>
......
......@@ -39,7 +39,6 @@ class SpellcheckWhitelistDialogWrapper(QDialog):
self.setWindowFlags(self.windowFlags() | Qt.Tool)
self.setAttribute(Qt.WA_MacAlwaysShowToolWindow)
self.setWindowTitle("MP Code Spellcheck Whitelist")
self.ui.copy_pb.setDisabled(True)
# the QPlainTextEdit view
self.view = SpellcheckWhitelistView()
......@@ -49,16 +48,10 @@ class SpellcheckWhitelistDialogWrapper(QDialog):
# connect buttons
self.view.textChanged.connect(self._text_changed)
self.ui.copy_pb.clicked.connect(self.view.copy)
self.ui.close_pb.clicked.connect(self.close) # superclass close
self.view.copyAvailable.connect(self._copy_available)
@Slot()
def _text_changed(self):
text = self.document.toPlainText()
self.spellcheck_manager.set_user_whitelist(text)
@Slot(bool)
def _copy_available(self, copy_is_available):
self.ui.copy_pb.setDisabled(not copy_is_available)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment