summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Hallendal <micke@codefactory.se>2002-08-22 22:46:45 +0000
committerMikael Hallendal <hallski@src.gnome.org>2002-08-22 22:46:45 +0000
commitef06c4eddfb0b3472df014e0f7c8fbe59094e919 (patch)
tree4dd2013653f7668b8d8dcd853f2e358ba613961c
parentc34ee45922bb27e9abdf2ee913424094a55bd91b (diff)
downloadyelp-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--ChangeLog6
-rw-r--r--src/yelp-view-content.c18
2 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 00520e8b..c5f64e6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;