Split/dual pane view again (but this time with code)



After reading through the former split-view threads, bugreports,
dozens of duplicate Ubuntu brainstorm ideas, blogs, forums etc on that
topic, I decided to go ahead and get my hands dirty on implementing
split-view browsing in nautilus.

I've uploaded a short demo screencast at
http://www.youtube.com/watch?v=yqBDEi17l2A

UI-wise, I've made the patch minimal-invasive. The spatial view didn't
change at all, the browser window got a single additional "Split View"
toggle button in the "View" menu.

Unfortunately, code-wise, the patch is rather invasive, as too many
attributes are window-global in the current implementation. Significant
refactorization was neccesary in order to allow for a clean
implementation of having two slots open side-by-side in a single window.

The patch introduces an additional layer between a window and a
slot, called a "pane". A pane collects all information which is needed
for meaningfully displaying a slot. Most importantly, it contains the
slot notebook and a corresponding location bar.

The concept of an "active slot" has been moved out of the window and
into the pane: Each pane contains a list of slots, and an active slot
pointer.

Likewise, the window now keeps track of a list of panes instead of
slots, and holds a pointer to an "active pane". Much logic that used to
be window-specific now became pane-specific. Most is a straight-forward
translation of above concept (i.e. window->details->active_slot becomes
window->details->active_pane->active_slot), but this of course lets the
patch seem huge.

There's still some open issues, for example:

 - How should active and inactive panes be visually distinguishable?
   Right now, this is being done by greying out the location bar of the
   inactive slot. Not a good solution.
   The classic solution is to draw some thin border around the active
   pane, and to use some kind of "inactive" color for the directory view
   background.

 - How far should the keyboard shortcuts from good old Norton Commander
   (which are nowadays quasi-standards amongst split-view filebrowsers,
   mainly F5: copy selection to other side, F6: move selection to other
   side, TAB: make other pane active) be supported?

 - The patch still has some UI glitches. Most notably, if another tab
   is created in split-view mode, that side moves the slider,
   requesting more space at the expense of the other pane. I could use
   some gtk+ expertise on this (just like with the visual
   distinguishment from above).

The code is hosted on github, clone-URL:
git://github.com/hb/nautilus.git
in the split-view branch.

I've also attached a cumulative patch against version
2.24.2 (because I don't have a recent enough glib for newer versions),
but as I said it's rather big. Browsing the github repo may be easier.

I sincerely hope for an open discussion.

Holger

Attachment: nautilus_split_view_cumulative_against_2_24_2.patch.tar.gz
Description: GNU Zip compressed data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]