2001-05-24 Christian Stimming <stimming@tuhh.de>

* src/scm/report/average-balance.scm: made strings more
	consistent.

	* src/scm/options-utilities.scm: adjusted the upper bound for plot
	size.

	* src/gnome/dialog-column-view.c: use menu-name in report-list.

	* src/scm/report.scm (gnc:report-menu-name),
	(gnc:report-template-menu-name/name): added functions.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4275 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming
2001-05-24 20:35:05 +00:00
parent 10b47deeb9
commit 9e9beb11a0
5 changed files with 50 additions and 21 deletions

View File

@@ -1,3 +1,16 @@
2001-05-24 Christian Stimming <stimming@tuhh.de>
* src/scm/report/average-balance.scm: made strings more
consistent.
* src/scm/options-utilities.scm: adjusted the upper bound for plot
size.
* src/gnome/dialog-column-view.c: use menu-name in report-list.
* src/scm/report.scm (gnc:report-menu-name),
(gnc:report-template-menu-name/name): added functions.
2001-05-24 Robert Graham Merkel <rgmerk@mira.net>
* doc/sgml/C/gnucash.sgml: add references to new files.

View File

@@ -76,19 +76,21 @@ gnc_column_view_edit_destroy(gnc_column_view_edit * view) {
static void
update_display_lists(gnc_column_view_edit * view) {
SCM get_names = gh_eval_str("gnc:all-report-template-names");
SCM template_menu_name = gh_eval_str("gnc:report-template-menu-name/name");
SCM report_menu_name = gh_eval_str("gnc:report-menu-name");
SCM find_report = gh_eval_str("gnc:find-report");
SCM get_options = gh_eval_str("gnc:report-options");
SCM get_option = gh_eval_str("gnc:lookup-option");
SCM get_value = gh_eval_str("gnc:option-value");
SCM report_name = gh_eval_str("gnc:report-name");
SCM names = gh_call0(get_names);
SCM contents =
gnc_option_db_lookup_option(view->odb, "__general", "report-list",
SCM_BOOL_F);
SCM this_report, this_options, this_name;
SCM this_report, this_name;
SCM selection;
char * name[3];
int row, i;
/* Update the list of available reports (left selection box). */
row = view->available_selected;
if(gh_list_p(view->available_list) && !gh_null_p (view->available_list)) {
@@ -109,7 +111,8 @@ update_display_lists(gnc_column_view_edit * view) {
for(i = 0; !gh_null_p(names); names = gh_cdr(names), i++) {
if (gh_equal_p (gh_car(names), selection))
row = i;
name[0] = gh_scm2newstr(gh_car(names), NULL);
name[0] = gh_scm2newstr(gh_call1(template_menu_name, gh_car(names)),
NULL);
gtk_clist_append(view->available, name);
free(name[0]);
}
@@ -118,6 +121,7 @@ update_display_lists(gnc_column_view_edit * view) {
gtk_clist_thaw(view->available);
/* Update the list of selected reports (right selection box). */
row = view->contents_selected;
if(gh_list_p(view->contents_list) && !gh_null_p (view->contents_list)) {
@@ -140,11 +144,8 @@ update_display_lists(gnc_column_view_edit * view) {
row = i;
this_report = gh_call1(find_report, gh_caar(contents));
this_options = gh_call1(get_options, this_report);
this_name = gh_call1(get_value,
gh_call3(get_option, this_options,
gh_str02scm("General"),
gh_str02scm("Report name")));
/* this_name = gh_call1(report_name, this_report); */
this_name = gh_call1(report_menu_name, this_report);
name[0] = gh_scm2newstr(this_name, NULL);
name[1] = g_strdup_printf("%d", gh_scm2int(gh_cadr(gh_car(contents))));
name[2] = g_strdup_printf("%d", gh_scm2int(gh_caddr(gh_car(contents))));

View File

@@ -248,7 +248,7 @@
pagename name-width
(string-append sort-tag "a")
(N_ "Width of plot in pixels.") default-width
100 1000 0 1))
100 20000 0 5))
(gnc:register-option
options
@@ -256,7 +256,7 @@
pagename name-height
(string-append sort-tag "b")
(N_ "Height of plot in pixels.") default-height
100 1000 0 1)))
100 20000 0 5)))
;; A multicoice option for the marker of a scatter plot.
(define (gnc:options-add-marker-choice!

View File

@@ -213,6 +213,13 @@
(gnc:report-template-new-options templ)
#f)))
(define (gnc:report-template-menu-name/name template-name)
(let ((templ (hash-ref *gnc:_report-templates_* template-name)))
(if templ
(or (gnc:report-template-menu-name templ)
(gnc:report-template-name templ))
#f)))
(define (gnc:report-template-new-options report-template)
(let ((generator (gnc:report-template-options-generator report-template))
(namer
@@ -373,6 +380,14 @@
(gnc:report-template-export-thunk template)
#f)))
(define (gnc:report-menu-name report)
(let ((template (hash-ref *gnc:_report-templates_*
(gnc:report-type report))))
(if template
(or (gnc:report-template-menu-name template)
(gnc:report-name report))
#f)))
(define (gnc:report-name report)
(gnc:option-value
(gnc:lookup-option (gnc:report-options report)

View File

@@ -36,7 +36,7 @@
options gnc:pagename-general optname-from-date optname-to-date "a")
(gnc:options-add-interval-choice!
options gnc:pagename-general optname-stepsize "b" 'TwoWeekDelta)
options gnc:pagename-general optname-stepsize "b" 'MonthDelta)
;; Report currency
(gnc:options-add-currency!
@@ -88,12 +88,10 @@
(gnc:make-list-option
gnc:pagename-display (N_ "Plot Type")
"c" (N_ "The type of graph to generate") (list 'AvgBalPlot)
(list (list->vector
(list 'AvgBalPlot (N_ "Average") (N_ "Average Balance")))
(list->vector
(list 'GainPlot (N_ "Net Gain") (N_ "Net Gain")))
(list->vector
(list 'GLPlot (N_ "Gain/Loss") (N_ "Gain And Loss"))))))
(list
(vector 'AvgBalPlot (N_ "Average") (N_ "Average Balance"))
(vector 'GainPlot (N_ "Profit") (N_ "Profit (Gain minus Loss)"))
(vector 'GLPlot (N_ "Gain/Loss") (N_ "Gain And Loss")))))
(gnc:options-add-plot-size!
options gnc:pagename-display (N_ "Plot Width") (N_ "Plot Height")
@@ -109,9 +107,11 @@
;;;;;;;;;;;;;;;;;;;;;;;;;
(define columns
(list (_ "Period start") (_ "Period end") (_ "Avg Bal")
(_ "Max Bal") (_ "Min Bal") (_ "Total In")
(_ "Total Out") (_ "Net Change") ))
;; Watch out -- these names should be consistent with the display
;; option where you choose them, otherwise users are confused.
(list (_ "Period start") (_ "Period end") (_ "Average")
(_ "Maximum") (_ "Minimum") (_ "Gain")
(_ "Loss") (_ "Profit") ))
;; analyze-splits crunches a split list into a set of period
;; summaries. Each summary is a list of (start-date end-date