Migrating to Nautilus API 4.0

Nautilus 43 no longer allows extensions to directly manipulate GTK widgets – all UI changes now need to happen through model objects. If your script implements any of the following provider interfaces, you will need to update it:

LocationWidgetProvider

The Nautilus.LocationWidgetProvider was removed without replacement. If your script requires it, you can request a new model-based API for your specific use case on the Nautilus issue tracker.

MenuProvider

The get_file_items, get_file_items_full, get_background_items a get_background_items_full methods of Nautilus.MenuProvider no longer take the window argument. Remove it from your implementations.

PropertyPageProvider

The Nautilus.PropertyPageProvider was replaced by Nautilus.PropertiesModelProvider class. Unlike the previous unrestricted property pages that could contain any GTK widget, the new model-based interface currently only supports a pre-defined layout. Scripts can add pages, each of which can display a list of text properties.

Subclass the Nautilus.PropertiesModelProvider abstract class and have the get_models method return the list of Nautilus.PropertiesModel, one for each properties page.

See the relevant Nautilus change for more context and the corresponding nautilus-python update for more migration examples.