From fa0a95c6e679a2e64495c2f2dfa2fec58339ff07 Mon Sep 17 00:00:00 2001 From: Mikael Hallendal Date: Sun, 14 Apr 2002 13:16:32 +0000 Subject: pass the error to gnome_url_show. 2002-04-14 Mikael Hallendal * src/yelp-window.c (yw_handle_url): pass the error to gnome_url_show. * src/yelp-db2html.c (yelp_db2html_convert): better error-handling. --- ChangeLog | 6 ++++++ src/yelp-db2html.c | 9 +++++++++ src/yelp-html.c | 1 - src/yelp-window.c | 3 +-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1885cdb9..329027cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2002-04-14 Mikael Hallendal + * src/yelp-window.c (yw_handle_url): pass the error to + gnome_url_show. + + * src/yelp-db2html.c (yelp_db2html_convert): better + error-handling. + * src/yelp-html.c: (yelp_html_idle_read_end): don't free the handle twice. (yelp_html_idle_read_end): reset pointer to normal. diff --git a/src/yelp-db2html.c b/src/yelp-db2html.c index ebea179d..36c2d9cf 100644 --- a/src/yelp-db2html.c +++ b/src/yelp-db2html.c @@ -114,6 +114,15 @@ yelp_db2html_convert (const gchar *document, gdb_split_docname = g_strsplit(gdb_docname, ".", 2); + if (!g_file_test (gdb_docname, G_FILE_TEST_EXISTS)) { + g_set_error (error, + YELP_ERROR, + YELP_ERROR_DOCBOOK_2_HTML, + _("The document '%s' does not exist"), + gdb_docname); + return FALSE; + } + if (!strcmp(gdb_split_docname[1], "sgml")) { gdb_doc = docbParseFile(gdb_docname, "UTF-8"); } else { diff --git a/src/yelp-html.c b/src/yelp-html.c index a69bbd61..751d7196 100644 --- a/src/yelp-html.c +++ b/src/yelp-html.c @@ -468,4 +468,3 @@ yelp_html_get_widget (YelpHtml *html) return GTK_WIDGET (html->priv->view); } - diff --git a/src/yelp-window.c b/src/yelp-window.c index 2e4521b3..42f86d28 100644 --- a/src/yelp-window.c +++ b/src/yelp-window.c @@ -345,8 +345,7 @@ yw_handle_url (YelpWindow *window, const gchar *url) &error); handled = TRUE; } else { - /* FIXME: Show dialog on failure? */ - gnome_url_show (url, NULL); + gnome_url_show (url, error); handled = FALSE; } -- cgit v1.2.1