Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 07-26-2023, 11:15 AM   #1
jwes
Enthusiast
jwes began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2023
Device: none
Add 'Open With' to right click menu when clicking on 'img src'

This is a minor enhancement that should be easy to implement.
If I right click on <img src ... in the code view window, I would like to be able to open the image with an external program. Currently, I right click and open in tab, and right click on the image and then select 'Open With'. This is no big deal, but also should be no big deal to add the menu item.
jwes is offline   Reply With Quote
Old 07-26-2023, 11:38 AM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Why? Can't you just right click on the image file you want in BookBrowser? That is one click and simpler isn't it.
KevinH is offline   Reply With Quote
Old 07-27-2023, 11:08 AM   #3
jwes
Enthusiast
jwes began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2023
Device: none
The way my workflow goes is that I am scrolling through the preview window looking for problems. I see an image I want to change. I click on the line below the image to sync the html since clicking on the image does nothing. I look for '<img src=' to find the file name. It is easier for me to right click on the name since my file names are long and very similar and the BookBrowser window may need to be scrolled or may be set too narrow to see the full file name to save screen real estate.
jwes is offline   Reply With Quote
Old 07-27-2023, 11:24 AM   #4
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,099
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by jwes View Post
The way my workflow goes is that I am scrolling through the preview window looking for problems. I see an image I want to change. I click on the line below the image to sync the html since clicking on the image does nothing. I look for '<img src=' to find the file name. It is easier for me to right click on the name since my file names are long and very similar and the BookBrowser window may need to be scrolled or may be set too narrow to see the full file name to save screen real estate.
Welcome to MR!

Whenever I see the file names are too long there are two things you can do:

- Go to Edit/Preferences (F5)/Appearance/Main UI and uncheck "BookBrowser should show full paths."

- Select your image file(s) in the BookBrowser, right-click on one, and select "Rename". Then you can give it a shorter/easier name. eg rename to "img_01". That will automatically rename all the files with an auto-incremented number (img_02.jpg, img_03.jpg, img_04.png, etc.) BTW this works for your html files as well...

That should help out in the meantime.

Cheers!
Turtle91 is offline   Reply With Quote
Old 07-27-2023, 12:10 PM   #5
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
That right click on an img tag or css class is designed to take you to the appropriate tab resource from where you can do many things specific to that resource type. That is how it is meant to work as the Tab must be open for OpenWith to function properly as a Filewatcher must be set on that Tab's resource to look for external changes to the file.

Changing that would probably take some work, so it is not on my to-do list given the return is small.

Sorry. I will keep it in mind for a future feature.

Last edited by KevinH; 07-27-2023 at 12:13 PM.
KevinH is offline   Reply With Quote
Old 07-27-2023, 02:45 PM   #6
jwes
Enthusiast
jwes began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2023
Device: none
As I said, it's no big deal. I thought since I can right click in BookBrowser and select Open With, that the same code would work in html view. If it takes actual work, I would rather you keep making sigil better.
jwes is offline   Reply With Quote
Old 07-27-2023, 02:52 PM   #7
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
If only it were that simple.
HTML code "doesn't know" what images are in it, so the context menu would have to be very dynamic practically modifying itself every time the user clicks the right button depending on the content of the code. Add to that error handling and it gets pretty fun.
BookBrowser is a separate entity that knows perfectly well which specific file we want to run in an external program.
BeckyEbook is offline   Reply With Quote
Old 08-04-2023, 07:22 PM   #8
jwes
Enthusiast
jwes began at the beginning.
 
Posts: 39
Karma: 10
Join Date: Jul 2023
Device: none
I thought since the right click menu has 'View Image' and 'Open Tab For Image', it would not be that hard to add 'Open Image with'.
jwes is offline   Reply With Quote
Old 08-04-2023, 07:34 PM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,651
Karma: 5433388
Join Date: Nov 2009
Device: many
Adding a menu is of course easy. Adding a dynamically built menu is a bit harder.

But making what the menu says actually happen is the hard part.

As I tried to explain it requires the proper Image Tab be open and a file watcher set so "Open Tab for Image" makes "Open With" just one more click away.
KevinH is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
TL4 menu button doesn't open menu strucky PocketBook 1 03-10-2020 07:57 AM
Right Click Menu Problem FSP Calibre 3 03-07-2020 01:45 PM
4.11.1 right click img in editor to edit img rjwse@aol.com Calibre 1 02-21-2020 09:29 PM
Feature > Add "View with Internal Viewer" to Right-Click > View Menu CHESHiRE_CAT Library Management 2 01-21-2017 06:36 PM
Get value of "<img src="x..." for cover miwie Recipes 3 11-22-2010 11:50 AM


All times are GMT -4. The time now is 02:45 AM.


MobileRead.com is a privately owned, operated and funded community.