Author: jghali
Date: Thu Feb 20 14:01:43 2020
New Revision: 23467

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23467
Log:
#16055: Errors in messageBox(...) documentation

Modified:
    trunk/Scribus/doc/de/scripterapi-dialogs.html
    trunk/Scribus/doc/en/scripterapi-dialogs.html
    trunk/Scribus/doc/fr/scripterapi-dialogs.html
    trunk/Scribus/doc/it/scripterapi-dialogs.html
    trunk/Scribus/doc/ru/scripterapi-dialogs.html
    trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.h
    trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp

Modified: trunk/Scribus/doc/de/scripterapi-dialogs.html
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=23467&path=/trunk/Scribus/doc/de/scripterapi-dialogs.html
==============================================================================
--- trunk/Scribus/doc/de/scripterapi-dialogs.html       (original)
+++ trunk/Scribus/doc/de/scripterapi-dialogs.html       Thu Feb 20 14:01:43 2020
@@ -16,8 +16,9 @@
 <p>Shows a File Open dialog box with the caption "caption". Files are filtered 
with the filter string "filter". A default filename or file path can also 
supplied, leave this string empty when you don't want to use it. A value of 
True for haspreview enables a small preview widget in the FileSelect box. When 
the issave parameter is set to True the dialog acts like a "Save As" dialog 
otherwise it acts like a "File Open Dialog". When the isdir parameter is True 
the dialog shows and returns only directories. The default for all of the 
opional parameters is False.<p> 
 <p>The filter, if specified, takes the form 'comment (*.type *.type2 ...)'. 
For example 'Images (*.png *.xpm *.jpg)'.</p> 
 <p>Refer to the Qt-Documentation for QFileDialog for details on filters.</p>
-<p>Example: <a href="#-fileDialog">fileDialog</a>('Open input', 'CSV files 
(*.csv)')<br>
-Example: <a href="#-fileDialog">fileDialog</a>('Save report', 
defaultname='report.txt', issave=True)</p></dd>
+<p>Examples:</p>
+<p><b>fileDialog('Open input', 'CSV files (*.csv)')</p>
+<p>fileDialog('Save report', defaultname='report.txt', 
issave=True)</b></p></dd>
 
 <dt><a name="-fileQuit"><strong>fileQuit</strong></a>(...)</dt>
 <dd><code>fileQuit()</code>
@@ -33,24 +34,18 @@
 
 <dt><a name="-messageBox"><strong>messageBox</strong></a>(...)</dt>
 <dd><code>messageBox("caption", "message",
-icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT,
+icon=ICON_NONE, button1=BUTTON_OK|BUTTON_DEFAULT,
 button2=BUTTON_NONE, button3=BUTTON_NONE) -&gt; integer</code>
 <p>Displays a message box with the title "caption", the message "message", and 
an icon "icon" and up to 3 buttons. By default no icon is used and a single 
button, OK, is displayed. Only the caption and message arguments are required, 
though setting an icon and appropriate button(s) is strongly recommended. The 
message text may contain simple HTML-like markup.</p>
-<p>Returns the number of the button the user pressed. Button numbers start at 
1.</p>
+<p>Returns the BUTTON_* constant value corresponding to the clicked button. 
For example, if OK button is clicked, BUTTON_OK will be returned regardless of 
whether it is assigned to button1, button2, or button3. Check <a 
href="scripterapi-constants.html">Pre-defined Constants</a> for further 
information.</p>
 <p>For the icon and the button parameters there are predefined constants 
available with the same names as in the Qt Documentation. These are the 
BUTTON_* and ICON_* constants defined in the module. There are also two extra 
constants that can be binary-ORed with button constants:</p>
 <ul>
-<li>BUTTONOPT_DEFAULT Pressing enter presses this button.</li>
-<li>BUTTONOPT_ESCAPE Pressing escape presses this button.</li>
+<li>BUTTON_DEFAULT Pressing enter presses this button.</li>
+<li>BUTTON_ESCAPE Pressing escape presses this button.</li>
 </ul>
 <p>Usage examples:</p>
-<pre>
-result = <a href="#-messageBox">messageBox</a>('Script failed',
-                    'This script only works when you have a text frame 
selected.',
-                    ICON_ERROR)
-result = <a href="#-messageBox">messageBox</a>('Monkeys!', 'Something went 
ook! &lt;i&gt;Was it a monkey?&lt;/i&gt;',
-                    ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT,
-                    BUTTON_NO, BUTTON_IGNORE|BUTTONOPT_ESCAPE)
-</pre>
+<p><b>result = messageBox</a>('Script failed', 'This script only works when 
you have a text frame selected.', ICON_ERROR)</p>
+<p>result = messageBox('Monkeys!', 'Something went ook! &lt;i&gt;Was it a 
monkey?&lt;/i&gt;', ICON_WARNING, BUTTON_YES|BUTTON_DEFAULT, BUTTON_NO, 
BUTTON_IGNORE|BUTTON_ESCAPE)</b></p>
 <p>Defined button and icon constants: BUTTON_NONE, BUTTON_ABORT, 
BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO, BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, 
BUTTON_YES, BUTTON_YESALL, ICON_NONE, ICON_INFORMATION, ICON_WARNING, 
ICON_CRITICAL.</p></dd>
 
 <dt><a name="-newDocDialog"><strong>newDocDialog</strong></a>(...)</dt>

Modified: trunk/Scribus/doc/en/scripterapi-dialogs.html
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=23467&path=/trunk/Scribus/doc/en/scripterapi-dialogs.html
==============================================================================
--- trunk/Scribus/doc/en/scripterapi-dialogs.html       (original)
+++ trunk/Scribus/doc/en/scripterapi-dialogs.html       Thu Feb 20 14:01:43 2020
@@ -34,18 +34,18 @@
 
 <dt><a name="-messageBox"><strong>messageBox</strong></a>(...)</dt>
 <dd><code>messageBox("caption", "message",
-icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT,
+icon=ICON_NONE, button1=BUTTON_OK|BUTTON_DEFAULT,
 button2=BUTTON_NONE, button3=BUTTON_NONE) -&gt; integer</code>
 <p>Displays a message box with the title "caption", the message "message", and 
an icon "icon" and up to 3 buttons. By default no icon is used and a single 
button, OK, is displayed. Only the caption and message arguments are required, 
though setting an icon and appropriate button(s) is strongly recommended. The 
message text may contain simple HTML-like markup.</p>
-<p>Returns the integer value of the assigned button. For example, regardless 
of whether BUTTON_OK is assigned to button1, button2, or button3, it will 
return 16384. Check <a href="scripterapi-constants.html">Pre-defined 
Constants</a> for further information.</p>
+<p>Returns the BUTTON_* constant value corresponding to the clicked button. 
For example, if OK button is clicked, BUTTON_OK will be returned regardless of 
whether it is assigned to button1, button2, or button3. Check <a 
href="scripterapi-constants.html">Pre-defined Constants</a> for further 
information.</p>
 <p>For the icon and the button parameters there are predefined constants 
available with the same names as in the Qt Documentation. These are the 
BUTTON_* and ICON_* constants defined in the module. There are also two extra 
constants that can be binary-ORed with button constants:</p>
 <ul>
-<li>BUTTONOPT_DEFAULT Pressing enter presses this button.</li>
-<li>BUTTONOPT_ESCAPE Pressing escape presses this button.</li>
+<li>BUTTON_DEFAULT Pressing enter presses this button.</li>
+<li>BUTTON_ESCAPE Pressing escape presses this button.</li>
 </ul>
 <p>Usage examples:</p>
 <p><b>result = messageBox</a>('Script failed', 'This script only works when 
you have a text frame selected.', ICON_ERROR)</p>
-<p>result = messageBox('Monkeys!', 'Something went ook! &lt;i&gt;Was it a 
monkey?&lt;/i&gt;', ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT, BUTTON_NO, 
BUTTON_IGNORE|BUTTONOPT_ESCAPE)</b></p>
+<p>result = messageBox('Monkeys!', 'Something went ook! &lt;i&gt;Was it a 
monkey?&lt;/i&gt;', ICON_WARNING, BUTTON_YES|BUTTON_DEFAULT, BUTTON_NO, 
BUTTON_IGNORE|BUTTON_ESCAPE)</b></p>
 <p>Defined button and icon constants: BUTTON_NONE, BUTTON_ABORT, 
BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO, BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, 
BUTTON_YES, BUTTON_YESALL, ICON_NONE, ICON_INFORMATION, ICON_WARNING, 
ICON_CRITICAL.</p></dd>
 
 <dt><a name="-newDocDialog"><strong>newDocDialog</strong></a>(...)</dt>

Modified: trunk/Scribus/doc/fr/scripterapi-dialogs.html
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=23467&path=/trunk/Scribus/doc/fr/scripterapi-dialogs.html
==============================================================================
--- trunk/Scribus/doc/fr/scripterapi-dialogs.html       (original)
+++ trunk/Scribus/doc/fr/scripterapi-dialogs.html       Thu Feb 20 14:01:43 2020
@@ -34,24 +34,24 @@
        
 <dt><a name="-messageBox"><strong>messageBox</strong></a>(...)</dt>
 <dd><code>messageBox("titre", "message",
-icone=ICON_NONE, bouton1=BUTTON_OK|BUTTONOPT_DEFAULT,
+icone=ICON_NONE, bouton1=BUTTON_OK|BUTTON_DEFAULT,
 bouton2=BUTTON_NONE, bouton3=BUTTON_NONE) -&gt; nombre entier</code>
 <p>Affiche une boîte de message contenant le "titre", le message
 "message", une icône "icone" et jusqu'à 3 boutons. Par défaut, aucune 
icône n'est utilisée et un seul bouton, OK, est affiché. Seuls les arguments 
titre et message sont requis, mais on recommande de définir une icône et un 
ou plusieurs boutons appropriés. Le message texte peut contenir des marqueurs 
de type HTML simples.</p>
-<p>Retourne le numéro du bouton que l'utilisateur a enfoncé. Les numéros de 
boutons commencent à 1.</p>
+<p>Retourne la constante BUTTON_* correspondant au bouton cliqué. Par 
exemple, si le bouton OK est cliqué, la fonction retournera BUTTON_OK que le 
bouton soit assigné au bouton 1, bouton 2, ou bouton 3.</p>
 <p>Pour les paramètres d'icône et de bouton, certaines constantes 
prédéfinies sont disponibles et portent les mêmes noms que dans la 
documentation Qt. 
 Ce sont les constantes BUTTON_* et ICON_* définies dans ce module. Il y a 
également deux constantes supplémentaires qui peuvent être combinées par un 
OU aux constantes de bouton :</p>
 <ul>
-       <li>BUTTONOPT_DEFAULT - Appuyer sur Entrée enfonce ce bouton.</li>
-       <li>BUTTONOPT_ESCAPE - Appuyer sur Esc enfonce ce bouton.</li>
+       <li>BUTTON_DEFAULT - Appuyer sur Entrée enfonce ce bouton.</li>
+       <li>BUTTON_ESCAPE - Appuyer sur Esc enfonce ce bouton.</li>
 </ul>
 <p>Exemples d'utilisation :</p>
 <pre>
 result = <a href="#-messageBox">messageBox</a>('Le script a échoué', 'Ce 
script fonctionne seulement lorsqu'un cadre de texte est sélectionné.'
 ICON_ERROR)result = <a href="#-messageBox">messageBox</a>('Singes!',
 'Quelque chose s'est passé! &lt;i&gt;était-ce un singe? &lt;/i&gt;',
-                    ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT,
-                    BUTTON_NO, BUTTON_IGNORE|BUTTONOPT_ESCAPE)
+                    ICON_WARNING, BUTTON_YES|BUTTON_DEFAULT,
+                    BUTTON_NO, BUTTON_IGNORE|BUTTON_ESCAPE)
 </pre>
 <p>Les constantes de boutons et d'icônes suivantes sont définies : 
BUTTON_NONE, BUTTON_ABORT, BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO, 
BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, BUTTON_YES, BUTTON_YESALL, ICON_NONE, 
ICON_INFORMATION, ICON_WARNING, ICON_CRITICAL.</p></dd>
        

Modified: trunk/Scribus/doc/it/scripterapi-dialogs.html
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=23467&path=/trunk/Scribus/doc/it/scripterapi-dialogs.html
==============================================================================
--- trunk/Scribus/doc/it/scripterapi-dialogs.html       (original)
+++ trunk/Scribus/doc/it/scripterapi-dialogs.html       Thu Feb 20 14:01:43 2020
@@ -1,85 +1,83 @@
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
-       <title>Using Dialogs from Scribus</title>
-</head>
-<body>
-<h2>Using Dialogs from Scribus</h2> 
-
-<dl>
-
-<dt><a name="-fileDialog"><strong>fileDialog</strong></a>(...)</dt>
-<dd><code>fileDialog("caption", ["filter", "defaultname", haspreview, issave, 
isdir])<br> -&gt; string with filename</code>
-<p>Shows a File Open dialog box with the caption "caption". Files are filtered 
with the filter string "filter". A default filename or file path can also 
supplied, leave this string empty when you don't want to use it. A value of 
True for haspreview enables a small preview widget in the FileSelect box. When 
the issave parameter is set to True the dialog acts like a "Save As" dialog 
otherwise it acts like a "File Open Dialog". When the isdir parameter is True 
the dialog shows and returns only directories. The default for all of the 
opional parameters is False.<p> 
-<p>The filter, if specified, takes the form 'comment (*.type *.type2 ...)'. 
For example 'Images (*.png *.xpm *.jpg)'.</p> 
-<p>Refer to the Qt-Documentation for QFileDialog for details on filters.</p>
-<p>Example: <a href="#-fileDialog">fileDialog</a>('Open input', 'CSV files 
(*.csv)')<br>
-Example: <a href="#-fileDialog">fileDialog</a>('Save report', 
defaultname='report.txt', issave=True)</p></dd>
-
-<dt><a name="-fileQuit"><strong>fileQuit</strong></a>(...)</dt>
-<dd><code>fileQuit()</code>
-<p>Quit Scribus.</p></dd>
-
-<dt><a name="-getGuiLanguage"><strong>getGuiLanguage</strong></a>(...)</dt>
-<dd><code>getGuiLanguage() -&gt; string</code>
-<p>Returns a string with the -lang value.</p></dd>
-
-<dt><a name="-messagebarText"><strong>messagebarText</strong></a>(...)</dt>
-<dd><code>messagebarText("string")</code>
-<p>Writes the "string" into the Scribus message bar (status line). The text 
must be UTF8 encoded or 'unicode' string(recommended).</p></dd>
-
-<dt><a name="-messageBox"><strong>messageBox</strong></a>(...)</dt>
-<dd><code>messageBox("caption", "message",
-icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT,
-button2=BUTTON_NONE, button3=BUTTON_NONE) -&gt; integer</code>
-<p>Displays a message box with the title "caption", the message "message", and 
an icon "icon" and up to 3 buttons. By default no icon is used and a single 
button, OK, is displayed. Only the caption and message arguments are required, 
though setting an icon and appropriate button(s) is strongly recommended. The 
message text may contain simple HTML-like markup.</p>
-<p>Returns the number of the button the user pressed. Button numbers start at 
1.</p>
-<p>For the icon and the button parameters there are predefined constants 
available with the same names as in the Qt Documentation. These are the 
BUTTON_* and ICON_* constants defined in the module. There are also two extra 
constants that can be binary-ORed with button constants:</p>
-<ul>
-<li>BUTTONOPT_DEFAULT Pressing enter presses this button.</li>
-<li>BUTTONOPT_ESCAPE Pressing escape presses this button.</li>
-</ul>
-<p>Usage examples:</p>
-<pre>
-result = <a href="#-messageBox">messageBox</a>('Script failed',
-                    'This script only works when you have a text frame 
selected.',
-                    ICON_ERROR)
-result = <a href="#-messageBox">messageBox</a>('Monkeys!', 'Something went 
ook! &lt;i&gt;Was it a monkey?&lt;/i&gt;',
-                    ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT,
-                    BUTTON_NO, BUTTON_IGNORE|BUTTONOPT_ESCAPE)
-</pre>
-<p>Defined button and icon constants: BUTTON_NONE, BUTTON_ABORT, 
BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO, BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, 
BUTTON_YES, BUTTON_YESALL, ICON_NONE, ICON_INFORMATION, ICON_WARNING, 
ICON_CRITICAL.</p></dd>
-
-<dt><a name="-newDocDialog"><strong>newDocDialog</strong></a>(...)</dt>
-<dd><code>newDocDialog() -&gt; bool</code>
-<p>Displays the "New Document" dialog box. Creates a new document if the user 
accepts the settings. Does not create a document if the user presses cancel. 
Returns true if a new document was created.</p></dd>
-
-<dt><a name="-newStyleDialog"><strong>newStyleDialog</strong>(...)</a></dt>
-<dd><code>newStyleDialog() -&gt; string</code>
-<p>Shows 'Create new paragraph style' dialog. Function returns real style name 
or None when user cancels the dialog.</p></dd>
-
-<dt><a name="-statusMessage"><strong>statusMessage</strong></a>(...)</dt>
-<dd><code>messagebarText("string")</code>
-<p>Writes the "string" into the Scribus message bar (status line). The text 
must be UTF8 encoded or 'unicode' string(recommended).</p></dd>
-
-<dt><a name="-progressReset"><strong>progressReset</strong></a>(...)</dt>
-<dd><code>progressReset()</code>
-<p>Cleans up the Scribus progress bar previous settings. It is called before 
the new progress bar use. See progressSet.</p></dd>
-
-<dt><a name="-progressSet"><strong>progressSet</strong></a>(...)</dt>
-<dd><code>progressSet(nr)</code>
-<p>Set the progress bar position to "nr", a value relative to the previously 
set progressTotal. The progress bar uses the concept of steps; you give it the 
total number of steps and the number of steps completed so far and it will 
display the percentage of steps that have been completed. You can specify the 
total number of steps with <a href="#-progressTotal">progressTotal</a>(). The 
current number of steps is set with <a href="#-progressSet">progressSet</a>(). 
The progress bar can be rewound to the beginning with <a 
href="#-progressReset">progressReset</a>(). [based on info taken from 
Trolltech's Qt docs]</p></dd>
-
-<dt><a name="-progressTotal"><strong>progressTotal</strong></a>(...)</dt>
-<dd><code>progressTotal(max)</code>
-<p>Sets the progress bar's maximum steps value to the specified number. See 
progressSet.</p></dd>
-
-<dt><a name="-valueDialog"><strong>valueDialog</strong></a>(...)</dt>
-<dd><code>valueDialog(caption, message [,defaultvalue]) -&gt; string</code>
-<p>Shows the common 'Ask for string' dialog and returns its value as a string 
Parameters: window title, text in the window and optional 'default' value.</p>
-<p>Example: <a href="#-valueDialog">valueDialog</a>('title', 'text in the 
window', 'optional')</p></dd>
-
-</dl>
-
-</body>
-</html>
+<html>
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+       <title>Using Dialogs from Scribus</title>
+</head>
+<style>
+@import "manual.css";
+</style>
+<body>
+<h2>Using Dialogs from Scribus</h2> 
+
+<dl>
+
+<dt><a name="-fileDialog"><strong>fileDialog</strong></a>(...)</dt>
+<dd><code>fileDialog("caption", ["filter", "defaultname", haspreview, issave, 
isdir])<br> -&gt; string with filename</code>
+<p>Shows a File Open dialog box with the caption "caption". Files are filtered 
with the filter string "filter". A default filename or file path can also 
supplied, leave this string empty when you don't want to use it. A value of 
True for haspreview enables a small preview widget in the FileSelect box. When 
the issave parameter is set to True the dialog acts like a "Save As" dialog 
otherwise it acts like a "File Open Dialog". When the isdir parameter is True 
the dialog shows and returns only directories. The default for all of the 
opional parameters is False.<p> 
+<p>The filter, if specified, takes the form 'comment (*.type *.type2 ...)'. 
For example 'Images (*.png *.xpm *.jpg)'.</p> 
+<p>Refer to the Qt-Documentation for QFileDialog for details on filters.</p>
+<p>Examples:</p>
+<p><b>fileDialog('Open input', 'CSV files (*.csv)')</p>
+<p>fileDialog('Save report', defaultname='report.txt', 
issave=True)</b></p></dd>
+
+<dt><a name="-fileQuit"><strong>fileQuit</strong></a>(...)</dt>
+<dd><code>fileQuit()</code>
+<p>Quit Scribus.</p></dd>
+
+<dt><a name="-getGuiLanguage"><strong>getGuiLanguage</strong></a>(...)</dt>
+<dd><code>getGuiLanguage() -&gt; string</code>
+<p>Returns a string with the -lang value.</p></dd>
+
+<dt><a name="-messagebarText"><strong>messagebarText</strong></a>(...)</dt>
+<dd><code>messagebarText("string")</code>
+<p>Writes the "string" into the Scribus message bar (status line). The text 
must be UTF8 encoded or 'unicode' string(recommended).</p></dd>
+
+<dt><a name="-messageBox"><strong>messageBox</strong></a>(...)</dt>
+<dd><code>messageBox("caption", "message",
+icon=ICON_NONE, button1=BUTTON_OK|BUTTON_DEFAULT,
+button2=BUTTON_NONE, button3=BUTTON_NONE) -&gt; integer</code>
+<p>Displays a message box with the title "caption", the message "message", and 
an icon "icon" and up to 3 buttons. By default no icon is used and a single 
button, OK, is displayed. Only the caption and message arguments are required, 
though setting an icon and appropriate button(s) is strongly recommended. The 
message text may contain simple HTML-like markup.</p>
+<p>Returns the BUTTON_* constant value corresponding to the clicked button. 
For example, if OK button is clicked, BUTTON_OK will be returned regardless of 
whether it is assigned to button1, button2, or button3. Check <a 
href="scripterapi-constants.html">Pre-defined Constants</a> for further 
information.</p>
+<p>For the icon and the button parameters there are predefined constants 
available with the same names as in the Qt Documentation. These are the 
BUTTON_* and ICON_* constants defined in the module. There are also two extra 
constants that can be binary-ORed with button constants:</p>
+<ul>
+<li>BUTTON_DEFAULT Pressing enter presses this button.</li>
+<li>BUTTON_ESCAPE Pressing escape presses this button.</li>
+</ul>
+<p>Usage examples:</p>
+<p><b>result = messageBox</a>('Script failed', 'This script only works when 
you have a text frame selected.', ICON_ERROR)</p>
+<p>result = messageBox('Monkeys!', 'Something went ook! &lt;i&gt;Was it a 
monkey?&lt;/i&gt;', ICON_WARNING, BUTTON_YES|BUTTON_DEFAULT, BUTTON_NO, 
BUTTON_IGNORE|BUTTON_ESCAPE)</b></p>
+<p>Defined button and icon constants: BUTTON_NONE, BUTTON_ABORT, 
BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO, BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, 
BUTTON_YES, BUTTON_YESALL, ICON_NONE, ICON_INFORMATION, ICON_WARNING, 
ICON_CRITICAL.</p></dd>
+
+<dt><a name="-newDocDialog"><strong>newDocDialog</strong></a>(...)</dt>
+<dd><code>newDocDialog() -&gt; bool</code>
+<p>Displays the "New Document" dialog box. Creates a new document if the user 
accepts the settings. Does not create a document if the user presses cancel. 
Returns true if a new document was created.</p></dd>
+
+<dt><a name="-newStyleDialog"><strong>newStyleDialog</strong>(...)</a></dt>
+<dd><code>newStyleDialog() -&gt; string</code>
+<p>Shows 'Create new paragraph style' dialog. Function returns real style name 
or None when user cancels the dialog.</p></dd>
+
+<dt><a name="-statusMessage"><strong>statusMessage</strong></a>(...)</dt>
+<dd><code>messagebarText("string")</code>
+<p>Writes the "string" into the Scribus message bar (status line). The text 
must be UTF8 encoded or 'unicode' string(recommended).</p></dd>
+
+<dt><a name="-progressReset"><strong>progressReset</strong></a>(...)</dt>
+<dd><code>progressReset()</code>
+<p>Cleans up the Scribus progress bar previous settings. It is called before 
the new progress bar use. See progressSet.</p></dd>
+
+<dt><a name="-progressSet"><strong>progressSet</strong></a>(...)</dt>
+<dd><code>progressSet(nr)</code>
+<p>Set the progress bar position to "nr", a value relative to the previously 
set progressTotal. The progress bar uses the concept of steps; you give it the 
total number of steps and the number of steps completed so far and it will 
display the percentage of steps that have been completed. You can specify the 
total number of steps with <a href="#-progressTotal">progressTotal</a>(). The 
current number of steps is set with <a href="#-progressSet">progressSet</a>(). 
The progress bar can be rewound to the beginning with <a 
href="#-progressReset">progressReset</a>(). [based on info taken from 
Trolltech's Qt docs]</p></dd>
+
+<dt><a name="-progressTotal"><strong>progressTotal</strong></a>(...)</dt>
+<dd><code>progressTotal(max)</code>
+<p>Sets the progress bar's maximum steps value to the specified number. See 
progressSet.</p></dd>
+
+<dt><a name="-valueDialog"><strong>valueDialog</strong></a>(...)</dt>
+<dd><code>valueDialog(caption, message [,defaultvalue]) -&gt; string</code>
+<p>Shows the common 'Ask for string' dialog and returns its value as a string 
Parameters: window title, text in the window and optional 'default' value.</p>
+<p>Example: <a href="#-valueDialog">valueDialog</a>('title', 'text in the 
window', 'optional')</p></dd>
+
+</dl>
+
+</body>
+</html>

Modified: trunk/Scribus/doc/ru/scripterapi-dialogs.html
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=23467&path=/trunk/Scribus/doc/ru/scripterapi-dialogs.html
==============================================================================
--- trunk/Scribus/doc/ru/scripterapi-dialogs.html       (original)
+++ trunk/Scribus/doc/ru/scripterapi-dialogs.html       Thu Feb 20 14:01:43 2020
@@ -34,18 +34,18 @@
 
 <dt><a name="-messageBox"><strong>messageBox</strong></a>(...)</dt>
 <dd><code>messageBox("caption", "message",
-icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT,
+icon=ICON_NONE, button1=BUTTON_OK|BUTTON_DEFAULT,
 button2=BUTTON_NONE, button3=BUTTON_NONE) -&gt; integer</code>
 <p>Displays a message box with the title "caption", the message "message", and 
an icon "icon" and up to 3 buttons. By default no icon is used and a single 
button, OK, is displayed. Only the caption and message arguments are required, 
though setting an icon and appropriate button(s) is strongly recommended. The 
message text may contain simple HTML-like markup.</p>
-<p>Returns the integer value of the assigned button. For example, regardless 
of whether BUTTON_OK is assigned to button1, button2, or button3, it will 
return 16384. Check <a href="scripterapi-constants.html">Pre-defined 
Constants</a> for further information.</p>
+<p>Returns the BUTTON_* constant value corresponding to the clicked button. 
For example, if OK button is clicked, BUTTON_OK will be returned regardless of 
whether it is assigned to button1, button2, or button3. Check <a 
href="scripterapi-constants.html">Pre-defined Constants</a> for further 
information.</p>
 <p>For the icon and the button parameters there are predefined constants 
available with the same names as in the Qt Documentation. These are the 
BUTTON_* and ICON_* constants defined in the module. There are also two extra 
constants that can be binary-ORed with button constants:</p>
 <ul>
-<li>BUTTONOPT_DEFAULT Pressing enter presses this button.</li>
-<li>BUTTONOPT_ESCAPE Pressing escape presses this button.</li>
+<li>BUTTON_DEFAULT Pressing enter presses this button.</li>
+<li>BUTTON_ESCAPE Pressing escape presses this button.</li>
 </ul>
 <p>Usage examples:</p>
 <p><b>result = messageBox</a>('Script failed', 'This script only works when 
you have a text frame selected.', ICON_ERROR)</p>
-<p>result = messageBox('Monkeys!', 'Something went ook! &lt;i&gt;Was it a 
monkey?&lt;/i&gt;', ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT, BUTTON_NO, 
BUTTON_IGNORE|BUTTONOPT_ESCAPE)</b></p>
+<p>result = messageBox('Monkeys!', 'Something went ook! &lt;i&gt;Was it a 
monkey?&lt;/i&gt;', ICON_WARNING, BUTTON_YES|BUTTON_DEFAULT, BUTTON_NO, 
BUTTON_IGNORE|BUTTON_ESCAPE)</b></p>
 <p>Defined button and icon constants: BUTTON_NONE, BUTTON_ABORT, 
BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO, BUTTON_NOALL, BUTTON_OK, BUTTON_RETRY, 
BUTTON_YES, BUTTON_YESALL, ICON_NONE, ICON_INFORMATION, ICON_WARNING, 
ICON_CRITICAL.</p></dd>
 
 <dt><a name="-newDocDialog"><strong>newDocDialog</strong></a>(...)</dt>

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.h
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=23467&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.h      (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmddialog.h      Thu Feb 20 
14:01:43 2020
@@ -54,7 +54,7 @@
 /*! docstring */
 PyDoc_STRVAR(scribus_messagebox__doc__,
 QT_TR_NOOP("messageBox(\"caption\", \"message\",\n\
-    icon=ICON_NONE, button1=BUTTON_OK|BUTTONOPT_DEFAULT,\n\
+    icon=ICON_NONE, button1=BUTTON_OK|BUTTON_DEFAULT,\n\
     button2=BUTTON_NONE, button3=BUTTON_NONE) -> integer\n\
 \n\
 Displays a message box with the title \"caption\", the message \"message\", 
and\n\
@@ -63,23 +63,24 @@
 though setting an icon and appropriate button(s) is strongly\n\
 recommended. The message text may contain simple HTML-like markup.\n\
 \n\
-Returns the number of the button the user pressed. Button numbers start\n\
-at 1.\n\
+Returns the BUTTON_* constant value corresponding to the clicked button. For 
example,\n\
+if OK button is clicked, BUTTON_OK will be returned regardless of whether it 
is assigned to\n\
+button1, button2, or button3.\n\
 \n\
 For the icon and the button parameters there are predefined constants 
available\n\
 with the same names as in the Qt Documentation. These are the BUTTON_* and\n\
 ICON_* constants defined in the module. There are also two extra constants 
that\n\
 can be binary-ORed with button constants:\n\
-    BUTTONOPT_DEFAULT   Pressing enter presses this button.\n\
-    BUTTONOPT_ESCAPE    Pressing escape presses this button.\n\
+    BUTTON_DEFAULT   Pressing enter presses this button.\n\
+    BUTTON_ESCAPE    Pressing escape presses this button.\n\
 \n\
 Usage examples:\n\
 result = messageBox('Script failed',\n\
                     'This script only works when you have a text frame 
selected.',\n\
                     ICON_ERROR)\n\
 result = messageBox('Monkeys!', 'Something went ook! <i>Was it a 
monkey?</i>',\n\
-                    ICON_WARNING, BUTTON_YES|BUTTONOPT_DEFAULT,\n\
-                    BUTTON_NO, BUTTON_IGNORE|BUTTONOPT_ESCAPE)\n\
+                    ICON_WARNING, BUTTON_YES|BUTTON_DEFAULT,\n\
+                    BUTTON_NO, BUTTON_IGNORE|BUTTON_ESCAPE)\n\
 \n\
 Defined button and icon constants:\n\
 BUTTON_NONE, BUTTON_ABORT, BUTTON_CANCEL, BUTTON_IGNORE, BUTTON_NO,\n\

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=23467&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp Thu Feb 20 
14:01:43 2020
@@ -746,6 +746,7 @@
        PyDict_SetItemString(d, const_cast<char*>("BUTTON_RETRY"), 
Py_BuildValue(const_cast<char*>("i"), QMessageBox::Retry));
        PyDict_SetItemString(d, const_cast<char*>("BUTTON_IGNORE"), 
Py_BuildValue(const_cast<char*>("i"), QMessageBox::Ignore));
        PyDict_SetItemString(d, const_cast<char*>("BUTTON_DEFAULT"), 
Py_BuildValue(const_cast<char*>("i"), QMessageBox::Default));
+       PyDict_SetItemString(d, const_cast<char*>("BUTTON_ESCAPE"), 
Py_BuildValue(const_cast<char*>("i"), QMessageBox::Escape));
        PyDict_SetItemString(d, const_cast<char*>("ICON_NONE"), 
Py_BuildValue(const_cast<char*>("i"), QMessageBox::NoIcon));
        PyDict_SetItemString(d, const_cast<char*>("ICON_INFORMATION"), 
Py_BuildValue(const_cast<char*>("i"), QMessageBox::Information));
        PyDict_SetItemString(d, const_cast<char*>("ICON_WARNING"), 
Py_BuildValue(const_cast<char*>("i"), QMessageBox::Warning));


_______________________________________________
scribus-commit mailing list
[email protected]
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to