diff options
author | Mikael Hallendal <micke@codefactory.se> | 2002-08-22 22:46:45 +0000 |
---|---|---|
committer | Mikael Hallendal <hallski@src.gnome.org> | 2002-08-22 22:46:45 +0000 |
commit | ef06c4eddfb0b3472df014e0f7c8fbe59094e919 (patch) | |
tree | 4dd2013653f7668b8d8dcd853f2e358ba613961c | |
parent | c34ee45922bb27e9abdf2ee913424094a55bd91b (diff) | |
download | yelp-ef06c4eddfb0b3472df014e0f7c8fbe59094e919.tar.gz |
Applied patch from Padraig to fix focus handling. Fixes #90010.
2002-08-23 Mikael Hallendal <micke@codefactory.se>
* src/yelp-view-content.c:
(yelp_view_content_show_uri): Applied patch from Padraig to fix
focus handling. Fixes #90010.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/yelp-view-content.c | 18 |
2 files changed, 20 insertions, 4 deletions
@@ -1,3 +1,9 @@ +2002-08-23 Mikael Hallendal <micke@codefactory.se> + + * src/yelp-view-content.c: + (yelp_view_content_show_uri): Applied patch from Padraig to fix + focus handling. Fixes #90010. + 2002-08-22 Kristian Rietveld <kris@gtk.org> * src/yelp-man.c: diff --git a/src/yelp-view-content.c b/src/yelp-view-content.c index fa4961bf..d7d2bdee 100644 --- a/src/yelp-view-content.c +++ b/src/yelp-view-content.c @@ -505,6 +505,7 @@ yelp_view_content_show_uri (YelpViewContent *content, YelpViewContentPriv *priv; GNode *node; GdkCursor *cursor; + gboolean reset_focus = FALSE; g_return_if_fail (YELP_IS_VIEW_CONTENT (content)); g_return_if_fail (uri != NULL); @@ -512,10 +513,6 @@ yelp_view_content_show_uri (YelpViewContent *content, priv = content->priv; if (yelp_uri_get_type (uri) == YELP_URI_TYPE_DOCBOOK_XML) { - /* ghelp uri-scheme /usr/share/gnome/help... */ -/* const gchar *docpath; */ - -/* docpath = yelp_uri_get_path (uri); */ if (!priv->current_uri || !yelp_uri_equal_path (uri, priv->current_uri)) { @@ -528,13 +525,26 @@ yelp_view_content_show_uri (YelpViewContent *content, yelp_view_content_set_tree (content, node); } else { + if (gtk_widget_is_focus (priv->tree_sw)) { + reset_focus = TRUE; + } + gtk_widget_hide (priv->tree_sw); } } } else { + if (gtk_widget_is_focus (priv->tree_sw)) { + reset_focus = TRUE; + } + gtk_widget_hide (priv->tree_sw); } + + if (reset_focus) { + gtk_widget_child_focus (GTK_WIDGET (content), + GTK_DIR_TAB_FORWARD); + } priv->first = TRUE; |