From 4342b3e35c92f20cbbdafb9450106dbcd17cae1a Mon Sep 17 00:00:00 2001 From: Dave Peticolas Date: Fri, 25 May 2001 07:32:27 +0000 Subject: [PATCH] 2001-05-25 Dave Peticolas * src/scm/report/account-summary.scm: fix bug * src/gnome/window-main.c: add close window button to toolbar git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4282 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 4 ++++ src/gnome/window-main.c | 21 +++++++++++++++++++++ src/scm/report/account-summary.scm | 8 +++++--- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5df6a19b65..f99845c94a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-05-25 Dave Peticolas + * src/scm/report/account-summary.scm: fix bug + + * src/gnome/window-main.c: add close window button to toolbar + * doc/sgml/C/xacc-about.sgml: fix warnings * doc/sgml/C/xacc-quickstart.sgml: fix warnings diff --git a/src/gnome/window-main.c b/src/gnome/window-main.c index f7d445dd77..516462bbaa 100644 --- a/src/gnome/window-main.c +++ b/src/gnome/window-main.c @@ -816,6 +816,17 @@ static void gnc_main_window_file_close_cb(GtkWidget * widget, GnomeMDI * mdi) { GNCMainChildInfo * inf; + if (!mdi) + { + GNCMainInfo *main_info; + + main_info = gnc_ui_get_data (); + if (!main_info) return; + + mdi = main_info->mdi; + if (!mdi) return; + } + if(mdi->active_child) { inf = gtk_object_get_user_data(GTK_OBJECT(mdi->active_child)); if(inf->toolbar) { @@ -1083,6 +1094,16 @@ gnc_main_window_create_child_toolbar(GNCMainInfo * mi, GNOME_STOCK_PIXMAP_SAVE, 0, 0, NULL }, + { GNOME_APP_UI_ITEM, + N_("Close"), + N_("Close the current notebook page"), + gnc_main_window_file_close_cb, + NULL, + NULL, + GNOME_APP_PIXMAP_STOCK, + GNOME_STOCK_PIXMAP_CLOSE, + 0, 0, NULL + }, GNOMEUIINFO_SEPARATOR }; diff --git a/src/scm/report/account-summary.scm b/src/scm/report/account-summary.scm index e0ec9aad69..75e1d47370 100644 --- a/src/scm/report/account-summary.scm +++ b/src/scm/report/account-summary.scm @@ -152,11 +152,12 @@ (get-option gnc:pagename-general optname-date)))) (report-title (get-option gnc:pagename-general - optname-reportname)) + gnc:optname-reportname)) (doc (gnc:make-html-document)) (txt (gnc:make-html-text))) - (gnc:html-document-set-title! doc report-title)) + (gnc:html-document-set-title! doc report-title) + (if (not (null? accounts)) ;; if no max. tree depth is given we have to find the ;; maximum existing depth @@ -194,7 +195,8 @@ ;; error condition: no accounts specified (gnc:html-document-add-object! doc - (gnc:html-make-no-account-warning report-title)) + (gnc:html-make-no-account-warning report-title))) + doc)) (gnc:define-report