nautilus:wip/antoniof/three-menus-no-more

Last commit made on 2022-08-01
Get this branch:
git clone -b wip/antoniof/three-menus-no-more https://git.launchpad.net/nautilus

Branch merges

Branch information

Name:
wip/antoniof/three-menus-no-more
Repository:
lp:nautilus

Recent commits

ac9524f... by =?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>

toolbar-view-menu.ui: Move into files-view.ui

This is not used by the toolbar anymore and this is much simpler.

31d1b33... by =?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>

toolbar-menu-sections: Remove and cleanup

There is no use for this now.

6936ece... by =?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>

toolbar: Drop view menu

There are a few reasons to drop the view menu:

  * We already have primary (hamburger) and secondary (ellipsis) menus
  * It holds only sort options now, which are broken in list view dure
    to GTK not exposing the last clicked column header.
  * The button doesn't indicate the current sort order.
  * The grid view has already grown its own sort menu.
  * It's disconnected from the current folder, despite its sorting
    options being per-folder.
  * It shares tooltip with the view toggle button.

This is also going to allow to a few followup cleanups and make
adaptiveness easier.

dfac6f4... by =?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>

files-view: Add sort menu for grid view

In list view mode we have a clear indication of sort order, thanks to
the list column headers, which also allow to change sort order.

Implement a sort header for grid view mode, which matches the visuals
of the list one and provides indication of the current sort order.

ce055de... by =?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>

toolbar: Move "Visible Columns" menu item to folder menu

It would be nice to use gtk_column_view_column_set_header_menu(),
but unfortunately our GtkGestureClick for background context menu
overrules it. Also, it would be bad for accessibility because
there is no way to get keyboard focus in the column headers.

The folder menu is a fitting new home because:
   1. The column changes are saved only for this folder;
   2. If the user right clicks the columns, expecting an option to
      change columns, the option will be right there.

This is part of an effort to drop the view menu.

e88b7d5... by =?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>

files-view: Stop setting actions on submenus

We show Templates and Scripts submenus conditionally, using the
hidden-when=action-disabled attribute, by assigning a dummy action
which we can set as active or inactive as fit.

However, this causes criticals when the popover menu is destroyed:

(org.gnome.Nautilus:21502): GLib-CRITICAL **: 16:15:32.870: g_hash_table_iter_next: assertion 'ri->version == ri->hash_table->version' failed

Indeed, submenus are not supposed to have actions. There is a
"submenu-action" but it's for a different purpose.

So, instead of controlling the visibility, and taking advantage of
the fact that our models are rebuilt each time they need an update,
just remove the submenu if not desirable.

a09aa95... by =?utf-8?q?Ant=C3=B3nio_Fernandes?= <email address hidden>

files-view: Rebuild context menus every time

In GTK3, we would reuse the same GtkMenu, but update the model.

With GtkPopoverMenu, this is creating duplicate stack page each time
our submenus are updated. And it turns out we update templates and
scripts menu a lot of times, on directory monitor callbacks! Besides
warnings, this causes increasing memory consumptions.

Additionally, reusing the same popover while updating the model causes
the old model do be temporarily displayed when the popover is opened,
which sometimes even causes the popover to resize and jump around.
This is obviously bad.

Avoid both problems by creating a new popover menu every time we open
the context menu. The old one is destroyed (by unparenting) right
before this. (Not on GtkPopover::closed, because this would be too
early and actions would fail to activate!)

d558f19... by aurisc4

Updated Lithuanian translation

e4a8a94... by Yuri Chornoivan <email address hidden>

Update Ukrainian translation

b8c2bbe... by Asier Sarasua Garmendia <email address hidden>

Update Basque translation