~marmyshev/openlp/itunes

« back to all changes in this revision

Viewing changes to openlp/plugins/images/lib/imagetab.py

  • Committer: Andreas Preikschat
  • Date: 2012-12-28 20:15:56 UTC
  • mfrom: (1970.2.54 bug-779201-2)
  • Revision ID: googol@lavabit.com-20121228201556-i1p7aq0byf5cuip7
QString and QVariant auto-conversion (bug #779201)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
from PyQt4 import QtCore, QtGui
31
31
 
32
 
from openlp.core.lib import SettingsTab, translate, Receiver
33
 
from openlp.core.lib.settings import Settings
 
32
from openlp.core.lib import SettingsTab, translate, Receiver, Settings
34
33
from openlp.core.lib.ui import UiStrings
35
34
 
36
35
class ImageTab(SettingsTab):
86
85
    def load(self):
87
86
        settings = Settings()
88
87
        settings.beginGroup(self.settingsSection)
89
 
        self.bg_color = unicode(settings.value(
90
 
            u'background color', QtCore.QVariant(u'#000000')).toString())
 
88
        self.bg_color = settings.value(u'background color', u'#000000')
91
89
        self.initial_color = self.bg_color
92
90
        settings.endGroup()
93
91
        self.backgroundColorButton.setStyleSheet(
96
94
    def save(self):
97
95
        settings = Settings()
98
96
        settings.beginGroup(self.settingsSection)
99
 
        settings.setValue(u'background color', QtCore.QVariant(self.bg_color))
 
97
        settings.setValue(u'background color', self.bg_color)
100
98
        settings.endGroup()
101
99
        if self.initial_color != self.bg_color:
102
100
            Receiver.send_message(u'image_updated')