diff options
author | Jeff Long <willcode4@gmail.com> | 2020-11-22 16:45:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-22 16:45:16 -0500 |
commit | 4675ce0579ba99b9ebe2fce9ac37e5420f325ee6 (patch) | |
tree | fe746de3d86a48076cd3c43f2c1a933e8f454d1e /grc/gui | |
parent | b39c64d7efcf2a54f92dc4eacc67b52e4cd708a5 (diff) |
grc: add wiki link to properties dialog docs (#3933)
So user's don't have to copy/paste the URL
Diffstat (limited to 'grc/gui')
-rw-r--r-- | grc/gui/PropsDialog.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/grc/gui/PropsDialog.py b/grc/gui/PropsDialog.py index 634d6f9d45..e7dd72edcf 100644 --- a/grc/gui/PropsDialog.py +++ b/grc/gui/PropsDialog.py @@ -65,7 +65,11 @@ class PropsDialog(Gtk.Dialog): doc_view.get_buffer().create_tag('b', weight=Pango.Weight.BOLD) self._docs_box = Gtk.ScrolledWindow() self._docs_box.set_policy(Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC) - self._docs_box.add(self._docs_text_display) + self._docs_vbox = Gtk.VBox(homogeneous=False, spacing=0) + self._docs_box.add(self._docs_vbox) + self._docs_link = Gtk.Label(use_markup=True) + self._docs_vbox.pack_start(self._docs_link, False, False, 0) + self._docs_vbox.pack_end(self._docs_text_display, True, True, 0) notebook.append_page(self._docs_box, Gtk.Label(label="Documentation")) # Generated code for the block @@ -208,7 +212,10 @@ class PropsDialog(Gtk.Dialog): note = "Wiki Page for this Block: " prefix = self._config.wiki_block_docs_url_prefix suffix = self._block.label.replace(" ", "_") - buf.insert(pos, note + prefix + suffix + '\n\n') + href = f'<a href="{prefix+suffix}">Visit Wiki Page</a>' + self._docs_link.set_markup(href) + else: + self._docs_link.set_markup('Out of Tree Block') docstrings = self._block.documentation.copy() if not docstrings: |