grass icon indicating copy to clipboard operation
grass copied to clipboard

wxGUI/psmap: fix show correct error message if Ghostscript isn't installed (required for rendering output PDF file) on the OS MS Windows platform

Open tmszi opened this issue 2 years ago • 4 comments

Describe the bug Wrong error message if Ghostscript gswin32c/gswin64c isn't installed (required for rendering output PDF file) on the OS MS Windows platform

To Reproduce Steps to reproduce the behavior:

  1. Download and install e.g. WinGRASS-8.3.dev
  2. Launch wxGUI Cartographic Composer g.gui.psmap
  3. Add Map frame and choose some raster map e.g. elevation
  4. Push toolbar Generate PDF output tool
  5. See error

wxGUI_psmap_error_message_dialog_def

Expected behavior If Ghostscript gswin32c/gswin64c isn't installed (required for rendering output PDF file), show correct error message.

wxGUI_psmap_error_message_dialog_expected

System description:

  • Operating System: MS Windows
  • GRASS GIS version: all versions

tmszi avatar Jun 08 '22 07:06 tmszi

All right, I fixed it.

tmszi avatar Jun 10 '22 08:06 tmszi

All right, I fixed it.

I apologize, looking at it again, I gave you a wrong suggestion, the translation doesn't work with f-strings so you will need to use a format function as before: _(xxxx {yyyy} xxx).format(...)

petrasovaa avatar Jun 10 '22 12:06 petrasovaa

All right, I fixed it.

I apologize, looking at it again, I gave you a wrong suggestion, the translation doesn't work with f-strings so you will need to use a format function as before: _(xxxx {yyyy} xxx).format(...)

Okay, I fixed it.

tmszi avatar Jun 11 '22 05:06 tmszi

@petrasovaa Maybe should be better use HyperlinkDialog if Ghostscript is not available (for rendering PDF), same as in PR #2421 (for rendering preview) with same simplified error message?

tmszi avatar Jun 19 '22 02:06 tmszi

@petrasovaa Maybe should be better use HyperlinkDialog if Ghostscript is not available (for rendering PDF), same as in PR #2421 (for rendering preview) with same simplified error message?

I agree, but I will leave it up to you if you want to change that.

petrasovaa avatar Oct 21 '22 03:10 petrasovaa

Rebase https://github.com/OSGeo/grass/commit/7540bf12c111065977cdae2c0e3947ec9175c8d0 plus replace GError dialog with HyperlinkDialog.

tmszi avatar Sep 27 '23 10:09 tmszi