[Libreoffice-commits] core.git: wizards/source

Jean-Pierre Ledure (via logerrit) logerrit at kemper.freedesktop.org
Thu May 6 12:46:55 UTC 2021


 wizards/source/scriptforge/python/scriptforge.py |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 53230b495407ea7e26cd3c01509bc773dad0bc7a
Author:     Jean-Pierre Ledure <jp at ledure.be>
AuthorDate: Wed May 5 18:01:10 2021 +0200
Commit:     Jean-Pierre Ledure <jp at ledure.be>
CommitDate: Thu May 6 14:46:19 2021 +0200

    ScriptForge - (scriptforge.py)Non-modal dialogs and OK/Cancel buttons
    
    In the SFDialogs.SF_Dialog class:
    - Fix the comments describing the behaviour of non-modal dialogs
    - Add the OKBUTTON and CANCELBUTTON definitions
    
    Change-Id: I2d3abc1c610b0c60949987feb1a9d66e21abfdc1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115152
    Tested-by: Jean-Pierre Ledure <jp at ledure.be>
    Tested-by: Jenkins
    Reviewed-by: Jean-Pierre Ledure <jp at ledure.be>

diff --git a/wizards/source/scriptforge/python/scriptforge.py b/wizards/source/scriptforge/python/scriptforge.py
index 767cb9ae60ae..048caf97d2e5 100644
--- a/wizards/source/scriptforge/python/scriptforge.py
+++ b/wizards/source/scriptforge/python/scriptforge.py
@@ -1521,10 +1521,15 @@ class SFDialogs:
     class SF_Dialog(SFServices):
         """
             Each instance of the current class represents a single dialog box displayed to the user.
-            From a Python script, a dialog box can be displayed in modal mode only.
+            The dialog box must have been designed and defined with the Basic IDE previously.
+            From a Python script, a dialog box can be displayed in modal or in non-modal modes.
+
             In modal mode, the box is displayed and the execution of the macro process is suspended
             until one of the OK or Cancel buttons is pressed. In the meantime, other user actions
             executed on the box can trigger specific actions.
+
+            In non-modal mode, the floating dialog remains displayed until the dialog is terminated
+            by code (Terminate()) or until the LibreOffice application stops.
             """
         # Mandatory class properties for service registration
         serviceimplementation = 'basic'
@@ -1536,6 +1541,8 @@ class SFDialogs:
                                  OnMouseExited = False, OnMouseMoved = False, OnMousePressed = False,
                                  OnMouseReleased = False,
                                  Page = True, Visible = True, Width = True, XDialogModel = False, XDialogView = False)
+        # Class constants used together with the Execute() method
+        OKBUTTON, CANCELBUTTON = 1, 0
 
         @classmethod
         def PreProcessArgs(cls, args):


More information about the Libreoffice-commits mailing list