• Nelson Benítez León's avatar
    sidebar outline: close auto-expanded rows and remember state · 45abf6a7
    Nelson Benítez León authored
    This commit adds the following features:
    
    - Remember and restore state for rows that were manually
      collapsed and expanded by the user. To save that information
      we use two new metadata keys 'index-expand' and 'index-collapse'.
    
      Metadata key 'index-expand' is a string containing the GtkTreePath's
      that the user has explicitly expanded, except those already marked
      expanded by the pdf producer data. The string format is
      "|path1|path2|path3|" (starting and ending in pipe). A case with
      only one element would be "|path1|". A case with no elements would be
      the empty string "". This is to facilitate the search of the paths.
    
      Metadata key 'index-collapse' is a string containing the GtkTreePath's
      that the pdf producer data had them marked as expanded but the user
      has explicitly collapsed them. The string format is the same as in
      'index_expand'.
    
    - When scrolling through document, take the chance to collapse rows
      that have been automatically expanded previously. This avoids
      cluttering the tree view with too many entries when navigating
      documents that have heavily indexed outlines.
    
    Issue #85
    45abf6a7
ev-utils.h 1.62 KB