mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
...
This commit is contained in:
parent
fa026406bb
commit
8b845d4dca
BIN
resources/images/devices/tablet.png
Normal file
BIN
resources/images/devices/tablet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 29 KiB |
@ -27,7 +27,7 @@ def synchronous(func):
|
|||||||
class MTPDeviceBase(DevicePlugin):
|
class MTPDeviceBase(DevicePlugin):
|
||||||
name = 'MTP Device Interface'
|
name = 'MTP Device Interface'
|
||||||
gui_name = _('MTP Device')
|
gui_name = _('MTP Device')
|
||||||
icon = I('devices/galaxy_s3.png')
|
icon = I('devices/tablet.png')
|
||||||
description = _('Communicate with MTP devices')
|
description = _('Communicate with MTP devices')
|
||||||
author = 'Kovid Goyal'
|
author = 'Kovid Goyal'
|
||||||
version = (1, 0, 0)
|
version = (1, 0, 0)
|
||||||
|
@ -201,7 +201,7 @@ class DeviceManager(Thread): # {{{
|
|||||||
uid = None
|
uid = None
|
||||||
asked = gprefs.get('ask_to_manage_device', [])
|
asked = gprefs.get('ask_to_manage_device', [])
|
||||||
if (dev.ASK_TO_ALLOW_CONNECT and uid and uid not in asked):
|
if (dev.ASK_TO_ALLOW_CONNECT and uid and uid not in asked):
|
||||||
if not self.allow_connect_slot(dev.get_gui_name()):
|
if not self.allow_connect_slot(dev.get_gui_name(), dev.icon):
|
||||||
allow_connect = False
|
allow_connect = False
|
||||||
asked.append(uid)
|
asked.append(uid)
|
||||||
gprefs.set('ask_to_manage_device', asked)
|
gprefs.set('ask_to_manage_device', asked)
|
||||||
@ -852,11 +852,11 @@ class DeviceMixin(object): # {{{
|
|||||||
if tweaks['auto_connect_to_folder']:
|
if tweaks['auto_connect_to_folder']:
|
||||||
self.connect_to_folder_named(tweaks['auto_connect_to_folder'])
|
self.connect_to_folder_named(tweaks['auto_connect_to_folder'])
|
||||||
|
|
||||||
def allow_connect(self, name):
|
def allow_connect(self, name, icon):
|
||||||
return question_dialog(self, _('Mange the %s?')%name,
|
return question_dialog(self, _('Mange the %s?')%name,
|
||||||
_('Detected the <b>%s</b>. Do you want calibre to manage it?')%
|
_('Detected the <b>%s</b>. Do you want calibre to manage it?')%
|
||||||
name, show_copy_button=False,
|
name, show_copy_button=False,
|
||||||
override_icon=QIcon(I('reader.png')))
|
override_icon=QIcon(icon))
|
||||||
|
|
||||||
def debug_detection(self, done):
|
def debug_detection(self, done):
|
||||||
self.debug_detection_callback = weakref.ref(done)
|
self.debug_detection_callback = weakref.ref(done)
|
||||||
|
@ -415,6 +415,7 @@ class MTPConfig(QTabWidget):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def commit(self):
|
def commit(self):
|
||||||
|
self.device.prefs['blacklist'] = self.igntab.blacklist
|
||||||
p = self.device.prefs.get(self.current_device_key, {})
|
p = self.device.prefs.get(self.current_device_key, {})
|
||||||
|
|
||||||
if hasattr(self, 'formats'):
|
if hasattr(self, 'formats'):
|
||||||
@ -440,7 +441,6 @@ class MTPConfig(QTabWidget):
|
|||||||
|
|
||||||
self.device.prefs[self.current_device_key] = p
|
self.device.prefs[self.current_device_key] = p
|
||||||
|
|
||||||
self.device.prefs['blacklist'] = self.igntab.blacklist
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from calibre.gui2 import Application
|
from calibre.gui2 import Application
|
||||||
|
Loading…
x
Reference in New Issue
Block a user