mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Create catalog dialog now remembers its size
This commit is contained in:
parent
f050c0c225
commit
7376b04069
@ -17,7 +17,7 @@ from calibre.gui2.actions import InterfaceAction
|
|||||||
class GenerateCatalogAction(InterfaceAction):
|
class GenerateCatalogAction(InterfaceAction):
|
||||||
|
|
||||||
name = 'Generate Catalog'
|
name = 'Generate Catalog'
|
||||||
action_spec = (_('Create catalog of books in your calibre library'), None, None, None)
|
action_spec = (_('Create a catalog of the books in your calibre library'), None, None, None)
|
||||||
dont_add_to = frozenset(['toolbar-device', 'context-menu-device'])
|
dont_add_to = frozenset(['toolbar-device', 'context-menu-device'])
|
||||||
|
|
||||||
def generate_catalog(self):
|
def generate_catalog(self):
|
||||||
|
@ -31,7 +31,7 @@ class ConvertAction(InterfaceAction):
|
|||||||
partial(self.convert_ebook, False, bulk=True))
|
partial(self.convert_ebook, False, bulk=True))
|
||||||
cm.addSeparator()
|
cm.addSeparator()
|
||||||
ac = cm.addAction(
|
ac = cm.addAction(
|
||||||
_('Create catalog of books in your calibre library'))
|
_('Create a catalog of the books in your calibre library'))
|
||||||
ac.triggered.connect(self.gui.iactions['Generate Catalog'].generate_catalog)
|
ac.triggered.connect(self.gui.iactions['Generate Catalog'].generate_catalog)
|
||||||
self.qaction.setMenu(cm)
|
self.qaction.setMenu(cm)
|
||||||
self.qaction.triggered.connect(self.convert_ebook)
|
self.qaction.triggered.connect(self.convert_ebook)
|
||||||
|
@ -125,6 +125,10 @@ class Catalog(QDialog, Ui_Dialog):
|
|||||||
self.apply)
|
self.apply)
|
||||||
self.show_plugin_tab(None)
|
self.show_plugin_tab(None)
|
||||||
|
|
||||||
|
geom = dynamic.get('catalog_window_geom', None)
|
||||||
|
if geom is not None:
|
||||||
|
self.restoreGeometry(bytes(geom))
|
||||||
|
|
||||||
def show_plugin_tab(self, idx):
|
def show_plugin_tab(self, idx):
|
||||||
cf = unicode(self.format.currentText()).lower()
|
cf = unicode(self.format.currentText()).lower()
|
||||||
while self.tabs.count() > 1:
|
while self.tabs.count() > 1:
|
||||||
@ -157,6 +161,7 @@ class Catalog(QDialog, Ui_Dialog):
|
|||||||
dynamic.set('catalog_last_used_title', self.catalog_title)
|
dynamic.set('catalog_last_used_title', self.catalog_title)
|
||||||
self.catalog_sync = bool(self.sync.isChecked())
|
self.catalog_sync = bool(self.sync.isChecked())
|
||||||
dynamic.set('catalog_sync_to_device', self.catalog_sync)
|
dynamic.set('catalog_sync_to_device', self.catalog_sync)
|
||||||
|
dynamic.set('catalog_window_geom', bytearray(self.saveGeometry()))
|
||||||
|
|
||||||
def apply(self):
|
def apply(self):
|
||||||
# Store current values without building catalog
|
# Store current values without building catalog
|
||||||
@ -167,3 +172,8 @@ class Catalog(QDialog, Ui_Dialog):
|
|||||||
def accept(self):
|
def accept(self):
|
||||||
self.save_catalog_settings()
|
self.save_catalog_settings()
|
||||||
return QDialog.accept(self)
|
return QDialog.accept(self)
|
||||||
|
|
||||||
|
def reject(self):
|
||||||
|
dynamic.set('catalog_window_geom', bytearray(self.saveGeometry()))
|
||||||
|
QDialog.reject(self)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user