Avoid instantiating the current session until we're actually opening a file.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13357 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Chris Shoemaker 2006-02-22 03:05:20 +00:00
parent 6ec9c70b26
commit e1e0d326d0
2 changed files with 5 additions and 2 deletions

View File

@ -532,6 +532,8 @@ gnc_file_query_save (gboolean can_cancel)
{
GtkWidget *parent = gnc_ui_get_toplevel();
if (!gnc_current_session_exist())
return TRUE;
/* If user wants to mess around before finishing business with
* the old file, give em a chance to figure out what's up.
* Pose the question as a "while" loop, so that if user screws

View File

@ -996,10 +996,11 @@ gnc_main_window_generate_title (GncMainWindow *window)
{
GncMainWindowPrivate *priv;
GncPluginPage *page;
const gchar *filename;
const gchar *filename = NULL;
gchar *title, *ptr;
filename = gnc_session_get_url (gnc_get_current_session ());
if (gnc_current_session_exist())
filename = gnc_session_get_url (gnc_get_current_session ());
if (!filename)
filename = _("<no file>");