[GNC] Adjusting Column Widths
sunfish62 at yahoo.com
sunfish62 at yahoo.com
Sun Sep 8 01:27:25 EDT 2024
A couple points about editing this file:
First, it should go without saying that you should edit the file when GnuCash is not/not running.
Second, while the gcm file manages a major portion of the UX, it does not (I believe) disrupt GnuCash actually running-- and it has no bearing on your financial data. So if something goes wrong, the file can be deleted and it will regenerate upon restart of the program. You will lose the tabs that were open and any column settings you modified, but you won't lose any transactional data. The point is to reassure you that all is not lost if something goes wrong when you edit this file.
Third, the gcm file is a simple text file, so one can accomplish the same result that Michael mentions by opening the gcm file in a text editor and performing a Find/ Replace for the same entries he mentions. Remember that the Description column is Special and autosizes to fill the window. The usual caveats regarding backups apply.
Fourth, I'm not certain when the gcm entries are created, but I don't believe there's any way to set a default column profile, which means that any new accounts you create will have to be adjusted after creation.
As for whether there "could be" such a tool or setting, the answer is yes, but it would require someone to develop the proposal, flesh out how it would work and look in practice, write the code, and submit it for inclusion in future versions of GnuCash. The more that can be done without the primary developer team involvement (i.e., from regular users like you and me), the better the prospects for it actually appearing in the program. This is because the primary development team is very small and very busy with main parts of the program.
David T.
On Sep 8, 2024, 12:13 AM, at 12:13 AM, "Fross, Michael via gnucash-user" <gnucash-user at gnucash.org> wrote:
>I have a simple windows TakeCmd batch file that updates my.gcm file
>with my
>preferred widths. I've not tested it extensively, but it seems to work
>for
>me. You will need to tweak it for your setup, but it should be
>trivial.
>
>I got the number by getting a register setup the way I liked and then
>looked in the .gcm file for the numbers. I'd make a backup of the .gcm
>file before running this just in case.
>
>Good luck,
>
>Michael
>
>ps. Take Command is an enhanced windows batch file language if you
>were
>wondering. https://jpsoft.com
>
>------------------------------------------------------------------
>
>rem
>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
>rem :: SetDefaultColumnWidth.btm
>rem ::
>rem :: Given a GnuCash Metadata File Set the Default
>rem :: width columns for each register
>rem ::
>rem :: File Location:
>C:\Users\Michael\AppData\Roaming\GnuCash\books\Fross.xml.gnucash.gcm
>rem ::
>rem
>:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
>
>rem Desired Widths
>set date_width=145
>set num_width=133
>set reconcile_width=29
>set balance_width=104
>set transfer_width=480
>set debit_width=96
>set credit_width=96
>
>set
>MetaDataFile=C:\Users\micha\AppData\Roaming\GnuCash\books\Fross.xml.gnucash.gcm
>
>echo Updating %MetaDataFile:
>
>echo - Updating Date Width Column
>sed -i "s/^date_width=.*/date_width=%date_width/" %MetaDataFile
>
>echo - Updating Num Width Column
>sed -i "s/^num_width=.*/num_width=%num_width/" %MetaDataFile
>
>echo - Updating Reconcile Width Column
>sed -i "s/^reconcile_width=.*/reconcile_width=%reconcile_width/"
>%MetaDataFile
>
>echo - Updating Balance Width Column
>sed -i "s/^balance_width=.*/balance_width=%balance_width/"
>%MetaDataFile
>
>echo - Updating Transfer Width Column
>sed -i "s/^transfer_width=.*/transfer_width=%transfer_width/"
>%MetaDataFile
>
>echo - Updating Debit Width Column
>sed -i "s/^debit_width=.*/debit_width=%debit_width/" %MetaDataFile
>
>echo - Updating Credit Width Column
>sed -i "s/^credit_width=.*/credit_width=%credit_width/" %MetaDataFile
>
>echo Complete
>echo.
>
>On Sat, Sep 7, 2024 at 2:16 PM Grace <grace at bernevyl.com> wrote:
>
>> I seem to be spending an inordinate amount of time adjusting the
>widths
>> of the columns in the journals.
>>
>> Is there any way to set one journal, and then propagate those setting
>to
>> all the journal screens?
>>
>> If there isn't, could there be?
>>
>> Grace.
>>
>>
>> --
>> This email has been checked for viruses by Avast antivirus software.
>> www.avast.com
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at 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 at 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.
More information about the gnucash-user
mailing list