mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix sound output retention in config dialog
This commit is contained in:
parent
eec97a8ec9
commit
c19ce27025
@ -154,9 +154,12 @@ class Widget(QWidget):
|
|||||||
def sound_output(self, val):
|
def sound_output(self, val):
|
||||||
idx = 0
|
idx = 0
|
||||||
if val:
|
if val:
|
||||||
q = self.sound_outputs.findData(val)
|
val = tuple(val)
|
||||||
if q > -1:
|
for q in range(self.sound_outputs.count()):
|
||||||
idx = q
|
x = self.sound_outputs.itemData(q)
|
||||||
|
if x == val:
|
||||||
|
idx = q
|
||||||
|
break
|
||||||
self.sound_outputs.setCurrentIndex(idx)
|
self.sound_outputs.setCurrentIndex(idx)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -184,11 +187,16 @@ class Widget(QWidget):
|
|||||||
def develop():
|
def develop():
|
||||||
from calibre.gui2 import Application
|
from calibre.gui2 import Application
|
||||||
from calibre.gui2.tts.implementation import Client
|
from calibre.gui2.tts.implementation import Client
|
||||||
|
from calibre.gui2.viewer.config import vprefs
|
||||||
|
s = vprefs.get('tts_winspeech') or {}
|
||||||
|
print(s)
|
||||||
|
print(flush=True)
|
||||||
app = Application([])
|
app = Application([])
|
||||||
c = Client()
|
c = Client()
|
||||||
w = Widget(c, {})
|
w = Widget(c, s)
|
||||||
w.show()
|
w.show()
|
||||||
app.exec()
|
app.exec()
|
||||||
|
print(flush=True)
|
||||||
print(w.backend_settings)
|
print(w.backend_settings)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user