mirror of
https://github.com/ciromattia/kcc
synced 2026-10-17 15:02:32 +00:00
Not using Pixmaps outside GUI thread anymore - Part 2
This commit is contained in:
+5
-5
@@ -308,7 +308,7 @@ class Ui_KCC(object):
|
|||||||
|
|
||||||
def addMessage(self, message, icon=None, replace=False):
|
def addMessage(self, message, icon=None, replace=False):
|
||||||
if icon:
|
if icon:
|
||||||
icon = eval('icons.' + icon)
|
icon = eval('self.icons.' + icon)
|
||||||
item = QtGui.QListWidgetItem(icon, message)
|
item = QtGui.QListWidgetItem(icon, message)
|
||||||
else:
|
else:
|
||||||
item = QtGui.QListWidgetItem(message)
|
item = QtGui.QListWidgetItem(message)
|
||||||
@@ -348,11 +348,11 @@ class Ui_KCC(object):
|
|||||||
self.settings.sync()
|
self.settings.sync()
|
||||||
|
|
||||||
def __init__(self, ui, KCC):
|
def __init__(self, ui, KCC):
|
||||||
global GUI, MainWindow, icons
|
global GUI, MainWindow
|
||||||
GUI = ui
|
GUI = ui
|
||||||
MainWindow = KCC
|
MainWindow = KCC
|
||||||
profiles = sorted(ProfileData.ProfileLabels.iterkeys())
|
profiles = sorted(ProfileData.ProfileLabels.iterkeys())
|
||||||
icons = Icons()
|
self.icons = Icons()
|
||||||
self.settings = QtCore.QSettings('KindleComicConverter', 'KindleComicConverter')
|
self.settings = QtCore.QSettings('KindleComicConverter', 'KindleComicConverter')
|
||||||
self.lastPath = self.settings.value('lastPath', '', type=str)
|
self.lastPath = self.settings.value('lastPath', '', type=str)
|
||||||
self.lastDevice = self.settings.value('lastDevice', 10, type=int)
|
self.lastDevice = self.settings.value('lastDevice', 10, type=int)
|
||||||
@@ -390,10 +390,10 @@ class Ui_KCC(object):
|
|||||||
KCC.closeEvent = self.saveSettings
|
KCC.closeEvent = self.saveSettings
|
||||||
|
|
||||||
for profile in profiles:
|
for profile in profiles:
|
||||||
GUI.DeviceBox.addItem(icons.deviceKindle, profile)
|
GUI.DeviceBox.addItem(self.icons.deviceKindle, profile)
|
||||||
GUI.DeviceBox.setCurrentIndex(self.lastDevice)
|
GUI.DeviceBox.setCurrentIndex(self.lastDevice)
|
||||||
for f in formats:
|
for f in formats:
|
||||||
GUI.FormatBox.addItem(eval('icons.' + f + 'Format'), f)
|
GUI.FormatBox.addItem(eval('self.icons.' + f + 'Format'), f)
|
||||||
GUI.FormatBox.setCurrentIndex(0)
|
GUI.FormatBox.setCurrentIndex(0)
|
||||||
|
|
||||||
self.modeBasic()
|
self.modeBasic()
|
||||||
|
|||||||
Reference in New Issue
Block a user