mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
No need to run the BOOK_OPENED hook twice when open a book.
And no need to run it at all when we fail to open a book. Also, require HAVE_GTK26 before using gtk_get_option_group(). git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13358 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
e1e0d326d0
commit
da35e7c127
@ -209,7 +209,7 @@ gnucash_command_line(int *argc, char **argv)
|
||||
char *p;
|
||||
int debugging = 0;
|
||||
char *namespace_regexp = NULL;
|
||||
#ifndef HAVE_GLIB26
|
||||
#ifndef HAVE_GTK26
|
||||
poptContext pc;
|
||||
int rc;
|
||||
struct poptOption options[] = {
|
||||
@ -457,8 +457,7 @@ inner_main (void *closure, int argc, char **argv)
|
||||
if (!nofile && (fn = get_file_to_load())) {
|
||||
gnc_update_splash_screen(_("Loading data..."));
|
||||
gnc_destroy_splash_screen();
|
||||
if (gnc_file_open_file(fn))
|
||||
gnc_hook_run(HOOK_BOOK_OPENED, NULL);
|
||||
gnc_file_open_file(fn);
|
||||
g_free(fn);
|
||||
}
|
||||
else if (gnc_gconf_get_bool("dialogs/new_user", "first_startup", &error) &&
|
||||
|
@ -777,10 +777,6 @@ gnc_post_file_open (const char * filename)
|
||||
gnc_engine_resume_events ();
|
||||
gnc_gui_refresh_all ();
|
||||
|
||||
/* CAS: This doesn't seem right. We failed. */
|
||||
/* Call this after re-enabling events. */
|
||||
gnc_book_opened ();
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user