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

Insert an image directly from filesystem #500

Merged
merged 16 commits into from
Apr 2, 2020

Conversation

DanielVenturini
Copy link
Contributor

Hello, nice software.

I guess the retex would be great if it allows insert image directly by filesystem. The first commit allows to open a select box and get the image path, that is, selecting an image results in:
![Alt text](/home/user/path/to/image.png).

The second commit create a menu bar called Insert with the Tables and Image as sub-menus, where Image uses the function written at first commit. The Tables sub-menus (Insert table and Table editing mode) were in Edit menu, and it doesn't make much sense, I guess. Then, I removed those and inserted in Insert menu.

Copy link
Member

@mitya57 mitya57 left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I have left some comments.

ReText/window.py Outdated Show resolved Hide resolved
ReText/window.py Outdated Show resolved Hide resolved
ReText/window.py Outdated Show resolved Hide resolved
ReText/window.py Outdated Show resolved Hide resolved
@DanielVenturini
Copy link
Contributor Author

So, I revert my first commit, that is, I undo the Insert menu. Then, the Insert images by file path is in Edit menu and uses getOpenFileNames to allows the user add more than one image at same import. For the last, I splet into a function to get the correct syntax and turned it in a static method to access in both files.

ReText/window.py Outdated Show resolved Hide resolved
@DanielVenturini DanielVenturini changed the title Insert an image directly filesystem and create a Insert menubar Insert an image directly filesystem Mar 30, 2020
@mitya57 mitya57 changed the title Insert an image directly filesystem Insert an image directly from filesystem Apr 2, 2020
@mitya57 mitya57 merged commit d2035d0 into retext-project:master Apr 2, 2020
@DanielVenturini
Copy link
Contributor Author

Great. Thank you.

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.

2 participants