First thought was that you could add a hyperlink in the text here:
https://github.com/gnuradio/gnuradio/blob/55621a9709b219551b908e67ee88f6f7ad2593cb/grc/gui/PropsDialog.py#L208

but GTK doesn't seem to do that very well.

I wouldn't intercept any old dialog click. Users might be trying to
cut/paste, or just click on stuff because they're bored.

So another idea would be to add a widget to the doc tab:
https://developer.gnome.org/pygtk/stable/class-gtklinkbutton.html
here:
https://github.com/gnuradio/gnuradio/blob/55621a9709b219551b908e67ee88f6f7ad2593cb/grc/gui/PropsDialog.py#L68

On Tue, Nov 10, 2020 at 9:45 PM Barry Duggan <ba...@dcsmail.net> wrote:

> Hi Marcus,
>
> Here is what I would like to happen:
>
> 1) The user has a GRC flowgraph open, clicks on a block, selects
> Properties, and selects the Documentation tab.
>
> 2) The user clicks within the text block of the Documentation tab. It
> contains the URL of the wiki page for that block, but as far as I can
> tell, there is no way to make a clickable link in a text block.
>
> 3) Since we know which block Parameters screen is open, we know the name
> of the block and can derive the URL from it.
>
> 4) By intercepting that click, I would trigger a link to the wiki for
> the user's web browser.
>
> I haven't dug into the GRC code enough to know exactly where to put the
> code to do that, but it would be a neat feature to have.
>
> Any suggestions and/or assistance would be appreciated greatly!
>
> Thanks,
> ---
> Barry Duggan KV4FV
> https://github.com/duggabe
>
> ---
>
> On Tue, 10 Nov 2020 23:36:09 +0100, Marcus Müller wrote:
>
> Hi Barry,
>
> not as far as I know, but well, in which part of software do you need to
> know that?
>
> Best regards,
> Marcus
>
> On 09.11.20 00:50, Barry Duggan wrote:
>  > Using GRC, open the Properties of a block, select the 'Documentation'
>  > tab. Is there a way to get a hook / callback if the user clicks within
>  > the text box of that tab?
>  >
>  > I don't even need the contents of that text box, just the fact that the
>  > user clicked it, and which type of block (label) it is.
>  >
>  > Thanks!
>  > ---
>  > Barry Duggan KV4FV
>  > https://github.com/duggabe
>  >
>
>
>

Reply via email to