summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Hallendal <micke@codefactory.se>2003-06-03 21:47:27 +0000
committerMikael Hallendal <hallski@src.gnome.org>2003-06-03 21:47:27 +0000
commit2e6a6895e304116b322339bf89bddc130765e5e5 (patch)
tree57c9dbdac5430ee115c9a11676445124ebee7100
parenta6750c818ea70ad4491c9c00c0c232c00a0ad705 (diff)
downloadyelp-2e6a6895e304116b322339bf89bddc130765e5e5.tar.gz
- Use gtp_tree_view_expand_to_path to expand the tree instead of callin
2003-06-03 Mikael Hallendal <micke@codefactory.se> * src/yelp-view-content.c: (content_reader_finished_cb): - Use gtp_tree_view_expand_to_path to expand the tree instead of callin gtk_tree_view_expand_path on all parents. Fixes #113977
-rw-r--r--ChangeLog6
-rw-r--r--src/yelp-view-content.c27
2 files changed, 12 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index d9bd0223..26ca9b63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-06-03 Mikael Hallendal <micke@codefactory.se>
+
+ * src/yelp-view-content.c: (content_reader_finished_cb):
+ - Use gtp_tree_view_expand_to_path to expand the tree instead of callin
+ gtk_tree_view_expand_path on all parents. Fixes #113977
+
2003-05-06 Paul Duffy <dubhthach@frink.nuigalway.ie>
* configure.in: Added "ga" to ALL_LINGUAS
diff --git a/src/yelp-view-content.c b/src/yelp-view-content.c
index ffc3c16e..c7f3ab2f 100644
--- a/src/yelp-view-content.c
+++ b/src/yelp-view-content.c
@@ -283,30 +283,23 @@ content_reader_finished_cb (YelpReader *reader,
if (path) {
GtkTreeSelection *selection;
GtkTreePath *parent;
-
+ gint i, depth;
+
/* Open the correct node in the tree */
d(g_print ("Found path\n"));
selection = gtk_tree_view_get_selection (
GTK_TREE_VIEW (priv->content_tree));
-
- parent = gtk_tree_path_copy (path);
- gtk_tree_path_up (parent);
-
- gtk_tree_view_expand_row (GTK_TREE_VIEW (priv->content_tree),
- parent, FALSE);
-
- gtk_tree_view_expand_row (GTK_TREE_VIEW (priv->content_tree),
- path, TRUE);
-
+ gtk_tree_view_expand_to_path (GTK_TREE_VIEW (priv->content_tree),
+ path);
+
g_signal_handlers_block_by_func (
selection,
(gpointer) content_tree_selection_changed_cb,
view);
-/* gtk_tree_selection_select_path (selection, path); */
gtk_tree_view_set_cursor (GTK_TREE_VIEW (priv->content_tree),
path, NULL, FALSE);
@@ -314,16 +307,8 @@ content_reader_finished_cb (YelpReader *reader,
selection,
(gpointer) content_tree_selection_changed_cb,
view);
-
- while (gtk_tree_path_up (path)) {
- gtk_tree_view_expand_row (
- GTK_TREE_VIEW (priv->content_tree),
- path, FALSE);
- }
-
+
gtk_tree_path_free (path);
- gtk_tree_path_free (parent);
-
} else {
gtk_widget_grab_focus (priv->html_widget);
}