r22636 - gnucash/trunk/src/report - Fix gnc-help protocol and illustrate its use in the hello world report

Geert Janssens gjanssens at code.gnucash.org
Wed Dec 12 12:42:10 EST 2012


Author: gjanssens
Date: 2012-12-12 12:42:10 -0500 (Wed, 12 Dec 2012)
New Revision: 22636
Trac: http://svn.gnucash.org/trac/changeset/22636

Modified:
   gnucash/trunk/src/report/report-gnome/window-report.c
   gnucash/trunk/src/report/utility-reports/hello-world.scm
Log:
Fix gnc-help protocol and illustrate its use in the hello world report

Modified: gnucash/trunk/src/report/report-gnome/window-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/window-report.c	2012-12-06 19:49:03 UTC (rev 22635)
+++ gnucash/trunk/src/report/report-gnome/window-report.c	2012-12-12 17:42:10 UTC (rev 22636)
@@ -318,7 +318,10 @@
 {
     g_return_val_if_fail (location != NULL, FALSE);
 
-    gnc_gnome_help (location, label);
+    if (label && (*label != '\0'))
+        gnc_gnome_help (location, label);
+    else
+        gnc_gnome_help (location, NULL);
     return TRUE;
 }
 

Modified: gnucash/trunk/src/report/utility-reports/hello-world.scm
===================================================================
--- gnucash/trunk/src/report/utility-reports/hello-world.scm	2012-12-06 19:49:03 UTC (rev 22635)
+++ gnucash/trunk/src/report/utility-reports/hello-world.scm	2012-12-12 17:42:10 UTC (rev 22636)
@@ -448,6 +448,11 @@
            document
            (gnc:make-html-text
             (gnc:html-markup-p (_ "You have selected no accounts.")))))
+            
+      (gnc:html-document-add-object! 
+       document 
+       (gnc:make-html-text 
+        (gnc:html-markup-anchor (gnc-build-url URL-TYPE-HELP "gnucash-guide" "") (_ "Display help"))))
 
       (gnc:html-document-add-object! 
        document 



More information about the gnucash-changes mailing list