mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
Fix #1481061 [[Enhancement] Descriptive Change in Preferences](https://bugs.launchpad.net/calibre/+bug/1481061)
This commit is contained in:
parent
3c7aa1b49a
commit
a623077d05
@ -23,9 +23,14 @@ class SaveTemplate(QWidget, Ui_Form):
|
|||||||
QWidget.__init__(self, *args)
|
QWidget.__init__(self, *args)
|
||||||
Ui_Form.__init__(self)
|
Ui_Form.__init__(self)
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
|
self.orig_help_text = self.help_label.text()
|
||||||
|
|
||||||
def initialize(self, name, default, help, field_metadata):
|
def initialize(self, name, default, help, field_metadata):
|
||||||
variables = sorted(FORMAT_ARG_DESCS.keys())
|
variables = sorted(FORMAT_ARG_DESCS.keys())
|
||||||
|
if name == 'send_to_device':
|
||||||
|
self.help_label.setText(self.orig_help_text + _(
|
||||||
|
'. This setting can be overridden for <b>individual devices</b>,'
|
||||||
|
' by clicking the device icon and choosing "Configure this device".'))
|
||||||
rows = []
|
rows = []
|
||||||
for var in variables:
|
for var in variables:
|
||||||
rows.append(u'<tr><td>%s</td><td> </td><td>%s</td></tr>'%
|
rows.append(u'<tr><td>%s</td><td> </td><td>%s</td></tr>'%
|
||||||
@ -50,7 +55,6 @@ class SaveTemplate(QWidget, Ui_Form):
|
|||||||
if t.exec_():
|
if t.exec_():
|
||||||
self.opt_template.set_value(t.rule[1])
|
self.opt_template.set_value(t.rule[1])
|
||||||
|
|
||||||
|
|
||||||
def changed(self, *args):
|
def changed(self, *args):
|
||||||
self.changed_signal.emit()
|
self.changed_signal.emit()
|
||||||
|
|
||||||
@ -69,7 +73,7 @@ class SaveTemplate(QWidget, Ui_Form):
|
|||||||
'books will have the same name. Is this OK?'))
|
'books will have the same name. Is this OK?'))
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
error_dialog(self, _('Invalid template'),
|
error_dialog(self, _('Invalid template'),
|
||||||
'<p>'+_('The template %s is invalid:')%tmpl + \
|
'<p>'+_('The template %s is invalid:')%tmpl +
|
||||||
'<br>'+str(err), show=True)
|
'<br>'+str(err), show=True)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
@ -81,8 +85,3 @@ class SaveTemplate(QWidget, Ui_Form):
|
|||||||
val = unicode(self.opt_template.text())
|
val = unicode(self.opt_template.text())
|
||||||
config.set(name, val)
|
config.set(name, val)
|
||||||
self.opt_template.save_history(self.option_name+'_template_history')
|
self.opt_template.save_history(self.option_name+'_template_history')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>477</width>
|
||||||
<height>300</height>
|
<height>300</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="help_label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>By adjusting the template below, you can control what folders the files are saved in and what filenames they are given. You can use the / character to indicate sub-folders. Available metadata variables are described below. If a particular book does not have some metadata, the variable will be replaced by the empty string.</string>
|
<string>By adjusting the template below, you can control what folders the files are saved in and what filenames they are given. You can use the / character to indicate sub-folders. Available metadata variables are described below. If a particular book does not have some metadata, the variable will be replaced by the empty string.</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Metadata &management:</string>
|
<string>Me&tadata management:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>opt_manage_device_metadata</cstring>
|
<cstring>opt_manage_device_metadata</cstring>
|
||||||
@ -94,16 +94,6 @@
|
|||||||
<widget class="QLineEdit" name="opt_send_timefmt"/>
|
<widget class="QLineEdit" name="opt_send_timefmt"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="3">
|
<item row="3" column="0" colspan="3">
|
||||||
<widget class="QLabel" name="label_43">
|
|
||||||
<property name="text">
|
|
||||||
<string>Here you can control how calibre will save your books when you click the Send to Device button. This setting can be overriden for individual devices by customizing the device interface plugins in Preferences->Advanced->Plugins</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="3">
|
|
||||||
<widget class="SaveTemplate" name="send_template" native="true"/>
|
<widget class="SaveTemplate" name="send_template" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user