mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
86d858488c
commit
e63d76a300
@ -1,8 +1,11 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||||
|
from __future__ import (unicode_literals, division, absolute_import,
|
||||||
|
print_function)
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
from PyQt4.QtGui import QDialog, QLineEdit
|
from PyQt4.Qt import (QDialog, QLineEdit, Qt)
|
||||||
from PyQt4.QtCore import SIGNAL, Qt
|
|
||||||
|
|
||||||
from calibre.gui2.dialogs.smartdevice_ui import Ui_Dialog
|
from calibre.gui2.dialogs.smartdevice_ui import Ui_Dialog
|
||||||
|
|
||||||
@ -24,7 +27,7 @@ class SmartdeviceDialog(QDialog, Ui_Dialog):
|
|||||||
'smart device interface when calibre starts. You should not do '
|
'smart device interface when calibre starts. You should not do '
|
||||||
'this if you are using a network that is not secure and you '
|
'this if you are using a network that is not secure and you '
|
||||||
'are not setting a password.') + '</p>')
|
'are not setting a password.') + '</p>')
|
||||||
self.connect(self.show_password, SIGNAL('stateChanged(int)'), self.toggle_password)
|
self.show_password.stateChanged[int].connect(self.toggle_password)
|
||||||
|
|
||||||
self.device_manager = parent.device_manager
|
self.device_manager = parent.device_manager
|
||||||
|
|
||||||
@ -34,6 +37,7 @@ class SmartdeviceDialog(QDialog, Ui_Dialog):
|
|||||||
pw = self.device_manager.get_option('smartdevice', 'password')
|
pw = self.device_manager.get_option('smartdevice', 'password')
|
||||||
if pw:
|
if pw:
|
||||||
self.password_box.setText(pw)
|
self.password_box.setText(pw)
|
||||||
|
self.resize(self.sizeHint())
|
||||||
|
|
||||||
def toggle_password(self, state):
|
def toggle_password(self, state):
|
||||||
if state == Qt.Unchecked:
|
if state == Qt.Unchecked:
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0" colspan="3">
|
<item row="4" column="0" colspan="3">
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
@ -81,20 +81,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1" colspan="2">
|
<item row="3" column="1" colspan="2">
|
||||||
<widget class="QCheckBox" name="autostart_box">
|
<widget class="QCheckBox" name="autostart_box">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Automatically allow connections at startup</string>
|
<string>&Automatically allow connections at startup</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" colspan="2">
|
|
||||||
<widget class="QCheckBox" name="run_box">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Allow connections</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user