After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585967 - [Side pane] Option to recursively expand entries in the index tree
[Side pane] Option to recursively expand entries in the index tree
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
2.26.x
Other All
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 638625 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-16 10:42 UTC by Jeroen Hoek
Modified: 2016-11-25 08:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Ctrl+Click on an entry to recursively expand. (1.22 KB, patch)
2013-10-27 10:39 UTC, Spandana
needs-work Details | Review
Ctrl+Click on an entry to recursively expand. (1.31 KB, patch)
2013-11-02 05:18 UTC, Spandana
reviewed Details | Review

Description Jeroen Hoek 2009-06-16 10:42:48 UTC
When viewing documents that supply table of contents data the index part of the side pane can use, it is sometimes useful to expand that tree structure to get an overview of the chapters and sections of the document without having to browse back to the table of contents in the actual document.

Currently, clicking on an entry expands it, and lists its sub-entries (if any). These sub-entries start of closed, so if you want to see all sub-entries (and their sub-entries, etc.) for a specific node in the tree, you have to click all the entries one by one to expand them.

I would like to suggest adding an option to recursively expand all sub-entries. This might be implemented by adding an option to the context menu, and additionally, perhaps by having a CTRL + click on an entry do the same.

Other information:
Comment 1 Florian Moretz 2013-02-19 06:03:04 UTC
I agree with this. Having to click on all nodes just to expand all sub-entries can be quite a hassle when working with large documents. A shortcut like the one proposed in the OP would greatly enhance the user experience in this respect.
Comment 2 Spandana 2013-10-27 10:39:20 UTC
Created attachment 258208 [details] [review]
Ctrl+Click on an entry to recursively expand.
Comment 3 Carlos Garcia Campos 2013-10-29 08:36:02 UTC
Review of attachment 258208 [details] [review]:

Thanks for the patch, but I think we should expand all entries recursively when clicking on the expander, not the row itself. You should also configure your git to use a valid author and email, see https://wiki.gnome.org/Git/Developers#Setting_up_Git

::: shell/ev-sidebar-links.c
@@ +364,3 @@
 
+	if (event->button == GDK_BUTTON_PRIMARY && 
+			event->state == GDK_CONTROL_MASK) {

This doesn't work, you should use & instead of == with the mask. The indentation is not correct.

@@ +365,3 @@
+	if (event->button == GDK_BUTTON_PRIMARY && 
+			event->state == GDK_CONTROL_MASK) {
+			if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (treeview),

Indentation is not correct here either, we use 8 spaces.

@@ +371,3 @@
+											   NULL, NULL, NULL)) {		
+				gtk_tree_view_expand_row (GTK_TREE_VIEW (treeview),
+											  path, TRUE);

You should free the path.

@@ +372,3 @@
+				gtk_tree_view_expand_row (GTK_TREE_VIEW (treeview),
+											  path, TRUE);
+				

If we ended up here, it's because button is not 3, so you can return here.
Comment 4 Spandana 2013-11-02 05:18:00 UTC
Created attachment 258793 [details] [review]
Ctrl+Click on an entry to recursively expand.
Comment 5 Germán Poo-Caamaño 2013-11-02 08:03:02 UTC
*** Bug 638625 has been marked as a duplicate of this bug. ***
Comment 6 Germán Poo-Caamaño 2014-05-03 17:36:38 UTC
Review of attachment 258793 [details] [review]:

This patch looks correct to me (besides a trailing space).

Ok to commit it?
Comment 7 Carlos Garcia Campos 2014-05-04 08:50:43 UTC
The patch still expands the tree when clicking on the row, not when clicking the expander. I'm not sure it's possible to do that with the cell renderer, though.
Comment 8 Germán Poo-Caamaño 2014-05-05 06:37:03 UTC
(In reply to comment #7)
> The patch still expands the tree when clicking on the row, not when clicking
> the expander. I'm not sure it's possible to do that with the cell renderer,
> though.

I don't think so. I filed a bug in gtk+ for adding such behaviour:
https://bugzilla.gnome.org/show_bug.cgi?id=729531

This does not mean that this is going to be fixed.

On seconds thoughts, clicking on the row is not that bad, considering
it will be ctrl+click and not a regular click.
Comment 9 Adam Dingle 2016-11-24 18:52:58 UTC
If you select a row and type Shift + <right arrow>, it recursively expands all entries beneath it.  This is built-in GtkTreeView behavior.  I think this is good enough - yes?  If so, this is just a documentation issue.
Comment 10 Jeroen Hoek 2016-11-25 08:05:31 UTC
Yes indeed! It seems that since I reported this issue seven years ago GtkTreeView introduced this useful behaviour. Thanks for pointing it out, I didn't know it could do that.