View Single Post
Old 06-18-2025, 03:45 PM   #19
Mark Nord
2B || !2B
Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.Mark Nord ought to be getting tired of karma fortunes by now.
 
Posts: 854
Karma: 327896
Join Date: Feb 2010
Location: Austria
Device: Sony PRS505/650/T1/tolino vision 5
Quote:
Originally Posted by LostOnTheLine View Post
....
I'm currently using Sigil Version: 2.5.2 with Loaded Qt: 6.8.2 & the plugin seems to work without issue on my end as is, but I'll happily update it to a newer version so that it will work better for others as well as myself & to prevent interruptions when there are future changes.
Same here, we've already set the path to the imageMagick executable and
Code:
#------------------------------------
# display ImageMagick file selection dialog
#------------------------------------
def GetFileName():
    ''' displays the ImageMagick file selection dialog '''
    # requires Sigil 0.9.8 or higher or PyQt6/PySide6
    home = expanduser('~')
    from PySide6.QtWidgets import QApplication, QWidget, QFileDialog
    app = QApplication(sys.argv)
    w = QWidget()
    file_path, filter = QFileDialog.getOpenFileName(w,'Select ImageMagick exe-file', home, 'ImageMagick-Executable (magick.exe)')
   
    return file_path
is, as I read the code, the only place relying on the GUI. And this part is, after the initial run, never called again.

So the fix shall go to this function, replacing the import
Code:
from PySide6.QtWidgets import QApplication, QWidget, QFileDialog
with some from the helper modules. - But still not sure how to do it.

To test any new code we will have to remove the line with
Code:
"magick_exe_path"
from the ImgShrinker.json configuration-file

Just my 2 cents
Mark Nord is offline   Reply With Quote