There's a pair of hard-coded structures at 
https://github.com/Gnucash/gnucash/blob/e30c1fce70c04fab4507ac869351165b0d70ae48/libgnucash/engine/gnc-commodity.c#L177
 that lists the sources that GnuCash knows about; anything not in one of those 
two shows up in the third "unknown" list. The lists were last updated 5 years 
ago and are in need of another.

When GnuCash starts up it queries F::Q for the available sources using 
gnc-fq-check and bounces the two lists, enabling in the entries in the 
hard-coded structs for the matching sources from gnc-fq-check; after the bounce 
any remaining F::Q sources populate the Unknown list at the bottom of the 
dialog. Yes, it's obviously brittle, but that's necessary because there's at 
present no way to retrieve the exchange names for the sources nor to 
distinguish between single and multiple source names so the combos in the 
security editor can't be populated dynamically.

You'll notice that the Toronto Stock Exchange module is entered as tsx (line 
227), so it doesn't match the current name of the module, tmx, and it doesn't 
get enabled but tmx appears in the unknown list. If you add your modified TSX 
module to @MODULES in Quotes.pm and you've changed every instance of tmx to tsx 
as part of your modifications it should get added to the sources list from 
gnc-fq-check and enable the tsx item in GnuCash's security editor.

Regards,
John Ralls


> On Nov 12, 2022, at 9:07 AM, gnu Gord <gnucashg...@gmail.com> wrote:
> 
> Thanks for the suggestion but the TMX module is already listed in Quote.pm.
> It existed before I started so there must be some other way GnuCash decides
> whether a module is available for use or not... I just don't know how.
> 
> Thanks again,
> Gord
> 
> 
> On Sat, Nov 12, 2022 at 7:20 AM Ken Farley <farle...@gmail.com> wrote:
> 
>> If I remember correctly, when I made my own module to grab US EE Bond
>> prices, in order for GnuCash to allow my module to be used, I had to add
>> it to the MODULES list in Quote.pm. I'm working on a Mac, so your path
>> might differ, but for me it's in /Library/Perl/5.30/Finance. I added a
>> line between two of the entries in Quote.pm. For example, here's the
>> chunk of that file for me, where I've added "USBonds" to reference my
>> Perl module "USBonds.pm".
>> 
>> @MODULES = qw/
>>     AEX
>>     ... (many many modules)
>>     Troweprice
>>     USBonds
>>     USFedBonds
>>     Union
>>     YahooJSON
>>     ZA
>> /;
>> 
>> If that's not helpful, and something more has to be done, I don't know
>> what it might be. I don't recall having to do anything else except
>> restarting GnuCash.
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>> 
> _______________________________________________
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to