Patched Add dual-panelayout options (vertical spit, separate sidebars/nav bars/status menu)#3735
Patched Add dual-panelayout options (vertical spit, separate sidebars/nav bars/status menu)#3735cdmdotnet wants to merge 5 commits intolinuxmint:masterfrom
Conversation
…idebars, separate nav bars) Three new preferences in Preferences > Behavior > Dual Pane: - "Show panes vertically (one above the other)" [dual-pane-vertical-split] Switches the split-view HPaned to a VPaned so panes stack top/bottom instead of side by side. - "Separate sidebar per pane" [dual-pane-separate-sidebar] Requires vertical split. Each pane gets its own Places/Tree sidebar, allowing the second pane's sidebar to track its own location without needing to change focus first. Sidebar type (Places/Tree) and visibility remain global toggles. - "Separate path bar / location entry per pane" [dual-pane-separate-nav-bar] Requires vertical split. Each pane embeds its own toolbar (path bar and location entry) above its tab strip. Toggle Location Entry, clicking the path bar to switch to location entry, and Go menu / bookmarks all operate on the focused pane only. "Always start in dual-pane view" is moved into the new Dual Pane section. Implementation: - GSettings schema: 3 new bool keys in org.nemo.preferences (default false) - Layout: pri_paned/sec_paned wrapper HPaneds hold sidebar+pane columns when separate-sidebar is active; torn down cleanly on pref change or split-view-off - Sidebar: NemoPlacesSidebar and FMTreeView accept an optional NemoWindowPane* to filter loading-uri signals to their own pane - Toolbar: nemo_window_pane_embed/detach_toolbar reparents the toolbar into/out of the pane widget for per-pane nav bar mode - CSS: .nemo-active-sidebar / .nemo-inactive-pane classes colour each sidebar to match its pane's active/inactive state - Path bar callbacks: right-click, middle-click, and location-entry toggle all route to pane->active_slot (not the window's active slot) - Destroy order: pane1 wrapper → sidebar2 → sidebar → panes (all paths) Tests: - test/test-dual-pane-schema.c: 9 GSettings unit tests verifying the three new keys exist with correct schema defaults and round-trip correctly; runs without a display or D-Bus session
… + separate sidebar)
Adds a full-width NemoStatusBar below each pane column (spanning
both the sidebar and content area). Each per-pane bar is locked
to its pane so its zoom and sidebar buttons operate on that pane only.
The places / tree toggle buttons swap the per-pane sidebar widget,
keeping each pane's sidebar type independent.
| G_PARAM_CONSTRUCT_ONLY | | ||
| G_PARAM_STATIC_STRINGS); | ||
|
|
||
| properties[PROP_PANE] = g_param_spec_pointer ("locked-pane", |
There was a problem hiding this comment.
should be a GObject property (like PROP_WINDOW)
| /* Restore per-pane layout if applicable */ | ||
| { | ||
| gboolean split = nemo_window_split_view_showing (window); | ||
| gboolean vertical = g_settings_get_boolean (nemo_preferences, | ||
| NEMO_PREFERENCES_DUAL_PANE_VERTICAL_SPLIT); | ||
| gboolean sep_sidebar = g_settings_get_boolean (nemo_preferences, | ||
| NEMO_PREFERENCES_DUAL_PANE_SEPARATE_SIDEBAR); | ||
| gboolean sep_statusbar = g_settings_get_boolean (nemo_preferences, | ||
| NEMO_PREFERENCES_DUAL_PANE_SEPARATE_STATUSBAR); | ||
| /* pane1 wrapper only when separate_sidebar ON (independent of sep_nav) */ | ||
| if (split && vertical && sep_sidebar && window->details->show_sidebar) { | ||
| nemo_window_set_up_pane1_wrapper (window); | ||
| nemo_window_set_up_sidebar2 (window); | ||
| if (sep_statusbar) { | ||
| nemo_window_set_up_per_pane_statusbars (window); | ||
| } | ||
| } | ||
| } |
|
|
||
| /* Respond to dual pane preference changes */ | ||
| g_signal_connect_swapped (nemo_preferences, | ||
| "changed::" NEMO_PREFERENCES_DUAL_PANE_VERTICAL_SPLIT, | ||
| G_CALLBACK (dual_pane_prefs_changed), | ||
| window); | ||
| g_signal_connect_swapped (nemo_preferences, | ||
| "changed::" NEMO_PREFERENCES_DUAL_PANE_SEPARATE_SIDEBAR, | ||
| G_CALLBACK (dual_pane_prefs_changed), | ||
| window); | ||
| g_signal_connect_swapped (nemo_preferences, | ||
| "changed::" NEMO_PREFERENCES_DUAL_PANE_SEPARATE_NAV_BAR, | ||
| G_CALLBACK (dual_pane_prefs_changed), | ||
| window); | ||
| g_signal_connect_swapped (nemo_preferences, | ||
| "changed::" NEMO_PREFERENCES_DUAL_PANE_SEPARATE_STATUSBAR, | ||
| G_CALLBACK (dual_pane_prefs_changed), | ||
| window); |
There was a problem hiding this comment.
never disconnected, guaranteed crash if you close the window then change settings later.
| *.sh | ||
| *.deb |
| if (window->details->statusbar1_eb != NULL) { | ||
| GList *ch = gtk_container_get_children ( | ||
| GTK_CONTAINER (window->details->statusbar1_eb)); | ||
| if (ch != NULL && NEMO_IS_STATUS_BAR (ch->data)) { | ||
| target = GTK_STATUSBAR ( | ||
| NEMO_STATUS_BAR (ch->data)->real_statusbar); |
|
This still remains something we're not interested in. If I enable all options for vertical panes here, it essentially becomes 2 windows. It's simple enough to open a second window and tile them, and we avoid a lot of extra complication this PR brings.
I commented some areas in the code that raise flags, but honestly I gave up - there are a huge number of inconsistencies and questionable choices going on here to just 'make it work'. Less effort put into 'test' scripts and more actual testing would have been invaluable here. some AI feedback: |



Includes the missing check-in the previous PR lacked - confirmed the github build action now runs.
There's a spec doc, the most useful aspect of which will be the wire-frame diagrams that give you an idea of what the changes are/do.
nemo_dual_pane_spec.docx
Dual-pane enhancements:
All options default to off, preserving existing behaviour when not enabled. New preferences exposed in a dedicated Dual Pane section of the Behaviour tab.
Details
Adds a VPaned orientation for split-view in addition to the existing
side-by-side HPaned layout. The split_view_hpane is recreated with
the appropriate GtkOrientation when the preference changes.
In vertical split mode each pane column gets its own independent
sidebar (places or tree) locked to that pane's navigation so
browsing in one pane does not move the other pane's sidebar.
Implemented by wrapping pane1 in a new inline HPaned
(primary_pane_content_paned) and adding a second sidebar box
(sidebar2 / secondary_pane_content_paned) for pane2.
Embeds a full toolbar (path bar / location entry) directly inside
each pane column so each pane tracks its own navigation history
independently without sharing the window-level toolbar.
Adds a full-width NemoStatusBar below each pane column (spanning
both the sidebar and content area). The global statusbar is hidden
by concealing its outer event-box wrapper rather than changing its
visible property, preserving the GSettings binding that controls the
floating-bar "selected items" overlay. Each per-pane bar is locked
to its pane via a new PROP_PANE construct property so its zoom
slider and sidebar buttons operate on that pane only. The places /
tree toggle buttons call the new nemo_window_set_pane_sidebar_type()
helper which swaps the sidebar widget in-place without firing the
global notify::sidebar-view-id signal, keeping each pane's sidebar
type independent.