mirror of
https://github.com/noDRM/DeDRM_tools.git
synced 2024-11-05 13:36:10 +06:00
Fix Obok plugin on Calibre 6 (#98)
This commit is contained in:
parent
012ff533ab
commit
c12d214b59
|
@ -62,7 +62,7 @@ class ConfigWidget(QWidget):
|
||||||
|
|
||||||
|
|
||||||
def edit_kobo_directory(self):
|
def edit_kobo_directory(self):
|
||||||
tmpkobodirectory = QFileDialog.getExistingDirectory(self, "Select Kobo directory", self.kobodirectory or "/home", QFileDialog.ShowDirsOnly)
|
tmpkobodirectory = QFileDialog.getExistingDirectory(self, "Select Kobo directory", self.kobodirectory or "/home", QFileDialog.Option.ShowDirsOnly)
|
||||||
|
|
||||||
if tmpkobodirectory != u"" and tmpkobodirectory is not None:
|
if tmpkobodirectory != u"" and tmpkobodirectory is not None:
|
||||||
self.kobodirectory = tmpkobodirectory
|
self.kobodirectory = tmpkobodirectory
|
||||||
|
|
|
@ -409,7 +409,7 @@ class ReadOnlyTableWidgetItem(QTableWidgetItem):
|
||||||
def __init__(self, text):
|
def __init__(self, text):
|
||||||
if text is None:
|
if text is None:
|
||||||
text = ''
|
text = ''
|
||||||
QTableWidgetItem.__init__(self, text, QTableWidgetItem.UserType)
|
QTableWidgetItem.__init__(self, text, QTableWidgetItem.ItemType.UserType)
|
||||||
self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled)
|
self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled)
|
||||||
|
|
||||||
class AuthorTableWidgetItem(ReadOnlyTableWidgetItem):
|
class AuthorTableWidgetItem(ReadOnlyTableWidgetItem):
|
||||||
|
@ -448,7 +448,7 @@ class IconWidgetItem(ReadOnlyTableWidgetItem):
|
||||||
class NumericTableWidgetItem(QTableWidgetItem):
|
class NumericTableWidgetItem(QTableWidgetItem):
|
||||||
|
|
||||||
def __init__(self, number, is_read_only=False):
|
def __init__(self, number, is_read_only=False):
|
||||||
QTableWidgetItem.__init__(self, '', QTableWidgetItem.UserType)
|
QTableWidgetItem.__init__(self, '', QTableWidgetItem.ItemType.UserType)
|
||||||
self.setData(Qt.DisplayRole, number)
|
self.setData(Qt.DisplayRole, number)
|
||||||
if is_read_only:
|
if is_read_only:
|
||||||
self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled)
|
self.setFlags(Qt.ItemIsSelectable|Qt.ItemIsEnabled)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user