* src/scm/report/stylesheet-plain.scm: more reports centered

by default

	* src/scm/html-document.scm: Christopher Browne's markup
	style extension.

	* src/gnome/window-main.c (gnc_report_in_main_window): show new
	page

	* doc/sgml/pt_PT/Makefile.am: remove demo html files

	* doc/sgml/es/Makefile.am: remove demo html files

	* doc/sgml/C/Makefile.am: remove demo html files

	* src/gnome/dialog-column-view.c: mark the options dialog
	changes as appropriate

	* src/gnome/dialog-options.c (gnc_options_dialog_changed): new
	public func


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@3844 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Dave Peticolas
2001-03-27 21:45:49 +00:00
parent 9b14280122
commit a4f407ec46
15 changed files with 119 additions and 210 deletions

View File

@@ -1,5 +1,26 @@
2001-03-27 Dave Peticolas <dave@krondo.com>
* src/scm/report/stylesheet-plain.scm: more reports centered
by default
* src/scm/html-document.scm: Christopher Browne's markup
style extension.
* src/gnome/window-main.c (gnc_report_in_main_window): show new
page
* doc/sgml/pt_PT/Makefile.am: remove demo html files
* doc/sgml/es/Makefile.am: remove demo html files
* doc/sgml/C/Makefile.am: remove demo html files
* src/gnome/dialog-column-view.c: mark the options dialog
changes as appropriate
* src/gnome/dialog-options.c (gnc_options_dialog_changed): new
public func
* src/gnome/dialog-tax-info.c: more work
* src/gnome/dialog-options.c: set apply button sensitivity

View File

@@ -1,21 +0,0 @@
<html>
<head>
<title>GnuCash account tree demo</title>
</head>
<body>
<h2>GnuCash account tree demo</h2>
<p>The GnuCash main window account tree widget can be embedded live
in HTML. This is mainly useful for special reports designed to go in the
main window.
<p>
<object classid="gnc-account-tree" width=300 height=400>
<param name="fields" value="1 3 7">
<param name="types" value="0 1 2 3 4 5 6 7 8 9 10">
THIS IS ALT TEXT
</object>
</body>

View File

@@ -1,32 +0,0 @@
<html>
<head>
<title>Guppi Bar Chart Demo</title>
</head>
<body>
<h2>Guppi Bar Chart Demo</h2>
<p>Live Guppi bar charts can now be embedded in any HTML viewed in
Gnucash. This demo doesn't do much but it's possible to add callbacks
to mouse clicks on the graph or the legend.
<p>
<object classid="gnc-guppi-bar" width=400 height=400>
<param name=title value="Bar chart of stupid data">
<param name=subtitle value="NEW! with subtitle">
<param name=data_rows value=6>
<param name=data_cols value=2>
<param name=data
value="100 200 400 800 1600 3200 150 250 450 850 1650 3250">
<param name=row_labels
value="teeny tiny small medium large huge">
<param name=col_labels
value="Texas Florida">
<param name=col_colors
value="red blue">
</object>
<p>and this one.
</body>

View File

@@ -1,42 +0,0 @@
<html>
<head>
<title>Guppi Pie Chart Demo</title>
</head>
<body>
<h2>Guppi Pie Chart Demo</h2>
<p>Live Guppi pie charts can be directly embedded in any HTML that is
displayed withing Gnucash, including reports. The left mouse button
lets you move pie slices around, and the right button lets you rotate
the whole pie.
<p>
<object classid="gnc-guppi-pie" width=400 height=400>
<param name=title value="Pie chart of stupid data">
<param name=subtitle value="NEW! with subtitle">
<param name=datasize value=6>
<param name=data
value="100 200 400 800 1600 3200">
<param name=labels
value="teeny tiny small medium large huge">
<param name=colors
value="red blue orange green purple goldenrod">
<param name=slice_urls_1
value="gnc-help:xacc-regwin.html label1 #label2 #label3 #label4 #label5 #label6">
THIS IS ALT TEXT
</object>
<p id="label1">This is the first pie segment.</p>
<p id="label2">This is the second pie segment.</p>
<p id="label3">This is the third pie segment.</p>
<p id="label4">This is the fourth pie segment.</p>
<p id="label5">This is the fifth pie segment.</p>
<p id="label6">This is the sixth pie segment.</p>
</body>

View File

@@ -1,29 +0,0 @@
<html>
<head>
<title>Guppi Scatter Chart Demo</title>
</head>
<body>
<h2>Guppi Scatter Chart Demo</h2>
<p>Gnucash can't do Guppi line graphs just yet, but we can do scatter
charts. The left mouse button zooms in, the right button zooms out,
and the middle button lets you drag the viewport around.
<p>
<object classid="gnc-guppi-scatter" width=400 height=400>
<param name=title value="Scatter chart of stupid data">
<param name=datasize value=6>
<param name=x_data
value="100 200 400 800 1600 3200">
<param name=y_data
value="10 20 40 80 160 320">
<param name=x_axis_label value="This is an x label">
<param name=y_axis_label value="This is a y label">
<param name=color value=0x0000ff80>
<param name=marker value="filled circle">
</object>
<p>and this one.
</body>

View File

@@ -49,12 +49,7 @@ gnucash_html_dir = $(top_srcdir)/doc/html/C
GNUCASH_HTML_FILES = \
$(gnucash_html_dir)/xacc-tax-report-example.html \
$(gnucash_html_dir)/xacc-txf-categories.html \
$(gnucash_html_dir)/account-tree-demo.html \
$(gnucash_html_dir)/guppi-pie-demo.html \
$(gnucash_html_dir)/guppi-bar-demo.html \
$(gnucash_html_dir)/guppi-points-demo.html
$(gnucash_html_dir)/xacc-txf-categories.html
install-data-local: gnucash/index.html gnucash/help-search-index.db
$(mkinstalldirs) $(DESTDIR)$(gnucash_helpdir)

View File

@@ -50,12 +50,7 @@ gnucash_html_dir = $(top_srcdir)/doc/html/C
GNUCASH_HTML_FILES = \
$(gnucash_html_dir)/xacc-tax-report-example.html \
$(gnucash_html_dir)/xacc-txf-categories.html \
$(gnucash_html_dir)/account-tree-demo.html \
$(gnucash_html_dir)/guppi-pie-demo.html \
$(gnucash_html_dir)/guppi-bar-demo.html \
$(gnucash_html_dir)/guppi-points-demo.html
$(gnucash_html_dir)/xacc-txf-categories.html
install-data-local: gnucash/index.html gnucash/help-search-index.db
$(mkinstalldirs) $(DESTDIR)$(gnucash_helpdir)

View File

@@ -47,12 +47,7 @@ gnucash_html_dir = $(top_srcdir)/doc/html/C
GNUCASH_HTML_FILES = \
$(gnucash_html_dir)/xacc-tax-report-example.html \
$(gnucash_html_dir)/xacc-txf-categories.html \
$(gnucash_html_dir)/account-tree-demo.html \
$(gnucash_html_dir)/guppi-pie-demo.html \
$(gnucash_html_dir)/guppi-bar-demo.html \
$(gnucash_html_dir)/guppi-points-demo.html
$(gnucash_html_dir)/xacc-txf-categories.html
install-data-local: gnucash/index.html gnucash/help-search-index.db
$(mkinstalldirs) $(DESTDIR)$(gnucash_helpdir)

View File

@@ -241,7 +241,10 @@ gnc_column_view_edit_add_cb(GtkButton * button, gpointer user_data) {
gnc_option_db_set_option(r->odb, "__general", "report-list",
r->contents_list);
gnc_options_dialog_changed (r->optwin);
}
update_display_lists(r);
}
@@ -278,9 +281,11 @@ gnc_column_view_edit_remove_cb(GtkButton * button, gpointer user_data) {
gnc_option_db_set_option(r->odb, "__general", "report-list",
r->contents_list);
}
update_display_lists(r);
gnc_options_dialog_changed (r->optwin);
}
update_display_lists(r);
}
void
@@ -312,6 +317,9 @@ gnc_edit_column_view_move_up_cb(GtkButton * button, gpointer user_data) {
gnc_option_db_set_option(r->odb, "__general", "report-list",
r->contents_list);
gnc_options_dialog_changed (r->optwin);
update_display_lists(r);
}
}
@@ -345,9 +353,11 @@ gnc_edit_column_view_move_down_cb(GtkButton * button, gpointer user_data) {
gnc_option_db_set_option(r->odb, "__general", "report-list",
r->contents_list);
gnc_options_dialog_changed (r->optwin);
update_display_lists(r);
}
}
void
@@ -388,6 +398,7 @@ gnc_column_view_edit_size_cb(GtkButton * button, gpointer user_data) {
gh_int2scm(r->contents_selected),
current);
scm_protect_object(r->contents_list);
gnc_options_dialog_changed (r->optwin);
update_display_lists(r);
}
}

View File

@@ -71,7 +71,7 @@ typedef enum {
static void
gnc_option_dialog_changed (GtkWidget *dialog)
gnc_options_dialog_changed_internal (GtkWidget *dialog)
{
GtkWidget *button;
@@ -83,6 +83,14 @@ gnc_option_dialog_changed (GtkWidget *dialog)
gtk_widget_set_sensitive (button, TRUE);
}
void
gnc_options_dialog_changed (GNCOptionWin *win)
{
if (!win) return;
gnc_options_dialog_changed_internal (win->container);
}
static void
gnc_option_changed_cb(GtkEditable *editable, gpointer data)
{
@@ -95,7 +103,7 @@ gnc_option_changed_cb(GtkEditable *editable, gpointer data)
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(raw);
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -108,7 +116,7 @@ gnc_date_option_changed_cb(GtkWidget *dummy, gpointer data)
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(option->widget);
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -709,7 +717,7 @@ default_button_cb(GtkButton *button, gpointer data)
option->changed = TRUE;
pbox = gtk_widget_get_toplevel(GTK_WIDGET(button));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static GtkWidget *
@@ -739,7 +747,7 @@ gnc_option_toggled_cb(GtkToggleButton *button, gpointer data)
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(GTK_WIDGET(button));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
@@ -768,7 +776,7 @@ gnc_option_multichoice_cb(GtkWidget *w, gint index, gpointer data)
omenu = gtk_object_get_data(GTK_OBJECT(w), "gnc_option_menu");
pbox = gtk_widget_get_toplevel(omenu);
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -801,7 +809,7 @@ gnc_option_rd_combo_cb(GtkWidget *w, gint index, gpointer data)
omenu = gtk_object_get_data(GTK_OBJECT(w), "gnc_option_menu");
pbox = gtk_widget_get_toplevel(omenu);
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static GtkWidget *
@@ -985,7 +993,7 @@ gnc_option_account_cb(GNCAccountTree *tree, Account * account, gpointer data)
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(GTK_WIDGET(tree));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -1001,7 +1009,7 @@ gnc_option_account_select_all_cb(GtkWidget *widget, gpointer data)
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(GTK_WIDGET(widget));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -1017,7 +1025,7 @@ gnc_option_account_clear_all_cb(GtkWidget *widget, gpointer data)
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(GTK_WIDGET(widget));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
@@ -1103,7 +1111,7 @@ gnc_option_list_select_cb(GtkCList *clist, gint row, gint column,
gtk_clist_set_row_data(clist, row, GINT_TO_POINTER(TRUE));
pbox = gtk_widget_get_toplevel(GTK_WIDGET(clist));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -1120,7 +1128,7 @@ gnc_option_list_unselect_cb(GtkCList *clist, gint row, gint column,
gtk_clist_set_row_data(clist, row, GINT_TO_POINTER(FALSE));
pbox = gtk_widget_get_toplevel(GTK_WIDGET(clist));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -1136,7 +1144,7 @@ gnc_option_list_select_all_cb(GtkWidget *widget, gpointer data)
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(GTK_WIDGET(widget));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -1152,7 +1160,7 @@ gnc_option_list_clear_all_cb(GtkWidget *widget, gpointer data)
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(GTK_WIDGET(widget));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static GtkWidget *
@@ -1254,7 +1262,7 @@ gnc_option_color_changed_cb(GnomeColorPicker *picker, guint arg1, guint arg2,
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(GTK_WIDGET(picker));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void
@@ -1269,7 +1277,7 @@ gnc_option_font_changed_cb(GnomeFontPicker *picker, gchar *font_name,
gnc_option_call_option_widget_changed_proc(option);
pbox = gtk_widget_get_toplevel(GTK_WIDGET(picker));
gnc_option_dialog_changed (pbox);
gnc_options_dialog_changed_internal (pbox);
}
static void

View File

@@ -38,6 +38,8 @@ void gnc_options_dialog_destroy(GNCOptionWin * win);
GtkWidget * gnc_options_dialog_widget(GNCOptionWin * win);
GtkWidget * gnc_options_dialog_notebook(GNCOptionWin * win);
void gnc_options_dialog_changed (GNCOptionWin *win);
void gnc_options_dialog_set_apply_cb(GNCOptionWin * win,
GNCOptionWinCallback thunk,
gpointer cb_data);

View File

@@ -1698,6 +1698,7 @@ gnc_report_in_main_window (int report_id) {
SCM get_report = gh_eval_str("gnc:find-report");
SCM get_name = gh_eval_str("gnc:report-name");
char * report_name;
gint page_num;
gtk_frame_set_shadow_type(GTK_FRAME(fr), GTK_SHADOW_NONE);
@@ -1709,7 +1710,12 @@ gnc_report_in_main_window (int report_id) {
gtk_notebook_append_page(GTK_NOTEBOOK(mainwin->notebook),
fr, gtk_label_new(report_name));
page_num = gtk_notebook_page_num(GTK_NOTEBOOK(mainwin->notebook), fr);
gtk_notebook_set_page(GTK_NOTEBOOK(mainwin->notebook), page_num);
gnc_set_busy_cursor (NULL);
gnc_report_window_show_report(reptwin, report_id);
gnc_unset_busy_cursor (NULL);
}
/********************* END OF FILE **********************************/

View File

@@ -56,10 +56,6 @@
"gnc-action:get?url=user-reg.php" #f)
((N_ "GnuCash Network Home")
"gnc-action:get/auth?url=gnc-network-home.php" #f)))
((N_ "Guppi Demos") ""
(((N_ "Pie chart") "gnc-help:guppi-pie-demo.html" #f)
((N_ "Bar graph") "gnc-help:guppi-bar-demo.html" #f)
((N_ "Points") "gnc-help:guppi-points-demo.html" #f)))
((N_ "URL Tests") ""
(((N_ "gnucash.org") "http://www.gnucash.org" #f)
((N_ "gnumatic.com") "http://www.gnumatic.com" #f)

View File

@@ -193,7 +193,6 @@
(if (not (null? rest))
rest #f))
(show-result #f))
;; now generate the start tag
(let ((tag (gnc:html-markup-style-info-tag childinfo))
(attr (gnc:html-markup-style-info-attributes childinfo))
@@ -204,30 +203,30 @@
;; "" tags mean "show no tag"; #f tags means use default.
(cond ((not tag)
(set! tag markup))
((string=? tag "")
((and (string? tag) (string=? tag ""))
(set! tag #f)))
(let* ((retval '())
(push (lambda (l) (set! retval (cons l retval)))))
(if tag
(begin
(push "\n<")
(push tag)
(if attr
(hash-fold
(lambda (key value prior)
(push " ") (push key) (push "=")
(push value)
#t)
#f
attr))
(if extra-attrib
(for-each
(push (lambda (l) (set! retval (cons l retval))))
(add-internal-tag (lambda (t) (push "<") (push tag) (push ">")))
(add-attribute
(lambda (key value prior) (push " ") (push key) (push "=")
(push value) #t))
(addextraatt
(lambda (attr)
(cond ((string? attr) (push " ") (push attr))
(attr (gnc:warn "non-string attribute" attr))))
extra-attrib))
(push ">")))
(attr (gnc:warn "non-string attribute" attr)))))
(build-first-tag
(lambda (tag)
(push "\n<") (push tag)
(if attr (hash-fold add-attribute #f attr))
(if extra-attrib (for-each addextraatt extra-attrib))
(push ">"))))
(if tag
(if (list? tag)
(begin
(build-first-tag (car tag))
(for-each add-internal-tag (cdr tag)))
(build-first-tag tag)))
(if (or face size color)
(begin
(push "<font ")
@@ -259,11 +258,15 @@
(if closing-font-tag
(push "</font>\n"))
(if tag
(begin
(let ((addtag (lambda (t)
(push "</")
(push tag)
;; newline after every close tag... just temporary
(push ">\n")))
(push ">\n"))))
(cond
((string? tag)
(addtag tag))
((list? tag)
(for-each addtag (reverse tag))))))
retval))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

View File

@@ -85,6 +85,7 @@
(gnc:html-document-set-style!
ssdoc "body"
'tag '("body" "center")
'attribute (list "bgcolor" bgcolor))
(if (and bgpixmap