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 436479 - Gnucash doesn't display the data file name in the title bar
Gnucash doesn't display the data file name in the title bar
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: User Interface General
git-master
Other All
: Normal minor
: ---
Assigned To: Geert Janssens
gnucash-ui-maint
Depends on:
Blocks:
 
 
Reported: 2007-05-06 23:42 UTC by Zach Sadecki
Modified: 2018-06-29 21:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
error msg (33.46 KB, image/png)
2010-09-13 16:40 UTC, Charles Tharp
Details

Description Zach Sadecki 2007-05-06 23:42:42 UTC
Open any datafile, and open a single register page.  Now select Windows->New Window with page.  There will now be 2 gnucash windows open.  Close the window with the "Accounts" page in it.  Now in the remaining window select the close toolbar button to close the register page that was open.  You should now be left with a gnucash window with no open pages in it.  There is no way to make the "accounts" page reappear.  If you close that window, then next time you open gnucash you'll be stuck with a empty window and no way to fix it short of deleting (or hacking) your config files (.gnucash or .gnome or whatever).

If you have the 'since last run on startup' preference unchecked, then when you open a file, the filename doesn't even show up in the window title (as if you didn't open it).  Try opening another file and it will act like it's opening, but then will show <no file> in the title bar.

A potential solution to this would be to force an 'accounts' page in any additional windows opened up...  Or just eliminate that "new window with page" option.  What use is that option anyways?
Comment 1 David Hampton 2007-05-06 23:52:31 UTC
Both before and after closing the data file, you can use the "File->New->New Accounts Page" command to get a new chart of accounts page.

I agree that its a bug that the newly opened instance (with no pages) doesn't display the file name in the title bar, but that's a minor bug.
Comment 2 Andreas Köhler 2007-05-08 22:08:59 UTC
I agree with comment 1.  That has been fixed in r16069 for GnuCash 2.1.2.
Comment 3 Zach Sadecki 2007-05-09 02:27:13 UTC
Not fixed in r16069.  Follow the steps in my initial bug report, and the gnucash will still open with no pages in the main window, and <no file> in the title bar..   specific steps:

- Open Gnucash
- Open a single register window
- Select Windows->New Window with page
- Close the Gnucash window that contains the 'Accounts' page
- In the the other Gnucash window, close the register page.
- You're now left with a empty Gnucash window (but it still has the filename in the titlebar)
- Now close Gnucash and re-open it.
- You now have an empty Gnucash window, but it says <no file> in the title bar.  Opening your datafile again, using file->open doesn't change anything.  If you do a file->new->new accounts page, the titlebar name shows up as it should..

I'm still of the opinion that you shouldn't be able to have a Gnucash window without an accounts page, as I don't understand why you'd ever want that.  And it was pretty confusing to me when I accidentally made it go away (since I never noticed or had need for the 'new accounts page' feature before).

Also, I've noticed that when I go though these steps, some of my preferences go back to defaults (I have view->summary bar unchecked).  I guess they must be per window preferences...


Comment 4 Andreas Köhler 2007-05-10 07:45:27 UTC
Ok.  I think it would be nice if GnuCash would add a account tree page after all windows have been restored if there is exactly one window and no page in it.  But I do not know how to fix that without making gnome-utils depend on gnome.  Hampton?

Empty windows are not saved, but only increment the window count.  Any idea how to improve that?
Comment 5 Charles Tharp 2010-09-13 16:40:16 UTC
Created attachment 170173 [details]
error msg
Comment 6 Charles Tharp 2010-09-13 16:44:27 UTC
Attachment was not supposed to remove comment.
was able to open two instance of gnucash 3.15, on windows 7, remote mysql made transactions on each of the instance. closed normally. but could not reopen gnucash.    had to manually delete the last transaction on the mysql database to get gnucash to open again.
Comment 7 Geert Janssens 2011-01-25 17:05:51 UTC
@Charles: you should have created a new bug report. The comments you added have nothing to do with the original report. Having said that, GnuCash 2.4.0 has a locking mechanism in place to prevent you from opening the same database simultaneously from two different PC's, so you won't run into that problem again when you use that version. Note that you will have to resave your data to xml first, then upgrade and then load it back into mysql. There have been some changes in the db backends and no migration path yet.

Should you encounter any further problems with this, please post your questions on the gnucash-user mailing list or open a new bug report. Don't add any further comments to this report please, unless they deal with the original problem. Thank you.
Comment 8 Geert Janssens 2011-04-29 14:32:39 UTC
This problem has been fixed in the development version (r20599). I have taken a slightly different approach based on this remark from comment 3:

> I'm still of the opinion that you shouldn't be able to have a Gnucash window
> without an accounts page, as I don't understand why you'd ever want that.

I think you can have a GnuCash window without an accounts page (for example showing a report in a separate window). I think though that an empty window doesn't make sense. If you have multiple windows open, closing the last tab on a window will close that window automatically. This doesn't happen when you try to close the last tab on the last open window, because that would close GnuCash. That is how you can end up with an empty window.

I have now changed the code as follows: if you close the last tab of the last window, a new accounts page will automatically be opened. That means that you will never end up with an empty window, so you will always have at least one tab that will be saved and restored when you restart GnuCash.
If you follow the first 4 steps in comment 3 and then close gnucash, it will load the register tab on reopening, but not the accounts page (it was not saved).
If you follow the first 5 steps, the register tab will be closed and an accounts tab will automatically be opened.
So depending on the situation, you will have an accounts tab or not. But in any case, closing all non accounts tabs will always open you a new accounts tab if none is present.

For all other cases, you can use View->New accounts page to reopen an accounts tab.

The fix will be available in the next major software release. Thank you for your bug report.
Comment 9 Geert Janssens 2011-04-29 16:37:11 UTC
Unfortunately, I had to revert my changes as they cause a segfault on File->New.

I'll have a look at it again later.
Comment 10 John Ralls 2013-12-09 01:23:17 UTC
Dunno when it got fixed, but it works correctly now. Specifically, the file name appears in the titlebar even when there are no pages open, even after restarting Gnucash, and View>New Accounts Page also works in that condition.
Comment 11 Geert Janssens 2013-12-10 17:17:21 UTC
The display of the data file name in the title appears to be fixed indeed.

I was keeping this bug report open because the secondary complaint wasn't fixed: when opening a data file, gnucash should never present the user with an empty window.

Thanks for reminding me I had to revisit this part ;)

I have now pushed commit r23528. This will cause gnucash to open an account hierarchy page automatically if the saved state of the first main window doesn't define any pages.
Comment 12 John Ralls 2018-06-29 21:36:07 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=436479. Please update any external references or bookmarks.