This commit is contained in:
Kovid Goyal 2012-08-01 15:51:49 +05:30
parent e63d76a300
commit 656a28986e
2 changed files with 11 additions and 6 deletions

View File

@ -15,7 +15,7 @@ from calibre.constants import iswindows, isosx
from calibre.customize.ui import is_disabled
from calibre.devices.bambook.driver import BAMBOOK
from calibre.gui2.dialogs.smartdevice import SmartdeviceDialog
from calibre.gui2 import info_dialog
from calibre.gui2 import info_dialog, question_dialog
class ShareConnMenu(QMenu): # {{{
@ -222,6 +222,11 @@ class ConnectShareAction(InterfaceAction):
running = dm.is_running('smartdevice')
if running:
dm.stop_plugin('smartdevice')
if dm.get_option('smartdevice', 'autostart'):
if not question_dialog(self.gui, _('Disable autostart'),
_('Do you want wireless device connections to be'
' started automatically when calibre starts?')):
dm.set_option('smartdevice', 'autostart', False)
else:
sd_dialog = SmartdeviceDialog(self.gui)
sd_dialog.exec_()

View File

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<width>612</width>
<height>226</height>
</rect>
</property>
@ -22,7 +22,7 @@
<widget class="QLabel" name="msg">
<property name="minimumSize">
<size>
<width>500</width>
<width>600</width>
<height>0</height>
</size>
</property>
@ -57,7 +57,7 @@
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>&amp;Password:</string>
<string>Optional &amp;password:</string>
</property>
<property name="buddy">
<cstring>password_box</cstring>
@ -81,10 +81,10 @@
</property>
</widget>
</item>
<item row="3" column="1" colspan="2">
<item row="3" column="0" colspan="3">
<widget class="QCheckBox" name="autostart_box">
<property name="text">
<string>&amp;Automatically allow connections at startup</string>
<string>&amp;Automatically allow connections at calibre startup</string>
</property>
</widget>
</item>