mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
* Convert all (well, most all) HTML URL-generators to use
gnc_build_url() (or gnc:html-build-url in scheme) instead of assuming the HTML prototype string. Unfortunately the help-window-index.scm cannot be fixed. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@7060 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
40c360338a
commit
40f6ede615
@ -1,3 +1,9 @@
|
||||
2002-07-01 Derek Atkins <derek@ihtfp.com>
|
||||
* Convert all (well, most all) HTML URL-generators to use
|
||||
gnc_build_url() (or gnc:html-build-url in scheme) instead of
|
||||
assuming the HTML prototype string. Unfortunately the
|
||||
help-window-index.scm cannot be fixed.
|
||||
|
||||
2002-07-01 Joshua Sled <jsled@asynchronous.org>
|
||||
|
||||
* src/gnome-utils/gnc-dense-cal.c (gnc_dense_cal_mark_remove):
|
||||
|
@ -186,7 +186,7 @@ gnc_help_show_topic (gnc_help_window *help, const char * location)
|
||||
{
|
||||
char *help_loc;
|
||||
|
||||
help_loc = g_strconcat ("gnc-help:", location, NULL);
|
||||
help_loc = gnc_build_url (URL_TYPE_HELP, location, NULL);
|
||||
if (safe_strcmp (help_loc, node_loc) != 0)
|
||||
node = NULL;
|
||||
g_free (help_loc);
|
||||
@ -200,7 +200,7 @@ gnc_help_show_topic (gnc_help_window *help, const char * location)
|
||||
|
||||
if (!node)
|
||||
{
|
||||
char *help_loc = g_strconcat ("gnc-help:", location, NULL);
|
||||
char *help_loc = gnc_build_url (URL_TYPE_HELP, location, NULL);
|
||||
node = gtk_ctree_find_by_row_data_custom (ctree, NULL, help_loc,
|
||||
compare_locations);
|
||||
g_free (help_loc);
|
||||
|
@ -226,6 +226,7 @@ gnc_acct_tree_view_new(GnomeMDIChild * child, gpointer user_data)
|
||||
GNCMDIChildInfo * mc = g_new0(GNCMDIChildInfo, 1);
|
||||
GNCAcctTreeWin * win = gnc_acct_tree_window_new(child->name);
|
||||
GtkWidget * popup;
|
||||
char * name_id;
|
||||
char * name;
|
||||
|
||||
mc->contents = gnc_acct_tree_window_get_widget(win);
|
||||
@ -242,8 +243,10 @@ gnc_acct_tree_view_new(GnomeMDIChild * child, gpointer user_data)
|
||||
gtk_object_set_user_data(GTK_OBJECT(child), mc);
|
||||
|
||||
/* set the child name that will get used to save app state */
|
||||
name = g_strdup_printf("gnc-acct-tree:id=%d", win->options_id);
|
||||
name_id = g_strdup_printf("id=%d", win->options_id);
|
||||
name = gnc_build_url (URL_TYPE_ACCTTREE, name_id, NULL);
|
||||
gnome_mdi_child_set_name(mc->child, name);
|
||||
g_free (name_id);
|
||||
g_free (name);
|
||||
|
||||
gtk_signal_connect(GTK_OBJECT(child), "destroy",
|
||||
|
@ -228,7 +228,9 @@ gnc_report_window_create_child(const gchar * configstring) {
|
||||
|
||||
void
|
||||
gnc_main_window_open_report(int report_id, gint toplevel) {
|
||||
char * child_name = g_strdup_printf("gnc-report:id=%d", report_id);
|
||||
char * id_name = g_strdup_printf("id=%d", report_id);
|
||||
char * child_name = gnc_build_url (URL_TYPE_REPORT, id_name, NULL);
|
||||
g_free (id_name);
|
||||
gnc_main_window_open_report_url(child_name, toplevel);
|
||||
}
|
||||
|
||||
|
@ -26,30 +26,27 @@
|
||||
(cons #f (gnc:html-make-empty-cells (- n 1)))
|
||||
'()))
|
||||
|
||||
(define (register-guid guid)
|
||||
(gnc:html-build-url gnc:url-type-register (string-append "guid=" guid) #f))
|
||||
|
||||
(define (gnc:account-anchor-text acct)
|
||||
(string-append
|
||||
"gnc-register:guid="
|
||||
(gnc:account-get-guid acct)))
|
||||
(register-guid (gnc:account-get-guid acct)))
|
||||
|
||||
(define (gnc:split-anchor-text split)
|
||||
(string-append
|
||||
"gnc-register:guid="
|
||||
(gnc:split-get-guid split)))
|
||||
(register-guid (gnc:split-get-guid split)))
|
||||
|
||||
(define (gnc:transaction-anchor-text trans)
|
||||
(string-append
|
||||
"gnc-register:guid="
|
||||
(gnc:transaction-get-guid trans)))
|
||||
(register-guid (gnc:transaction-get-guid trans)))
|
||||
|
||||
(define (gnc:report-anchor-text report-id)
|
||||
(string-append
|
||||
"gnc-report:id="
|
||||
(number->string report-id)))
|
||||
(gnc:html-build-url gnc:url-type-report
|
||||
(string-append "id=" (number->string report-id))
|
||||
#f))
|
||||
|
||||
(define (gnc:price-anchor-text price)
|
||||
(string-append
|
||||
"gnc-price:guid="
|
||||
(gnc:price-get-guid price)))
|
||||
(gnc:html-build-url gnc:url-type-price
|
||||
(string-append "guid=" (gnc:price-get-guid price))
|
||||
#f))
|
||||
|
||||
;; Make a new report and return the anchor to it. The new report of
|
||||
;; type 'reportname' will have the option values copied from
|
||||
@ -722,7 +719,10 @@
|
||||
p
|
||||
(gnc:html-markup-p
|
||||
(gnc:html-markup-anchor
|
||||
(sprintf #f "gnc-options:report-id=%a" report-id)
|
||||
(gnc:html-build-url gnc:url-type-options
|
||||
(string-append "report-id="
|
||||
(sprintf #f "%a" report-id))
|
||||
#f)
|
||||
(_ "Edit report options")))))
|
||||
p))
|
||||
|
||||
@ -741,6 +741,9 @@
|
||||
p
|
||||
(gnc:html-markup-p
|
||||
(gnc:html-markup-anchor
|
||||
(sprintf #f "gnc-options:report-id=%a" report-id)
|
||||
(gnc:html-build-url gnc:url-type-options
|
||||
(string-append "report-id"
|
||||
(sprintf #f "%a" report-id))
|
||||
#f)
|
||||
(_ "Edit report options")))))
|
||||
p))
|
||||
|
@ -21,6 +21,7 @@
|
||||
|
||||
(gnc:module-load "gnucash/engine" 0)
|
||||
(gnc:module-load "gnucash/app-utils" 0)
|
||||
(gnc:module-load "gnucash/gnome-utils" 0) ; for the html routines
|
||||
|
||||
;; commodity-utilities.scm
|
||||
(export gnc:commodity-is-currency?)
|
||||
|
@ -12,6 +12,7 @@
|
||||
(debug-enable 'backtrace)
|
||||
|
||||
(gnc:module-load "gnucash/report/report-system" 0)
|
||||
(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc:html-build-url
|
||||
|
||||
;; This function will generate a set of options that GnuCash
|
||||
;; will use to display a dialog where the user can select
|
||||
@ -429,7 +430,8 @@ new, totally cool report, consult the mailing list %s.")
|
||||
;; need to do is pass the HREF "gnc-register:account=My
|
||||
;; Account Name" to html-markup-anchor. The account name
|
||||
;; passed must be the "full" account name that you get from
|
||||
;; gnc:account-get-full-name.
|
||||
;; gnc:account-get-full-name. You should build this url using
|
||||
;; (gnc:html-build-url ...)
|
||||
;;
|
||||
;; html-markup-anchor takes the link to jump to as its first
|
||||
;; arg and then puts the remaining args in the body of the
|
||||
@ -445,9 +447,11 @@ new, totally cool report, consult the mailing list %s.")
|
||||
(map
|
||||
(lambda (acct)
|
||||
(gnc:html-markup-anchor
|
||||
(string-append
|
||||
"gnc-register:account="
|
||||
(gnc:account-get-full-name acct))
|
||||
(gnc:html-build-url gnc:url-type-register
|
||||
(string-append "account="
|
||||
(gnc:account-get-full-name
|
||||
acct))
|
||||
#f)
|
||||
(gnc:account-get-name acct)))
|
||||
accounts))))
|
||||
(gnc:html-document-add-object!
|
||||
|
@ -34,6 +34,7 @@
|
||||
(require 'printf)
|
||||
|
||||
(gnc:module-load "gnucash/report/report-system" 0)
|
||||
(gnc:module-load "gnucash/gnome-utils" 0) ;for gnc:html-build-url
|
||||
|
||||
(define (make-options)
|
||||
(let* ((options (gnc:new-options))
|
||||
@ -153,11 +154,19 @@
|
||||
report-table
|
||||
(list (gnc:make-html-text
|
||||
(gnc:html-markup-anchor
|
||||
(sprintf #f "gnc-options:report-id=%a" (car report-info))
|
||||
(gnc:html-build-url
|
||||
gnc:url-type-options
|
||||
(string-append "report-id="
|
||||
(sprintf #f "%a" (car report-info)))
|
||||
#f)
|
||||
(_ "Edit Options"))
|
||||
" "
|
||||
(gnc:html-markup-anchor
|
||||
(sprintf #f "gnc-report:id=%a" (car report-info))
|
||||
(gnc:html-build-url
|
||||
gnc:url-type-report
|
||||
(string-append "id="
|
||||
(sprintf #f "%a" (car report-info)))
|
||||
#f)
|
||||
(_ "Single Report")))))
|
||||
|
||||
;; add the report-table to the toplevel-cell
|
||||
|
@ -1,4 +1,4 @@
|
||||
(((N_ "GnuCash Manual") "gnc-help:index.html"
|
||||
(((N_ "GnuCash Manual") "gnc-help:index.html"
|
||||
(((N_ "Getting Started") ""
|
||||
(((N_ "Welcome") "gnc-help:xacc-quickstart.html" #f)
|
||||
((N_ "Remedial Accounting 101")
|
||||
|
@ -106,8 +106,9 @@ the account instead of opening a register.") #f))
|
||||
(gnc:generate-restore-forms optobj "options")
|
||||
(simple-format
|
||||
#f " (hash-set! gnc:*acct-tree-options* ~A options)\n" id)
|
||||
(simple-format
|
||||
#f " \"gnc-acct-tree:id=~S\")\n\n" id)))
|
||||
" \""
|
||||
(gnc:html-build-url gnc:url-type-accttree (sprintf #f "%a" id) #f)
|
||||
"\")\n\n"))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
Loading…
Reference in New Issue
Block a user