This takes a lot of space for something thats not commonly used.
Especially with two of it visible in split view mode.
Maybe we should make a preference for it, but its not interesting
in the main UI.
This commit fixes issues that were introduced in
merge commit e92c336df90df012746d08d9af8121edc38b0f3c
Now the escape key during temporary search toggles the search key off again,
as does changing active pane during temporary searches.
Although each pane has a separate location bar, the show/hide location
bar setting is window-global instead of applying to individual panes:
Either both panes have a location bar, or neither one
does. Inconsistencies with remembered show/hide location bar gconf
setting were also fixed.
The status of the extra pane display is remembered in a gconf key,
analog to show/hide statusbar and other window display properties. As
the extra-pane action implementation does a lot of widget and action
re-ordering, this can only be done when a windows is set up
completely, and is thus delayed in an idle-callback. If splitting the
view is to be done on startup, the showing of the window is delayed to
avoid ugly visible reordering.
This is accomplished by placing additional variables into the
environment of the script, analoguous to the single-pane ones:
- NAUTILUS_SCRIPT_NEXT_PANE_SELECTED_FILE_PATHS
- NAUTILUS_SCRIPT_NEXT_PANE_SELECTED_URIS
- NAUTILUS_SCRIPT_NEXT_PANE_CURRENT_URI
If there is no second pane in the window, these are set to empty
strings.
In order to make it easier to visually distinguish active and inactive
panes, the background of inactive panes is drawn in the theme's
INSENSITIVE color. Like the inactive location bar widgets, this is
only a visual marker, and does not mean that that pane is
insensitive. It's still clickable, and in fact a click makes the
corresponding pane active.
Followup to the last commit: The location bar of the inactive pane now
has an insensitive apprearance, but is in fact clickable/focusable. A
click makes the corresponding pane active via the focus-in event of
the entry widget.
The buttons in the directory button bar are made inactive when the
corresponding pane is inactive. This means that the buttons have an
insensitive appearance, but are in fact clickable. Clicking on them
will make the corresponding pane active while changing into the
respective directory.
This required the pathbar to export the button widget, done with the
new function nautilus_path_bar_get_button_from_button_list_entry().
With dual pane, actions may work on more than one view. Thus it makes
sense to pass the window instead of the view to the callbacks. If the
callbacks want the old behaviour, they first need to get the active
view of the window, and work with that.
This is another refactorisation commit. A notebook is also pane
specific, not window specific. In particular, the following function
logic has been moved:
notebook_popup_menu_move_left_cb
notebook_popup_menu_move_right_cb
notebook_popup_menu_close_cb
notebook_popup_menu_show
notebook_tab_close_requested
notebook_button_press_cb
notebook_popup_menu_cb
notebook_switch_page_cb
nautilus_navigation_window_pane_setup_notebook
The following functions have been renamed:
nautilus_navigation_window_initialize_tabs_menu to nautilus_navigation_window_pane_initialize_tabs_menu
(also made public)
nautilus_window_get_slot_for_content_box to nautilus_window_pane_get_slot_for_content_box
Location bar entries are pane-specific, not window
specific. Therefore, it is neccessary to move significant parts of the
logic around, mainly from NautilusWindow to NautilusWindowPane, and
NautilusNavigationWindow to NautilisNavigationWindowPane.
In particular, the following functions have been moved into the pane:
bookmark_list_get_uri_index
restore_focus_widget
search_bar_activate_callback
search_bar_cancel_callback
navigation_bar_cancel_callback
navigation_bar_location_changed_callback
location_button_should_be_active
location_button_toggled_cb
path_bar_location_changed_callback
path_bar_button_pressed_callback
path_bar_button_released_callback
path_bar_button_drag_begin_callback
path_bar_path_set_callback
nautilus_navigation_window_show_location_bar_temporarily
nautilus_navigation_window_show_navigation_bar_temporarily
nautilus_navigation_window_path_bar_showing
nautilus_navigation_window_set_bar_mode
nautilus_navigation_window_search_bar_showing
nautilus_navigation_window_hide_location_bar
nautilus_navigation_window_show_location_bar
nautilus_navigation_window_location_bar_showing
nautilus_window_zoom_{in,out,to_level,to_default}
The location bar setup parts of nautilus_navigation_window_init() have
been moved to nautilus_navigation_window_pane_setup_location_bar.
The following fuctions have been made public:
hide_temporary_bars
load_view_as_menu
unset_focus_widget
update_up_button
Much logic of the following functions has been moved to the pane, but
the functions themselves have been left in the window as triggers:
nautilus_navigation_window_hide_temporary_bars
nautilus_window_sync_location_widgets
NautilusWindowPane is the base class for window panes, while
NautilusNavigationWindowPane will add some functionality spefic to panes
in a Nautilus navigation window.
A window does not hold lists of slots anymore, but lists of panes, which
in turn hold lists of slots, making a slot effectively a layer between
a window and a slot. Much of the remaining part of the patch is
simply replacing "window->details->active_slot" with
"window->details->active_pane->active_slot" and similar changes. Commits
to move corresponding parts of the logic out of the window into the pane
are to follow.
A pane is another layer around a slot. For spatial windows, a pane
will contain a single slot. For navigation windows, a pane will contain a
list of slots, as well as a corresponding toolbar items.