1

Correctly copy Kanji defintions to clipboard

Former-commit-id: 505fff8db8eabb0abfe1f8ff8e6b411ee520563d
This commit is contained in:
Alex Yatskov 2013-11-14 08:36:26 -08:00
parent 30badd7967
commit 4423e7efc0
6 changed files with 14 additions and 5 deletions

View File

@ -221,7 +221,11 @@
<widget class="QWidget" name="dockWidgetContents_3">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTextBrowser" name="textKanjiDefs"/>
<widget class="QTextBrowser" name="textKanjiDefs">
<property name="openLinks">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ui/about.ui'
#
# Created: Mon Nov 11 15:13:30 2013
# Created: Thu Nov 14 08:32:50 2013
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ui/preferences.ui'
#
# Created: Mon Nov 11 15:13:30 2013
# Created: Thu Nov 14 08:32:50 2013
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'ui/reader.ui'
#
# Created: Mon Nov 11 15:13:30 2013
# Created: Thu Nov 14 08:32:50 2013
# by: PyQt4 UI code generator 4.10
#
# WARNING! All changes made in this file will be lost!
@ -122,6 +122,7 @@ class Ui_MainWindowReader(object):
self.verticalLayout_3 = QtGui.QVBoxLayout(self.dockWidgetContents_3)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.textKanjiDefs = QtGui.QTextBrowser(self.dockWidgetContents_3)
self.textKanjiDefs.setOpenLinks(False)
self.textKanjiDefs.setObjectName(_fromUtf8("textKanjiDefs"))
self.verticalLayout_3.addWidget(self.textKanjiDefs)
self.horizontalLayout_4 = QtGui.QHBoxLayout()

View File

@ -2,7 +2,7 @@
# Resource object code
#
# Created: Mon Nov 11 15:13:30 2013
# Created: Thu Nov 14 08:32:50 2013
# by: The Resource Compiler for PyQt (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!

View File

@ -131,6 +131,10 @@ def markupKanji(definition):
}
def copyKanjiDef(definition):
return QtGui.QApplication.clipboard().setText(u'{character}\t{kunyomi}\t{onyomi}\t{glossary}'.format(**definition))
def buildDefHeader():
palette = QtGui.QApplication.palette()
toolTipBg = palette.color(QtGui.QPalette.Window).name()