summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Hallendal <micke@codefactory.se>2002-04-14 13:16:32 +0000
committerMikael Hallendal <hallski@src.gnome.org>2002-04-14 13:16:32 +0000
commitfa0a95c6e679a2e64495c2f2dfa2fec58339ff07 (patch)
treefe2df0938ccf80f3181963fda3e49350411b0088
parent9d401fe07d9cb04ceab8f25f95db863d7a9b5a8e (diff)
downloadyelp-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--ChangeLog6
-rw-r--r--src/yelp-db2html.c9
-rw-r--r--src/yelp-html.c1
-rw-r--r--src/yelp-window.c3
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 <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;
}