mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
91666b8e42
commit
58b59eb7e4
@ -320,7 +320,23 @@ class BulkDateTime(BulkBase, DateTime):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
class BulkText(BulkBase, Text):
|
class BulkText(BulkBase, Text):
|
||||||
pass
|
|
||||||
|
def initialize(self, book_ids):
|
||||||
|
val = self.get_initial_value(book_ids)
|
||||||
|
self.initial_val = val = self.normalize_db_val(val)
|
||||||
|
if self.col_metadata['is_multiple']:
|
||||||
|
self.setter(val)
|
||||||
|
self.widgets[1].update_tags_cache(self.all_values)
|
||||||
|
else:
|
||||||
|
idx = None
|
||||||
|
for i, c in enumerate(self.all_values):
|
||||||
|
if c == val:
|
||||||
|
idx = i
|
||||||
|
self.widgets[1].addItem(c)
|
||||||
|
self.widgets[1].setEditText('')
|
||||||
|
if idx is not None:
|
||||||
|
self.widgets[1].setCurrentIndex(idx)
|
||||||
|
|
||||||
|
|
||||||
bulk_widgets = {
|
bulk_widgets = {
|
||||||
'bool' : BulkBool,
|
'bool' : BulkBool,
|
||||||
|
@ -3,7 +3,6 @@ __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
|||||||
|
|
||||||
'''Dialog to edit metadata in bulk'''
|
'''Dialog to edit metadata in bulk'''
|
||||||
|
|
||||||
import sip
|
|
||||||
from PyQt4.QtCore import SIGNAL, QObject
|
from PyQt4.QtCore import SIGNAL, QObject
|
||||||
from PyQt4.QtGui import QDialog, QGridLayout
|
from PyQt4.QtGui import QDialog, QGridLayout
|
||||||
|
|
||||||
@ -54,7 +53,6 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
|
|
||||||
self.custom_column_widgets, self.__cc_spacers = populate_bulk_metadata_page(
|
self.custom_column_widgets, self.__cc_spacers = populate_bulk_metadata_page(
|
||||||
layout, self.db, self.ids, w)
|
layout, self.db, self.ids, w)
|
||||||
#sip.delete(w.layout())
|
|
||||||
w.setLayout(layout)
|
w.setLayout(layout)
|
||||||
self.__custom_col_layouts = [layout]
|
self.__custom_col_layouts = [layout]
|
||||||
ans = self.custom_column_widgets
|
ans = self.custom_column_widgets
|
||||||
@ -154,6 +152,9 @@ class MetadataBulkDialog(QDialog, Ui_MetadataBulkDialog):
|
|||||||
self.db.set_authors(id, new_authors, notify=False)
|
self.db.set_authors(id, new_authors, notify=False)
|
||||||
|
|
||||||
self.changed = True
|
self.changed = True
|
||||||
|
for w in getattr(self, 'custom_column_widgets', []):
|
||||||
|
w.commit(self.ids)
|
||||||
|
|
||||||
|
|
||||||
def series_changed(self):
|
def series_changed(self):
|
||||||
self.write_series = True
|
self.write_series = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user