mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Don't run the main-window-opened hooks until the main window has
shown up on the screen. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@2889 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
f63ae70416
commit
78870eddb5
@ -30,6 +30,8 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <gtkhtml/gtkhtml.h>
|
||||
|
||||
#include "g-wrap.h"
|
||||
#include "gnc.h"
|
||||
#include "gnucash.h"
|
||||
#include "gnome-top-level.h"
|
||||
#include "window-main.h"
|
||||
@ -309,6 +311,18 @@ gnc_ui_main(void)
|
||||
|
||||
gnome_is_running = TRUE;
|
||||
|
||||
/* Get the main window on screen. */
|
||||
while (gtk_events_pending())
|
||||
gtk_main_iteration();
|
||||
|
||||
/* Run the main window hooks. */
|
||||
{
|
||||
SCM run_danglers = gh_eval_str("gnc:hook-run-danglers");
|
||||
SCM hook = gh_eval_str("gnc:*main-window-opened-hook*");
|
||||
SCM window = POINTER_TOKEN_to_SCM(make_POINTER_TOKEN("gncUIWidget", app));
|
||||
gh_call2(run_danglers, hook, window);
|
||||
}
|
||||
|
||||
/* Enter gnome event loop */
|
||||
gtk_main();
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
#include "global-options.h"
|
||||
#include "dialog-options.h"
|
||||
#include "FileDialog.h"
|
||||
#include "g-wrap.h"
|
||||
#include "gnucash.h"
|
||||
#include "MainWindow.h"
|
||||
#include "Destroy.h"
|
||||
@ -58,7 +57,6 @@
|
||||
#include "EuroUtils.h"
|
||||
#include "Scrub.h"
|
||||
#include "util.h"
|
||||
#include "gnc.h"
|
||||
|
||||
|
||||
/* Main Window information structure */
|
||||
@ -1398,13 +1396,6 @@ mainWindow()
|
||||
gtk_container_add(GTK_CONTAINER(scrolled_win),
|
||||
GTK_WIDGET(main_info->account_tree));
|
||||
|
||||
{
|
||||
SCM run_danglers = gh_eval_str("gnc:hook-run-danglers");
|
||||
SCM hook = gh_eval_str("gnc:*main-window-opened-hook*");
|
||||
SCM window = POINTER_TOKEN_to_SCM(make_POINTER_TOKEN("gncUIWidget", app));
|
||||
gh_call2(run_danglers, hook, window);
|
||||
}
|
||||
|
||||
/* Attach delete and destroy signals to the main window */
|
||||
gtk_signal_connect (GTK_OBJECT (app), "delete_event",
|
||||
GTK_SIGNAL_FUNC (gnc_ui_mainWindow_delete_cb),
|
||||
|
Loading…
Reference in New Issue
Block a user