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

Draft: Add Caja Meld compare example #70

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Erriez
Copy link

@Erriez Erriez commented Feb 26, 2023

No description provided.

Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

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

While I don't really know how to use Meld, this example when tested as mentioned in the docs (drop it into /usr/share/caja-python/extensions) does work. It adds a "meld compare" context menu item which successfully invokes meld.

Note that you need to select at least two directories from the window or else select nothing (bringing up Melt ready to have directories entered from its own UI) to use this effectively

@lukefromdc lukefromdc requested a review from a team February 28, 2023 04:52
@vkareh
Copy link
Member

vkareh commented Feb 28, 2023

This works, but why not put it in the caja-extensions repo?

def get_file_items(self, window, files):
top_menuitem = Caja.MenuItem(name='MeldMenuProvider::Meld',
label='Meld compare',
tip='',
Copy link
Member

Choose a reason for hiding this comment

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

Add a tip/description

def get_background_items(self, window, file):
bg_menuitem_meld = Caja.MenuItem(name='MeldMenuProvider::MeldBg',
label='Meld',
tip='',
Copy link
Member

Choose a reason for hiding this comment

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

Add a tip/description

@lukefromdc
Copy link
Member

I agree that this is worth being a package distros will package and ship. if we put it in caja-extensions, then that package depended on python-caja. Maybe a new "caja-extensions-python" package for them?

@lukefromdc
Copy link
Member

In the meantime I am fine with adding this to examples

@Erriez
Copy link
Author

Erriez commented Mar 1, 2023

@lukefromdc and @vkareh, Thanks for your feedback.

Note that you need to select at least two directories from the window or else select nothing (bringing up Melt ready to have directories entered from its own UI) to use this effectively

Correct, I'll add a commented introduction with installation instructions.

This works, but why not put it in the caja-extensions repo?

caja-extensions is C-code and this PR is Python code.

I'll incorporate your feedback tomorrow. I would like to add a submenu to select a first and second file as it is currently limited to compare selected files in one directory.

@Erriez Erriez changed the title Add Caja Meld compare example Draft: Add Caja Meld compare example Mar 1, 2023
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.

3 participants