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:
Chris Shoemaker 2006-02-22 03:30:48 +00:00
parent e1e0d326d0
commit da35e7c127
2 changed files with 3 additions and 8 deletions

View File

@ -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) &&

View File

@ -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;
}