mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Merge from trunk
This commit is contained in:
commit
f0f858c7d0
@ -390,6 +390,9 @@ class Metadata(object):
|
||||
return (None, None, None, None)
|
||||
orig_res = res
|
||||
cmeta = self.get_user_metadata(key, make_copy=False)
|
||||
if res is None or res == '':
|
||||
return (None, None, None, None)
|
||||
orig_res = res
|
||||
name = unicode(cmeta['name'])
|
||||
datatype = cmeta['datatype']
|
||||
if datatype == 'text' and cmeta['is_multiple']:
|
||||
|
@ -707,6 +707,10 @@ class DeviceMixin(object): # {{{
|
||||
'''
|
||||
Called when a device is connected to the computer.
|
||||
'''
|
||||
# This can happen as this function is called in a queued connection and
|
||||
# the user could have yanked the device in the meantime
|
||||
if connected and not self.device_manager.is_device_connected:
|
||||
connected = False
|
||||
self.set_device_menu_items_state(connected)
|
||||
if connected:
|
||||
self.device_manager.get_device_information(\
|
||||
|
@ -38,6 +38,7 @@ from calibre.gui2.init import LibraryViewMixin, LayoutMixin
|
||||
from calibre.gui2.search_box import SearchBoxMixin, SavedSearchBoxMixin
|
||||
from calibre.gui2.search_restriction_mixin import SearchRestrictionMixin
|
||||
from calibre.gui2.tag_view import TagBrowserMixin
|
||||
from calibre.utils.ordered_dict import OrderedDict
|
||||
|
||||
|
||||
class Listener(Thread): # {{{
|
||||
@ -97,7 +98,7 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, # {{{
|
||||
MainWindow.__init__(self, opts, parent)
|
||||
self.opts = opts
|
||||
self.device_connected = None
|
||||
acmap = {}
|
||||
acmap = OrderedDict()
|
||||
for action in interface_actions():
|
||||
mod, cls = action.actual_plugin.split(':')
|
||||
ac = getattr(__import__(mod, fromlist=['1'], level=0), cls)(self,
|
||||
|
@ -20,7 +20,6 @@ from calibre.library.comments import comments_to_html
|
||||
from calibre.library.server.utils import format_tag_string
|
||||
from calibre import guess_type
|
||||
from calibre.utils.ordered_dict import OrderedDict
|
||||
from calibre.utils.date import format_date
|
||||
|
||||
BASE_HREFS = {
|
||||
0 : '/stanza',
|
||||
|
Loading…
x
Reference in New Issue
Block a user