diff options
author | Mikael Hallendal <micke@codefactory.se> | 2002-04-14 13:16:32 +0000 |
---|---|---|
committer | Mikael Hallendal <hallski@src.gnome.org> | 2002-04-14 13:16:32 +0000 |
commit | fa0a95c6e679a2e64495c2f2dfa2fec58339ff07 (patch) | |
tree | fe2df0938ccf80f3181963fda3e49350411b0088 | |
parent | 9d401fe07d9cb04ceab8f25f95db863d7a9b5a8e (diff) | |
download | yelp-fa0a95c6e679a2e64495c2f2dfa2fec58339ff07.tar.gz |
pass the error to gnome_url_show.
2002-04-14 Mikael Hallendal <micke@codefactory.se>
* src/yelp-window.c (yw_handle_url): pass the error to
gnome_url_show.
* src/yelp-db2html.c (yelp_db2html_convert): better
error-handling.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/yelp-db2html.c | 9 | ||||
-rw-r--r-- | src/yelp-html.c | 1 | ||||
-rw-r--r-- | src/yelp-window.c | 3 |
4 files changed, 16 insertions, 3 deletions
@@ -1,5 +1,11 @@ 2002-04-14 Mikael Hallendal <micke@codefactory.se> + * 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; } |