AUDIT: r17365 - gnucash/trunk/src/report/report-gnome - Bug #542967: Go back to using the name of the report template in the title of report options dialog boxes.
Charles Day
cedayiv at cvs.gnucash.org
Sun Jul 20 22:58:50 EDT 2008
Author: cedayiv
Date: 2008-07-20 22:58:50 -0400 (Sun, 20 Jul 2008)
New Revision: 17365
Trac: http://svn.gnucash.org/trac/changeset/17365
Modified:
gnucash/trunk/src/report/report-gnome/window-report.c
Log:
Bug #542967: Go back to using the name of the report template in the title of report options dialog boxes.
BP
Modified: gnucash/trunk/src/report/report-gnome/window-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/window-report.c 2008-07-21 01:21:18 UTC (rev 17364)
+++ gnucash/trunk/src/report/report-gnome/window-report.c 2008-07-21 02:58:50 UTC (rev 17365)
@@ -122,8 +122,10 @@
GtkWidget *
gnc_report_window_default_params_editor(SCM options, SCM report)
{
- SCM get_editor = scm_c_eval_string("gnc:report-editor-widget");
- SCM get_title = scm_c_eval_string("gnc:report-type");
+ SCM get_editor = scm_c_eval_string("gnc:report-editor-widget");
+ SCM get_report_type = scm_c_eval_string("gnc:report-type");
+ SCM get_template = scm_c_eval_string("gnc:find-report-template");
+ SCM get_template_name = scm_c_eval_string("gnc:report-template-name");
SCM ptr;
const gchar *title = NULL;
@@ -144,10 +146,17 @@
prm->cur_report = report;
prm->db = gnc_option_db_new(prm->scm_options);
- ptr = scm_call_1(get_title, report);
- if (SCM_STRINGP(ptr)) {
- title = SCM_STRING_CHARS(ptr);
+ /* Get the title of the report's template. */
+ ptr = scm_call_1(get_report_type, report);
+ if (ptr != SCM_BOOL_F) {
+ ptr = scm_call_1(get_template, ptr);
+ if (ptr != SCM_BOOL_F) {
+ ptr = scm_call_1(get_template_name, ptr);
+ if (SCM_STRINGP(ptr))
+ title = SCM_STRING_CHARS(ptr);
+ }
}
+
/* Don't forget to translate the window title */
prm->win = gnc_options_dialog_new((gchar*) (title && *title ? _(title) : ""));
More information about the gnucash-changes
mailing list