about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaweł Jastrzębski <[email protected]>2013-06-13 13:04:54 +0200
committerPaweł Jastrzębski <[email protected]>2013-06-13 13:04:54 +0200
commit3cbc7f163a97725411081f0c29a890567b013271 (patch)
tree358ff58fd5f98a6d38be028c13050fdcd56a4617
parentNot using Pixmaps outside GUI thread anymore (diff)
downloadkcc-3cbc7f163a97725411081f0c29a890567b013271.tar.gz
kcc-3cbc7f163a97725411081f0c29a890567b013271.tar.bz2
kcc-3cbc7f163a97725411081f0c29a890567b013271.zip
Not using Pixmaps outside GUI thread anymore - Part 2
-rw-r--r--kcc/KCC_gui.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/kcc/KCC_gui.py b/kcc/KCC_gui.py
index 5a9fb4a..8e99e00 100644
--- a/kcc/KCC_gui.py
+++ b/kcc/KCC_gui.py
@@ -308,7 +308,7 @@ class Ui_KCC(object):
 
     def addMessage(self, message, icon=None, replace=False):
         if icon:
-            icon = eval('icons.' + icon)
+            icon = eval('self.icons.' + icon)
             item = QtGui.QListWidgetItem(icon, message)
         else:
             item = QtGui.QListWidgetItem(message)
@@ -348,11 +348,11 @@ class Ui_KCC(object):
         self.settings.sync()
 
     def __init__(self, ui, KCC):
-        global GUI, MainWindow, icons
+        global GUI, MainWindow
         GUI = ui
         MainWindow = KCC
         profiles = sorted(ProfileData.ProfileLabels.iterkeys())
-        icons = Icons()
+        self.icons = Icons()
         self.settings = QtCore.QSettings('KindleComicConverter', 'KindleComicConverter')
         self.lastPath = self.settings.value('lastPath', '', type=str)
         self.lastDevice = self.settings.value('lastDevice', 10, type=int)
@@ -390,10 +390,10 @@ class Ui_KCC(object):
         KCC.closeEvent = self.saveSettings
 
         for profile in profiles:
-            GUI.DeviceBox.addItem(icons.deviceKindle, profile)
+            GUI.DeviceBox.addItem(self.icons.deviceKindle, profile)
         GUI.DeviceBox.setCurrentIndex(self.lastDevice)
         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)
 
         self.modeBasic()