![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,633
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
![]()
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 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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?
Last edited by DiapDealer; 02-14-2020 at 10:52 AM. |
![]() |
![]() |
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 808
Karma: 2416112
Join Date: Jan 2017
Location: Poland
Device: Various
|
If I understood correctly, then ...
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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. Last edited by DiapDealer; 02-14-2020 at 12:00 PM. |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,633
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
|
![]() |
![]() |
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,633
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
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 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
No problem. I understand the request, now.
![]() |
![]() |
![]() |
![]() |
#8 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
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 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,888
Karma: 59840450
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
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
![]() |
![]() |
![]() |
![]() |
#11 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
@theducks
If you were always processing the images in a set particular way, you could also use en edit plugin to process all of the images for you. That said, If you have to use judgement to modify each image uniquely then of course a plugin would not be an option. A plugin could create a thumbnail of each image (with related colour and dimension info) and allow the user to check one of a number of common transformations for each image. In fact a plugin like this might be very useful for Sigil in general. It all depends what types of transformations to images are needed and if they can be standardized in some way. Python PIL can really do a lot with image files. |
![]() |
![]() |
![]() |
#12 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,633
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Quote:
|
||
![]() |
![]() |
![]() |
#13 | |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,439
Karma: 5703082
Join Date: Nov 2009
Device: many
|
If we decide to go this way, we could make a static routine that takes a passed in QMenu * and a passed in Resource Type and adds a context menu (of the right type) to the QMenu. OpenExternally may be the right place to store the code that builds that menu as it has only static routines now. It may work but as you said it would be a very very messy change for not much payback.
KevinH Quote:
|
|
![]() |
![]() |
![]() |
#14 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,341
Karma: 203719646
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Agreed. If it were trivial to do, I'd have no problem. But it does seem like really long driveway leading to a tiny house.
Not dismissing it outright, Rueben, but it would certainly have to take a back seat to other projects. Last edited by DiapDealer; 02-14-2020 at 04:26 PM. |
![]() |
![]() |
![]() |
#15 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,610
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
How about a keyboard shortcut to 'go to' the image in the Book Browser (e.g shift+alt+i) so that its Open With could be used. By 'go to' I mean give keyboard focus to the image file in the BB so that user can use the keyboard (e.g. shift+F10) to pop the image files context menu, and then select Open With the required image editor.
Not sure how that that would work with mouse clicking or on Linux/MacOS. BR |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is the Sigil version in Windows the same as in Xubuntu? | Gregg Bell | Sigil | 20 | 01-23-2014 03:09 AM |
Sigil version schedule? | yucca | Sigil | 2 | 06-09-2013 12:13 PM |
An epub3 version of Sigil ? | apulia03 | Sigil | 9 | 11-28-2012 01:07 AM |
Sigil -- what version of .epub? | Kivgaen | Sigil | 30 | 01-29-2011 02:03 AM |
MacPort version of Sigil | krischik | Sigil | 33 | 09-03-2009 03:55 PM |