Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with older python3-nautilus #10075

Merged
merged 1 commit into from
Sep 8, 2022
Merged

Compatibility with older python3-nautilus #10075

merged 1 commit into from
Sep 8, 2022

Conversation

nteodosio
Copy link
Contributor

Quoting from devhelp (sorry, couldn't find a web document to link to), migrating Nautilus section:

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.
If you need to keep supporting older versions of Nautilus, you can use variadic arguments:

  def get_file_items(self, *args):
      # `args` will be `[files: List[Nautilus.FileInfo]]` in Nautilus 4.0 API,
      # and `[window: Gtk.Widget, files: List[Nautilus.FileInfo]]` in Nautilus 3.0 API.
      files = args[-1]

@CLAassistant
Copy link

CLAassistant commented Sep 1, 2022

CLA assistant check
All committers have signed the CLA.

@TheOneRing TheOneRing requested a review from fmoc September 6, 2022 10:07
Copy link
Contributor

@fmoc fmoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please document this workaround in the code base as well, so we won't forget in the future why the files are queried from the packed parameters.

@fmoc
Copy link
Contributor

fmoc commented Sep 6, 2022

Your change looks good, but I'd like to have the reasoning documented in the code as well.

Copy link
Contributor

@fmoc fmoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fmoc fmoc merged commit 4865062 into owncloud:master Sep 8, 2022
@jbicha
Copy link

jbicha commented Sep 8, 2022

Here's the weblink for the devhelp documentation:

https://gnome.pages.gitlab.gnome.org/nautilus-python/nautilus-python-migrating-to-4.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants