diff --git a/src/gnome/Makefile.in b/src/gnome/Makefile.in index 9d3eae7c0d..9dd1c4eef9 100644 --- a/src/gnome/Makefile.in +++ b/src/gnome/Makefile.in @@ -33,6 +33,8 @@ INCLPATH := -I.. \ -I../register \ -I../reports \ -I@srcdir@/../../include \ + -I@top_srcdir@/lib/g-wrap-install/include \ + -I@top_srcdir@/src/g-wrap \ -I${includedir} \ -I../../lib/gtkfilesel2 @@ -43,7 +45,7 @@ LDFLAGS = @LDFLAGS@ GUILELIBS = @GUILELIBS@ LIBS = -L$(prefix)/lib @LIBS@ -lgtkxmhtml \ $(shell ${GNOME_CONFIG_BIN} --libs gnomeui) $(GUILELIBS) \ - ../../lib/g-wrap-install/lib/libgwrapguile.a + @top_srcdir@/lib/g-wrap-install/lib/libgwrapguile.a ifeq (${HAVE_PLOTUTILS},1) LIBS += @PLOTUTILS_LIBS@ @@ -68,7 +70,8 @@ GNOME_SRCS := top-level.c window-main.c window-register.c window-adjust.c \ window-help.c \ ui-callbacks.c window-reconcile.c window-main-menu.c \ dialog-options.c dialog-filebox.c \ - dialog-add.c dialog-edit.c dialog-editnotes.c + dialog-add.c dialog-edit.c dialog-editnotes.c \ + scripts_menu.c ###################################################################### all: gnome diff --git a/src/gnome/window-main.c b/src/gnome/window-main.c index c8787a7b5b..b7c27ec924 100644 --- a/src/gnome/window-main.c +++ b/src/gnome/window-main.c @@ -38,6 +38,8 @@ #include "dialog-options.h" #include "AccWindow.h" +#include "g-wrap.h" + /* This static indicates the debugging module that this .o belongs to. */ static short module = MOD_GUI; @@ -153,11 +155,16 @@ static GnomeUIInfo helpmenu[] = { GNOMEUIINFO_END }; +static GnomeUIInfo scriptsmenu[] = { + GNOMEUIINFO_END +}; + static GnomeUIInfo mainmenu[] = { GNOMEUIINFO_SUBTREE(N_("File"), filemenu), GNOMEUIINFO_SUBTREE(N_("Accounts"), accountsmenu), GNOMEUIINFO_SUBTREE(N_("Reports"), reportsmenu), GNOMEUIINFO_SUBTREE(N_("Options"), optionsmenu), + GNOMEUIINFO_SUBTREE(N_("Extensions"), scriptsmenu), GNOMEUIINFO_SUBTREE(N_("Help"), helpmenu), GNOMEUIINFO_END }; @@ -262,6 +269,13 @@ acct_ctree_unselect(GtkWidget *widget, GtkCTreeNode *row, gint column) return TRUE; } +Session * +gnc_main_window_get_session(gncUIWidget w) { + /* FIXME: right now there's only one session. Eventually we might + allow multiple windows open. */ + return(current_session); +} + static void gnc_ui_refresh_statusbar() { @@ -629,6 +643,13 @@ mainWindow() { gtk_box_pack_start (GTK_BOX (main_vbox), statusbar, FALSE, FALSE, 0); gtk_widget_set_usize ( GTK_WIDGET(app), 500, 400 ); + + { + 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); + } /* Show everything now that it is created */