mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix call to device_context_menu in preferences by removing a parameter. Fix other call site in device
This commit is contained in:
parent
4751389672
commit
fec87198fb
@ -706,7 +706,7 @@ class DeviceMixin(object): # {{{
|
|||||||
|
|
||||||
# Device connected {{{
|
# Device connected {{{
|
||||||
|
|
||||||
def set_device_menu_items_state(self, connected, device_kind):
|
def set_device_menu_items_state(self, connected):
|
||||||
if connected:
|
if connected:
|
||||||
self._sync_menu.connect_to_folder_action.setEnabled(False)
|
self._sync_menu.connect_to_folder_action.setEnabled(False)
|
||||||
self._sync_menu.connect_to_itunes_action.setEnabled(False)
|
self._sync_menu.connect_to_itunes_action.setEnabled(False)
|
||||||
@ -726,7 +726,7 @@ class DeviceMixin(object): # {{{
|
|||||||
'''
|
'''
|
||||||
Called when a device is connected to the computer.
|
Called when a device is connected to the computer.
|
||||||
'''
|
'''
|
||||||
self.set_device_menu_items_state(connected, device_kind)
|
self.set_device_menu_items_state(connected)
|
||||||
if connected:
|
if connected:
|
||||||
self.device_manager.get_device_information(\
|
self.device_manager.get_device_information(\
|
||||||
Dispatcher(self.info_read))
|
Dispatcher(self.info_read))
|
||||||
|
@ -410,9 +410,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceMixin, ToolbarMixin, # {{{
|
|||||||
self.tags_view.set_new_model() # in case columns changed
|
self.tags_view.set_new_model() # in case columns changed
|
||||||
self.tags_view.recount()
|
self.tags_view.recount()
|
||||||
self.create_device_menu()
|
self.create_device_menu()
|
||||||
self.set_device_menu_items_state(bool(self.device_connected),
|
self.set_device_menu_items_state(bool(self.device_connected))
|
||||||
self.device_connected == 'folder')
|
|
||||||
|
|
||||||
if not patheq(self.library_path, d.database_location):
|
if not patheq(self.library_path, d.database_location):
|
||||||
newloc = d.database_location
|
newloc = d.database_location
|
||||||
move_library(self.library_path, newloc, self,
|
move_library(self.library_path, newloc, self,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user