Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Gimp UI progress bar "cancel"
#1
Hello all.

So I am working on a plugin that saves and exports (amongst other things).  Got it all working, and it exports/saves correctly.

The small issue I have is that after the script exports the image (or other procedures), the status bar at the bottom of the UI (Gimp 2.10) gets stuck on for example "Exporting ...  Cancel" even though the image has been exported (see pic).

I tried  pdb.gimp_displays_flush(), but that does not seem to work.  Is there something I am missing?  Do I need to return a success or anything as a result?



Thanks much,

J.


Attached Files Thumbnail(s)
   
Reply
#2
What registration type are you using, the old (full menu path in 7th arg) or the new (separate named menu argument)?

Otherwise you can try a blunt pdb.gimp_progress_end()
Reply
#3
(05-06-2024, 02:45 PM)Ofnuts Wrote: What registration type are you using, the old (full menu path in 7th arg) or the new (separate named menu argument)?

Otherwise you can try a blunt pdb.gimp_progress_end()

Well the progress_end() worked a treat!  Thanks for that!

But if there are any downsides of using progress_end(), and there is a better way: here is the registration of one of the plugins:

Code:
register(
   "python-fu_prism_serverStart",                              #   UNIQUE NAME
   "Enables socket communications\nbetween Prism and Gimp",    #   TOOLTIP
   helpDoc,                                                    #   DESCRIPTION
   attribution,                                                #   AUTHORS NAME
   copyright,                                                  #   COPYRIGHT INFO
   "2023",                                                     #   VERSION or DATA
   "1 - Start Prism Server",                                   #   NAME DISPLAYED IN GUI MENU
   "",                                                         #   TYPE OF DRAWABLE: '' = can be none, * = any drawable, RGB, RGB, RGB* etc
   [],                                                         #   ADDITIONAL ARGS
   [],                                                         #   RETURN TYPES
   startServer,                                                #   FUNCTION CALLED WHEN ACTIVATED
   "<Image>/Prism",                                            #   WHERE IN GIMP UI
)

main()

The comments are for my benefit.  And the description, attribution, and copyright are vars defined further up.
Reply


Forum Jump: