diff --git a/gnucash/gnome/top-level.c b/gnucash/gnome/top-level.c index 6f91be1f02..77080180e4 100644 --- a/gnucash/gnome/top-level.c +++ b/gnucash/gnome/top-level.c @@ -47,6 +47,7 @@ #include "gnc-engine.h" #include "gnc-file.h" #include "gnc-hooks.h" +#include "gncInvoice.h" #include "gfec.h" #include "gnc-main-window.h" #include "gnc-menu-extensions.h" @@ -120,6 +121,7 @@ gnc_html_register_url_cb (const char *location, const char *label, Split * split = NULL; Account * account = NULL; Transaction * trans; + GncInvoice * invoice; GList * node; GncGUID guid; QofInstance * entity = NULL; @@ -180,6 +182,19 @@ gnc_html_register_url_cb (const char *location, const char *label, return TRUE; } + else if (strncmp ("invoice-doclink-guid=", location, + strlen ("invoice-doclink-guid=")) == 0) + { + if (!validate_type("invoice-doclink-guid=", location, GNC_ID_INVOICE, + result, &guid, &entity)) + return FALSE; + + invoice = (GncInvoice *) entity; + gnc_doclink_open_uri (gnc_ui_get_gtk_window (GTK_WIDGET (result->parent)), + gncInvoiceGetDocLink (invoice)); + return TRUE; + } + else if (strncmp ("split-guid=", location, strlen ("split-guid=")) == 0) { if (!validate_type("split-guid=", location, GNC_ID_SPLIT, result, &guid, &entity))