mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add warning about custom columns when switching libraries
This commit is contained in:
parent
abed2f1480
commit
a54e1d1938
@ -10,7 +10,7 @@ import os
|
||||
from PyQt4.Qt import QDialog
|
||||
|
||||
from calibre.gui2.dialogs.choose_library_ui import Ui_Dialog
|
||||
from calibre.gui2 import error_dialog, choose_dir
|
||||
from calibre.gui2 import error_dialog, choose_dir, warning_dialog
|
||||
from calibre.constants import filesystem_encoding
|
||||
from calibre import isbytestring, patheq
|
||||
from calibre.utils.config import prefs
|
||||
@ -61,6 +61,12 @@ class ChooseLibrary(QDialog, Ui_Dialog):
|
||||
return True
|
||||
|
||||
def perform_action(self, ac, loc):
|
||||
if ac in ('new', 'existing'):
|
||||
warning_dialog(self.parent(), _('Custom columns'),
|
||||
_('If you use custom columns and they differ between '
|
||||
'libraries, you will have various problems. Best '
|
||||
'to ensure you have the same custom columns in each '
|
||||
'library.'), show=True)
|
||||
if ac in ('new', 'existing'):
|
||||
prefs['library_path'] = loc
|
||||
self.callback(loc)
|
||||
|
@ -83,7 +83,7 @@ class LocationManager(QObject): # {{{
|
||||
|
||||
ac('library', _('Library'), 'lt.png',
|
||||
_('Show books in calibre library'))
|
||||
ac('main', _('Main'), 'reader.svg',
|
||||
ac('main', _('Reader'), 'reader.svg',
|
||||
_('Show books in the main memory of the device'))
|
||||
ac('carda', _('Card A'), 'sd.svg',
|
||||
_('Show books in storage card A'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user