After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721306 - Account hierarchy column widths are reset when restarting a second time without changing the widths
Account hierarchy column widths are reset when restarting a second time witho...
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
2.6.0
Other Linux
: Normal normal
: ---
Assigned To: gnucash-ui-maint
gnucash-ui-maint
: 721444 721794 722093 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-01-01 17:12 UTC by Jonas Lippuner
Modified: 2018-06-29 23:23 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jonas Lippuner 2014-01-01 17:12:23 UTC
When I launch GnuCash from a different directory than last time, the column widths are reset. To reproduce, do the following:

1) cd into some directory, e.g.
$ cd ~

2) start GnuCash 2.6.0:
$ gnucash

3) adjust the widths of the columns in the Accounts window and close GnuCash

4) start GnuCash again
$ gnucash

5) verify that the widths are the same that you set in step 3 and close GnuCash again

6) cd to a different path, e.g.
$ mkdir foobar
$ cd foobar

7) start GnuCash from that different path
$ gnucash

8) the column widths have now been reset to their default values, close GnuCash

Going back to the old path where the column widths have been changed does not bring them back, i.e.
$ cd ~
$ gnucash

will start GnuCash again from ~ but the column widths will still be reset.


Expected Result:

Column changes in column widths should be persistent across launching GnuCash from any path.


Actual Result:

Whenever GnuCash is launched from a different path than the previous time the column widths are reset to the default values (which are too small, I might add...)
Comment 1 Mike Evans 2014-01-02 09:01:45 UTC
I can't reproduce this in Fedora 17.  What Linux distribution are you using?
Comment 2 Jonas Lippuner 2014-01-02 16:41:17 UTC
I'm using Kubuntu 12.10.
Comment 3 Richard Ullger 2014-01-03 00:34:05 UTC
I'm using Enlightenment on Arch Linux and start GnuCash from a shortcut key sequence and GnuCash doesn't remember the column widths on the accounts page. Each time I start GnuCash the column widths have been reset. This is a regression from the 2.4.x series.

Also, in the 2.4.x series, when I opened an account register GnuCash would use the column widths I'd set. 2.6.0 no longer does this, it uses the default column widths.
Comment 4 Richard Ullger 2014-01-03 13:33:25 UTC
My last comment is ambiguous. To clarify, if I change the column widths for an account register, close GnuCash and then restart it, GnuCash will remember those column widths for that account register only.

If I open another account register for which I have not changed the column widths, GnuCash will use the default column widths. In the 2.4.x series, the new column widths would get used for all subsequent account registers I opened.
Comment 5 Mike Evans 2014-01-03 13:55:18 UTC
(In reply to comment #4)
> My last comment is ambiguous. To clarify, if I change the column widths for an
> account register, close GnuCash and then restart it, GnuCash will remember
> those column widths for that account register only.
> 
> If I open another account register for which I have not changed the column
> widths, GnuCash will use the default column widths. In the 2.4.x series, the
> new column widths would get used for all subsequent account registers I opened.

That is the correct behaviour in the new version.  Previously all newly opened registers woud have the column widths set to the last closed register window.  See Bug 666576 esp. comment 2

Jonas, is this the behaviour you describe?
Comment 6 Richard Ullger 2014-01-03 14:45:01 UTC
Thanks, I've reviewed 666576.

In my opinion, having to set column widths individually for each account register is far too much work and the default column widths are not ideal for me.

Where are the default column widths stored? I've checked in gsettings using the dconf editor but could not find them.
Comment 7 Richard Ullger 2014-01-03 15:01:17 UTC
I realise that the column widths have not been migrated and are still in gconf. I'll have a play with changing these to see if this works for me.
Comment 8 Jonas Lippuner 2014-01-03 18:35:25 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > My last comment is ambiguous. To clarify, if I change the column widths for an
> > account register, close GnuCash and then restart it, GnuCash will remember
> > those column widths for that account register only.
> > 
> > If I open another account register for which I have not changed the column
> > widths, GnuCash will use the default column widths. In the 2.4.x series, the
> > new column widths would get used for all subsequent account registers I opened.
> 
> That is the correct behaviour in the new version.  Previously all newly opened
> registers woud have the column widths set to the last closed register window. 
> See Bug 666576 esp. comment 2
> 
> Jonas, is this the behaviour you describe?

No, I was talking about the Accounts overview page (with the columns Account Name, Description, Balance). I have never needed to change the column widths of the register and have thus never tried it.
Comment 9 Richard Ullger 2014-01-03 19:52:32 UTC
Unfortunately changing the column widths in ~/.gconf apps/gnucash/window/pages/account_tree and apps/gnucash/window/pages/register has no effect on the column widths of the accounts page or the account registers respectively.

The problem with the accounts page as mentioned in the first part of my initial comment #3 is still an issue.
Comment 10 Geert Janssens 2014-01-03 19:58:06 UTC
(In reply to comment #9)
> Unfortunately changing the column widths in ~/.gconf
> apps/gnucash/window/pages/account_tree and apps/gnucash/window/pages/register
> has no effect on the column widths of the accounts page or the account
> registers respectively.
> 
> The problem with the accounts page as mentioned in the first part of my initial
> comment #3 is still an issue.

GnuCash 2.6 doesn't use GConf anymore. The column widths are stored in ~/.gnucash/books/<yourfile>.gcm

You won't find default settings in there though. Those are calculated in code.
Comment 11 Richard Ullger 2014-01-03 22:36:26 UTC
Ah thanks. I misread the New Preference System note at http://gnucash.org/2.6-release-tour.phtml.

Looking in the ~/.gnucash/books/<yourfile>.gcm file, there are no width settings for the columns marked visible true in the Account Hierarchy section and adjusting the columns on the accounts page does not cause them to be inserted. All the columns marked visible false have a corresponding width setting of '0'.

For example, on my accounts page I have the Account Name, Description, Total and Total(GBP) columns. These columns have no corresponding width settings. When I manually add width settings for these columns into the .gcm file, for example name_width=..., the accounts page column widths reflect these settings.

If I then subsequently adjust the column widths on the accounts page, the new column widths are recorded successfully in the .gcm file.
Comment 12 Richard Ullger 2014-01-03 23:27:18 UTC
Unfortunately, adding a new column to the accounts page causes the name_width and description_width entries to be removed from the .gcm file and when you subsequently open your file in gnucash, the Account Name and Description columns on the accounts page have reverted to the default widths.

The width settings for the Total and Total(GBP) columns were retained.
Comment 13 Richard Ullger 2014-01-03 23:38:29 UTC
Removing the added column then caused the width settings for the Total and Total(GBP) columns to be removed from the .gcm file.
Comment 14 Mike Evans 2014-01-04 09:34:37 UTC
*** Bug 721444 has been marked as a duplicate of this bug. ***
Comment 15 Mike Evans 2014-01-09 09:21:46 UTC
*** Bug 721794 has been marked as a duplicate of this bug. ***
Comment 16 Mike Evans 2014-01-14 09:01:48 UTC
*** Bug 722093 has been marked as a duplicate of this bug. ***
Comment 17 Geert Janssens 2014-01-14 14:08:46 UTC
Veigajose is spot on in duplicate bug 722093. The real issue is not starting in a different directory. When you start and stop gnucash without changing column widths, the widths are reset.

I suspect this is because "default width" is interpreted inconsistently in the code (I still have to analyse this further though).

So to reproduce:
- start gnucash
- edit the column widths
- restart gnucash
=> all will be properly restored
- restart gnucash again without editing any column widths
=> width settings are lost
Comment 18 Geert Janssens 2014-01-22 10:58:13 UTC
Fixed in r23741, which will be released with gnucash 2.6.1.

Thank you for reporting this bug.
Comment 19 John Ralls 2018-06-29 23:23:14 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=721306. Please update any external references or bookmarks.