Is there a way to "Clear all contents/delete all transactions" for a fresh start?

John Ralls jralls at ceridwen.us
Fri Nov 4 11:35:48 EDT 2016


> On Nov 4, 2016, at 7:29 AM, Derek Atkins <warlord at mit.edu> wrote:
> 
> John Ralls <jralls at ceridwen.us> writes:
> 
>> That would require that he start from the command line by specifying
>> the path to the executable, which doesn't engage Launch Services and
>> so doesn't send the NSApplicationOpenFile notification (the one that
>> GnuCash doesn't know how to interpret). The `open` command doesn't
>> pass command-line arguments, it is equivalent to double-clicking on
>> the file in Finder so it would pass NSApplicationOpenFile if you ran
>> `open foo.gnucash` on the command line.
> 
> So.... how hard would it be to get GnuCash to handle the
> NSApplicationOpenFile notification?  I'm curious what it would
> entail/require, as I have no idea.

ATM we initialize the OSX application object and start the CFRunLoop in gnc_main_window_show_all_windows(). We'd need to split that so that we initialize it in inner_main() and register a handler for the g_signal "NSApplicationOpenFile". The hard part is dealing with the race between opening the default file and handling the signal.

Regards,
John Ralls




More information about the gnucash-user mailing list