summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Hallendal <micke@codefactory.se>2002-04-14 13:05:42 +0000
committerMikael Hallendal <hallski@src.gnome.org>2002-04-14 13:05:42 +0000
commit9d401fe07d9cb04ceab8f25f95db863d7a9b5a8e (patch)
tree7d01000a77697dbeadb79df562cf718b6518d65a
parent7d3e0a5ceab87bb380f759d4a5fc30007d7a2c64 (diff)
downloadyelp-9d401fe07d9cb04ceab8f25f95db863d7a9b5a8e.tar.gz
don't free the handle twice. (yelp_html_idle_read_end): reset pointer to
2002-04-14 Mikael Hallendal <micke@codefactory.se> * src/yelp-html.c: (yelp_html_idle_read_end): don't free the handle twice. (yelp_html_idle_read_end): reset pointer to normal. (yelp_html_open_uri): set cursor to watch.
-rw-r--r--ChangeLog5
-rw-r--r--src/yelp-html.c12
-rw-r--r--src/yelp-window.c2
-rw-r--r--src/yelp-window.h2
4 files changed, 16 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b2aa0496..1885cdb9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2002-04-14 Mikael Hallendal <micke@codefactory.se>
+ * src/yelp-html.c:
+ (yelp_html_idle_read_end): don't free the handle twice.
+ (yelp_html_idle_read_end): reset pointer to normal.
+ (yelp_html_open_uri): set cursor to watch.
+
* src/yelp-window.c (yw_handle_url): If error is set during
set_uri, popup an error-dialog describing the error.
diff --git a/src/yelp-html.c b/src/yelp-html.c
index acd709d9..a69bbd61 100644
--- a/src/yelp-html.c
+++ b/src/yelp-html.c
@@ -204,6 +204,7 @@ yelp_html_do_close (void *context)
html_document_close_stream (priv->doc);
gtk_adjustment_set_value (gtk_layout_get_vadjustment (GTK_LAYOUT (priv->view)),
0);
+
return 0;
}
@@ -239,8 +240,6 @@ yelp_html_idle_read (gpointer data)
&read_len);
if (result == GNOME_VFS_OK) {
- g_print ("-> ");
-
yelp_html_do_write (read_data->html,
read_data->buffer,
read_len);
@@ -262,7 +261,6 @@ yelp_html_idle_read_end (gpointer data)
priv = html->priv;
gnome_vfs_close (read_data->handle);
- gnome_vfs_handle_destroy (read_data->handle);
html_stream_close (read_data->stream);
@@ -274,6 +272,8 @@ yelp_html_idle_read_end (gpointer data)
0);
}
+ gdk_window_set_cursor (GTK_WIDGET (priv->view)->window, NULL);
+
g_free (read_data);
}
@@ -420,6 +420,7 @@ yelp_html_open_uri (YelpHtml *html,
GError **error)
{
YelpHtmlPriv *priv;
+ GdkCursor *cursor;
d(g_print ("Open URI: %s\n", str_uri));
@@ -440,6 +441,11 @@ yelp_html_open_uri (YelpHtml *html,
gtk_layout_get_hadjustment (
GTK_LAYOUT (priv->view)), 0);
+ cursor = gdk_cursor_new (GDK_WATCH);
+
+ gdk_window_set_cursor (GTK_WIDGET (priv->view)->window, cursor);
+ gdk_cursor_unref (cursor);
+
if (!strncmp (str_uri, "ghelp:", 6)) {
yelp_html_do_docbook (html, str_uri + 6, error);
/* Docbook or HTML */
diff --git a/src/yelp-window.c b/src/yelp-window.c
index 9451eda0..2e4521b3 100644
--- a/src/yelp-window.c
+++ b/src/yelp-window.c
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Copyright (C) 2001 Mikael Hallendal <micke@codefactory.se>
+ * Copyright (C) 2001-2002 Mikael Hallendal <micke@codefactory.se>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
diff --git a/src/yelp-window.h b/src/yelp-window.h
index 0e184f9a..d2f9424d 100644
--- a/src/yelp-window.h
+++ b/src/yelp-window.h
@@ -1,6 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
- * Copyright (C) 2001 Mikael Hallendal <micke@codefactory.se>
+ * Copyright (C) 2001-2002 Mikael Hallendal <micke@codefactory.se>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as