summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorJean-Pierre Ledure <jp@ledure.be>2022-03-09 15:19:25 +0100
committerJean-Pierre Ledure <jp@ledure.be>2022-03-10 10:56:10 +0100
commit14e550c5963dcd0d0a75666c659b4b91de4b98bd (patch)
treed81ef1291a1e40337a0e7bdad329f69c56e3b189 /wizards
parent24babdb2bca7c57f09535a867d1ff0b5e0fc1671 (diff)
ScriptForge - Console + progress bar receive a Close icon
Next dialogs: - dlgConsole (modal or non-modal) - dlgProgress (non-modal) had a Close button with label "Close" or a translation. The "Close" text is replaced with a "Cancel" icon. Objective: make console and progress bar user-language independent. No impact either on user documentation or on Python part. Change-Id: Ib1c2370986d47ccab49c6d42500231fd73b9ff3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131255 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/scriptforge/SF_Exception.xba3
-rw-r--r--wizards/source/scriptforge/SF_Root.xba4
-rw-r--r--wizards/source/scriptforge/SF_UI.xba1
-rw-r--r--wizards/source/scriptforge/dlgConsole.xdl4
-rw-r--r--wizards/source/scriptforge/dlgProgress.xdl2
-rw-r--r--wizards/source/scriptforge/po/ScriptForge.pot7
-rw-r--r--wizards/source/scriptforge/po/en.po7
7 files changed, 5 insertions, 23 deletions
diff --git a/wizards/source/scriptforge/SF_Exception.xba b/wizards/source/scriptforge/SF_Exception.xba
index 3d28153a5a40..2af37d9534f2 100644
--- a/wizards/source/scriptforge/SF_Exception.xba
+++ b/wizards/source/scriptforge/SF_Exception.xba
@@ -266,7 +266,6 @@ Public Sub Console(Optional ByVal Modal As Variant, _
&apos;&apos;&apos; SF_Exception.Console()
Dim bConsoleActive As Boolean &apos; When True, dialog is active
-Dim sClose As String &apos; Caption of the close buttons
Dim oModalBtn As Object &apos; Modal close button
Dim oNonModalBtn As Object &apos; Non modal close button
Const cstThisSub = &quot;Exception.Console&quot;
@@ -295,10 +294,8 @@ Try:
&apos; - a Default button triggering the Close action
Set .ConsoleDialog = CreateScriptService(&quot;SFDialogs.Dialog&quot;, &quot;GlobalScope&quot;, &quot;ScriptForge&quot;, &quot;dlgConsole&quot;, _Context)
&apos; Setup labels and visibility
- sClose = .Interface.GetText(&quot;CLOSEBUTTON&quot;)
Set oModalBtn = .ConsoleDialog.Controls(&quot;CloseModalButton&quot;)
Set oNonModalBtn = .ConsoleDialog.Controls(&quot;CloseNonModalButton&quot;)
- If Modal Then oModalBtn.Caption = sClose Else oNonModalBtn.Caption = sClose
oModalBtn.Visible = Modal
oNonModalBtn.Visible = CBool(Not Modal)
&apos; Load console lines
diff --git a/wizards/source/scriptforge/SF_Root.xba b/wizards/source/scriptforge/SF_Root.xba
index d7c4cc639737..0ed77373d773 100644
--- a/wizards/source/scriptforge/SF_Root.xba
+++ b/wizards/source/scriptforge/SF_Root.xba
@@ -308,10 +308,6 @@ Try:
Set Interface = CreateScriptService(&quot;L10N&quot;)
With Interface
&apos; SF_Exception.Raise
- .AddText( Context := &quot;CLOSEBUTTON&quot; _
- , MsgId := &quot;Close&quot; _
- , Comment := &quot;Text in close buttons of progress and console dialog boxes&quot; _
- )
.AddText( Context := &quot;ERRORNUMBER&quot; _
, MsgId := &quot;Error %1&quot; _
, Comment := &quot;Title in error message box\n&quot; _
diff --git a/wizards/source/scriptforge/SF_UI.xba b/wizards/source/scriptforge/SF_UI.xba
index 1caa90039264..8c511a35cc8d 100644
--- a/wizards/source/scriptforge/SF_UI.xba
+++ b/wizards/source/scriptforge/SF_UI.xba
@@ -1115,7 +1115,6 @@ Try:
If bFirstCall Then
Set oFixedText = .Controls(&quot;ProgressText&quot;)
Set oProgressBar = .Controls(&quot;ProgressBar&quot;)
- .Controls(&quot;CloseButton&quot;).Caption = _SF_.Interface.GetText(&quot;CLOSEBUTTON&quot;)
.Execute(Modal := False)
End If
If Len(Text) &gt; 0 Then oFixedText.Caption = Text
diff --git a/wizards/source/scriptforge/dlgConsole.xdl b/wizards/source/scriptforge/dlgConsole.xdl
index 626be565d8b7..64009f571c2f 100644
--- a/wizards/source/scriptforge/dlgConsole.xdl
+++ b/wizards/source/scriptforge/dlgConsole.xdl
@@ -6,9 +6,9 @@
</dlg:styles>
<dlg:bulletinboard>
<dlg:textfield dlg:style-id="0" dlg:id="ConsoleLines" dlg:tab-index="0" dlg:left="4" dlg:top="2" dlg:width="312" dlg:height="225" dlg:hscroll="true" dlg:vscroll="true" dlg:multiline="true" dlg:readonly="true"/>
- <dlg:button dlg:id="CloseNonModalButton" dlg:tab-index="2" dlg:left="265" dlg:top="228" dlg:width="50" dlg:height="10" dlg:default="true" dlg:value="Close">
+ <dlg:button dlg:id="CloseNonModalButton" dlg:tab-index="2" dlg:left="265" dlg:top="228" dlg:width="50" dlg:height="10" dlg:default="true" dlg:image-src="private:graphicrepository/cmd/sc_cancel.png">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ScriptForge.SF_Exception._CloseConsole?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
- <dlg:button dlg:id="CloseModalButton" dlg:tab-index="1" dlg:left="265" dlg:top="228" dlg:width="50" dlg:height="10" dlg:default="true" dlg:value="Close" dlg:button-type="ok"/>
+ <dlg:button dlg:id="CloseModalButton" dlg:tab-index="1" dlg:left="265" dlg:top="228" dlg:width="50" dlg:height="10" dlg:default="true" dlg:button-type="ok" dlg:image-src="private:graphicrepository/cmd/sc_cancel.png"/>
</dlg:bulletinboard>
</dlg:window> \ No newline at end of file
diff --git a/wizards/source/scriptforge/dlgProgress.xdl b/wizards/source/scriptforge/dlgProgress.xdl
index cdb8f313214b..9d5f2776d44d 100644
--- a/wizards/source/scriptforge/dlgProgress.xdl
+++ b/wizards/source/scriptforge/dlgProgress.xdl
@@ -4,7 +4,7 @@
<dlg:bulletinboard>
<dlg:text dlg:id="ProgressText" dlg:tab-index="1" dlg:left="16" dlg:top="7" dlg:width="245" dlg:height="8" dlg:value="ProgressText" dlg:tabstop="true"/>
<dlg:progressmeter dlg:id="ProgressBar" dlg:tab-index="0" dlg:left="16" dlg:top="18" dlg:width="190" dlg:height="10" dlg:value="50"/>
- <dlg:button dlg:id="CloseButton" dlg:tab-index="2" dlg:left="210" dlg:top="18" dlg:width="50" dlg:height="10" dlg:value="Close">
+ <dlg:button dlg:id="CloseButton" dlg:tab-index="2" dlg:left="210" dlg:top="18" dlg:width="50" dlg:height="10" dlg:image-src="private:graphicrepository/cmd/sc_cancel.png">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ScriptForge.SF_UI._CloseProgressBar?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
</dlg:bulletinboard>
diff --git a/wizards/source/scriptforge/po/ScriptForge.pot b/wizards/source/scriptforge/po/ScriptForge.pot
index 7db51ffc5f60..b1727527da58 100644
--- a/wizards/source/scriptforge/po/ScriptForge.pot
+++ b/wizards/source/scriptforge/po/ScriptForge.pot
@@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n"
-"POT-Creation-Date: 2022-03-01 15:25:24\n"
+"POT-Creation-Date: 2022-03-09 14:52:15\n"
"PO-Revision-Date: YYYY-MM-DD HH:MM:SS\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
@@ -26,11 +26,6 @@ msgstr ""
"X-Generator: LibreOffice - ScriptForge\n"
"X-Accelerator-Marker: ~\n"
-#. Text in close buttons of progress and console dialog boxes
-msgctxt "CLOSEBUTTON"
-msgid "Close"
-msgstr ""
-
#. Title in error message box
#. %1: an error number
#, kde-format
diff --git a/wizards/source/scriptforge/po/en.po b/wizards/source/scriptforge/po/en.po
index 7db51ffc5f60..b1727527da58 100644
--- a/wizards/source/scriptforge/po/en.po
+++ b/wizards/source/scriptforge/po/en.po
@@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?product=LibreOffice&bug_status=UNCONFIRMED&component=UI\n"
-"POT-Creation-Date: 2022-03-01 15:25:24\n"
+"POT-Creation-Date: 2022-03-09 14:52:15\n"
"PO-Revision-Date: YYYY-MM-DD HH:MM:SS\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n"
@@ -26,11 +26,6 @@ msgstr ""
"X-Generator: LibreOffice - ScriptForge\n"
"X-Accelerator-Marker: ~\n"
-#. Text in close buttons of progress and console dialog boxes
-msgctxt "CLOSEBUTTON"
-msgid "Close"
-msgstr ""
-
#. Title in error message box
#. %1: an error number
#, kde-format