Would it be possible for a next version of Sigil?
#1  RbnJrg 02-14-2020, 10:31 AM
When in CodeView I do right click on an <img> tag, the contextual menu allows me to open the image in a tab. Would it be possible to add the "Open with..." command to that contextual menu (right click on an image tag), so instead of opening the image in a tab and from there, to open it in an editor program, I can do all in only one step?

#2  DiapDealer 02-14-2020, 10:50 AM
If we add "Open With" to that context menu, it still wouldn't allow you to do it in one step. You'd still have to right-click in Code View to open the image in a tab, and then right click in Code View again (which you'd have to switch back to since the opened image tab would've replaced the Code View you originally right-clicked on) to open the image in an external editor. What am I missing?

#3  BeckyEbook 02-14-2020, 11:41 AM
If I understood correctly, then ...

#4  DiapDealer 02-14-2020, 11:55 AM
That would make sense, I guess. But I admit I'm still quite confused about the "All in one step" comment.

It all would depend on how modular the "Open With" code is, and whether or not the Code View widget would be able to supply the same information that Book View's TreeWidget/Model does to create the context menu item.

#5  RbnJrg 02-14-2020, 12:06 PM
Quote BeckyEbook
If I understood correctly, then ...
That's right! That is what I wanted to say.

#6  RbnJrg 02-14-2020, 12:11 PM
Quote DiapDealer
But I admit I'm still quite confused about the "All in one step" comment.
I want to say that I want to be able to open an image directly from Code View, and that the contextual menu, when I do right click on an image tag, can display the command "Open with..." Sorry for my bad english.

#7  DiapDealer 02-14-2020, 01:10 PM
No problem. I understand the request, now.

#8  KevinH 02-14-2020, 01:23 PM
But why? If you are going to edit a lot of images and given that the same image can be used in multiple places in the same book, wouldn't it make sense to use "open with" directly on the image file in BookBrowser and only have to do it just once.

If you are not going to edit a lot of images, then the single extra click is not an issue and seeing the result of the file changing in the opened image tab is important.

#9  DiapDealer 02-14-2020, 01:44 PM
And after looking; I can say that it probably wouldn't be that easy to do. Not without a lot code duplication anyway. The "Open With" functionality itself isn't that difficult. But the building of a dynamic context menu to accommodate it all is a bit tedious. It would involve a lot of refactoring I think.

There IS a deprecated QSignalMapper in there, though, that I'd like to eliminate regardless.

#10  theducks 02-14-2020, 02:20 PM
If I need to work on multiple images, I UNPACK (Sigil is not used here), use my favorite image tool, then repack. Then, and only Then, do I Sigil it

  Next »  Last »  (1/3)
Today's Posts | Search this Thread | Login | Register