Add links to manual in template editor.

This commit is contained in:
Charles Haley 2011-06-04 15:21:23 +01:00
parent 87c178accb
commit 09bcc41c1f
2 changed files with 21 additions and 0 deletions

View File

@ -254,6 +254,13 @@ class TemplateDialog(QDialog, Ui_TemplateDialog):
self.textbox_changed() self.textbox_changed()
self.rule = (None, '') self.rule = (None, '')
self.template_tutorial.setText(_('Template language tutorial: ') +
'<a href="http://manual.calibre-ebook.com/template_lang.html">'
'http://manual.calibre-ebook.com/template_lang.html</a>')
self.template_func_reference.setText(_('Template function reference: ') +
'<a href="http://manual.calibre-ebook.com/template_ref.html">'
'http://manual.calibre-ebook.com/template_ref.html</a>')
def textbox_changed(self): def textbox_changed(self):
cur_text = unicode(self.textbox.toPlainText()) cur_text = unicode(self.textbox.toPlainText())
if self.last_text != cur_text: if self.last_text != cur_text:

View File

@ -125,6 +125,20 @@
<item row="9" column="1"> <item row="9" column="1">
<widget class="QPlainTextEdit" name="source_code"/> <widget class="QPlainTextEdit" name="source_code"/>
</item> </item>
<item row="10" column="1">
<widget class="QLabel" name="template_tutorial">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="11" column="1">
<widget class="QLabel" name="template_func_reference">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>