This commit is contained in:
Kovid Goyal 2023-05-21 22:18:59 +05:30
commit c19c2fb0cf
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -88,14 +88,15 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
in template processing. You use a stored template in another template as
if it were a template function, for example 'some_name(arg1, arg2...)'.</p>
<p>Stored templates must use General Program Mode -- they must
either begin with the text '{0}' or be {1}. You retrieve arguments
passed to a GPM stored template using the '{2}()' template function, as
in '{2}(var1, var2, ...)'. The passed arguments are copied to the named
variables. Arguments passed to a Python template are in the '{2}'
parameter. Arguments are always strings.</p>
<p>Stored templates must use General Program Mode or Python Template
Mode -- they must begin with the text '{0}' or '{1}'. You retrieve
arguments passed to a GPM stored template using the '{2}()' template
function, as in '{2}(var1, var2, ...)'. The passed arguments are copied
to the named variables. Arguments passed to a Python template are in the
'{2}' attribute (a list) of the '{3}' parameter. Arguments are always
strings.</p>
<p>For example, this stored template checks if any items are in a
<p>For example, this stored GPM template checks if any items are in a
list, returning '1' if any are found and '' if not.</p>
<p>
Template name: items_in_list<br>
@ -115,7 +116,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
See the template language tutorial for more information.</p>
</p>
''')
self.st_textBrowser.setHtml(help_text.format('program:', 'python templates', 'arguments'))
self.st_textBrowser.setHtml(help_text.format('program:', 'python:', 'arguments', 'context'))
self.st_textBrowser.adjustSize()
self.st_show_hide_help_button.clicked.connect(self.st_show_hide_help)
self.st_textBrowser_height = self.st_textBrowser.height()