r24159 by jghali - #16299, #16301: fix getAllObjects() documentation and enable getAllObjects() to retrieve items on a specific layer

scribus-commit scribus-commit at lists.scribus.net
Tue Nov 3 10:15:36 UTC 2020


Author: jghali
Date: Tue Nov  3 10:15:36 2020
New Revision: 24159

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24159
Log:
#16299, #16301: fix getAllObjects() documentation and enable getAllObjects() to retrieve items on a specific layer

Modified:
    trunk/Scribus/doc/de/scripterapi-page.html
    trunk/Scribus/doc/en/scripterapi-page.html
    trunk/Scribus/doc/fr/scripterapi-page.html
    trunk/Scribus/doc/it/scripterapi-page.html
    trunk/Scribus/doc/ru/scripterapi-page.html
    trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h
    trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
    trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp
    trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.h
    trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptercore.cpp

Modified: trunk/Scribus/doc/de/scripterapi-page.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/doc/de/scripterapi-page.html
==============================================================================
--- trunk/Scribus/doc/de/scripterapi-page.html	(original)
+++ trunk/Scribus/doc/de/scripterapi-page.html	Tue Nov  3 10:15:36 2020
@@ -47,8 +47,15 @@
 for editing. Finish editing with <a href="#-closeMasterPage">closeMasterPage()</a>.</p></dd>
 
 <dt><a name="-getAllObjects"><strong>getAllObjects</strong></a>(...)</dt>
-<dd><code>getAllObjects() -> list</code>
-<p>Returns a list containing the names of all objects on the current page.</p></dd>
+<dd><code>getAllObjects([type, page, "layer"]) -> list</code>
+<p>Returns a list containing the names of all objects of specified type and located on specified page and/or layer.</p>
+<p>This function accepts several optional keyword arguments:
+<ul>
+<li>type (optional): integer corresponding to item type, by default all items will be returned.</li>
+<li>page (optional): index of page on which returned objects are located, by default the current page. The page index starts at 0 and goes to the total number of pages - 1.</li>
+<li>"layer" (optional): name of layer on which returned objects are located, by default the function returns items located on all layers.</li>
+</ul></p>
+<p>May throw ValueError if page index or layer name is invalid.</p></dd>
 
 <dt><a name="-getHGuides"><strong>getHGuides</strong></a>(...)</dt>
 <dd><code>getHGuides() -> list</code>
@@ -57,7 +64,7 @@
 
 <dt><a name="-getMasterPage"><strong>getMasterPage</strong>(...)</a></dt>
 <dd><code>getMasterPage(nr) -> string</code>
-<p>Returns the name of master page applied to page "nr"</p>
+<p>Returns the name of master page applied to page "nr".</p>
 <p>May raise IndexError if the page number is out of range.</p></dd>
 
 <dt><a name="-getPageType"><strong>getPageType</strong>(...)</a></dt>

Modified: trunk/Scribus/doc/en/scripterapi-page.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/doc/en/scripterapi-page.html
==============================================================================
--- trunk/Scribus/doc/en/scripterapi-page.html	(original)
+++ trunk/Scribus/doc/en/scripterapi-page.html	Tue Nov  3 10:15:36 2020
@@ -47,8 +47,15 @@
 for editing. Finish editing with <a href="#-closeMasterPage">closeMasterPage()</a>.</p></dd>
 
 <dt><a name="-getAllObjects"><strong>getAllObjects</strong></a>(...)</dt>
-<dd><code>getAllObjects() -> list</code>
-<p>Returns a list containing the names of all objects on the current page.</p></dd>
+<dd><code>getAllObjects([type, page, "layer"]) -> list</code>
+<p>Returns a list containing the names of all objects of specified type and located on specified page and/or layer.</p>
+<p>This function accepts several optional keyword arguments:
+<ul>
+<li>type (optional): integer corresponding to item type, by default all items will be returned.</li>
+<li>page (optional): index of page on which returned objects are located, by default the current page. The page index starts at 0 and goes to the total number of pages - 1.</li>
+<li>"layer" (optional): name of layer on which returned objects are located, by default the function returns items located on all layers.</li>
+</ul></p>
+<p>May throw ValueError if page index or layer name is invalid.</p></dd>
 
 <dt><a name="-getHGuides"><strong>getHGuides</strong></a>(...)</dt>
 <dd><code>getHGuides() -> list</code>

Modified: trunk/Scribus/doc/fr/scripterapi-page.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/doc/fr/scripterapi-page.html
==============================================================================
--- trunk/Scribus/doc/fr/scripterapi-page.html	(original)
+++ trunk/Scribus/doc/fr/scripterapi-page.html	Tue Nov  3 10:15:36 2020
@@ -40,8 +40,15 @@
 Lorsque l'édition du gabarit est achevée, appelez la fonction <a href="#-closeMasterPage">closeMasterPage()</a>.</p></dd>
 
 <dt><a name="-getAllObjects"><strong>getAllObjects</strong></a>(...)</dt>
-<dd><code>getAllObjects() -> liste</code>
-<p>Retourne une liste contenant les noms de tous les objets de la page courante.</p></dd>
+<dd><code>getAllObjects([type, page, "calque"]) -> liste</code>
+<p>Retourne une liste contenant les noms de tous les objets du type spécifié et situés sur la page et/ou le calque spécifiés.</p>
+<p>Cette fonction accepte les paramètres nommés suivants:
+<ul>
+<li>type (optionel) : entier correspondant au type des objets retournés, par défaut tous les types d'objets sont retournés.</li>
+<li>page (optionel) : indice de la page où sont situés les objets retournés, par défault la page courante. L'indice de page est situé entre 0 et nombre de pages - 1.</li>
+<li>"layer" (optionel) : nom du calque où sont situés les objets retournés, par défault la fonction retourne les objets situés sur tous les calques.</li>
+</ul></p>
+<p>Peut générer ValueError if l'indice du page ou le nom du calque sont invalides.</p></dd>
 
 <dt><a name="-getHGuides"><strong>getHGuides</strong></a>(...)</dt>
 <dd><code>getHGuides() -> liste</code>

Modified: trunk/Scribus/doc/it/scripterapi-page.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/doc/it/scripterapi-page.html
==============================================================================
--- trunk/Scribus/doc/it/scripterapi-page.html	(original)
+++ trunk/Scribus/doc/it/scripterapi-page.html	Tue Nov  3 10:15:36 2020
@@ -47,8 +47,15 @@
 for editing. Finish editing with <a href="#-closeMasterPage">closeMasterPage()</a>.</p></dd>
 
 <dt><a name="-getAllObjects"><strong>getAllObjects</strong></a>(...)</dt>
-<dd><code>getAllObjects() -> list</code>
-<p>Returns a list containing the names of all objects on the current page.</p></dd>
+<dd><code>getAllObjects([type, page, "layer"]) -> list</code>
+<p>Returns a list containing the names of all objects of specified type and located on specified page and/or layer.</p>
+<p>This function accepts several optional keyword arguments:
+<ul>
+<li>type (optional): integer corresponding to item type, by default all items will be returned.</li>
+<li>page (optional): index of page on which returned objects are located, by default the current page. The page index starts at 0 and goes to the total number of pages - 1.</li>
+<li>"layer" (optional): name of layer on which returned objects are located, by default the function returns items located on all layers.</li>
+</ul></p>
+<p>May throw ValueError if page index or layer name is invalid.</p></dd>
 
 <dt><a name="-getHGuides"><strong>getHGuides</strong></a>(...)</dt>
 <dd><code>getHGuides() -> list</code>
@@ -57,7 +64,7 @@
 
 <dt><a name="-getMasterPage"><strong>getMasterPage</strong>(...)</a></dt>
 <dd><code>getMasterPage(nr) -> string</code>
-<p>Returns the name of master page applied to page "nr"</p>
+<p>Returns the name of master page applied to page "nr".</p>
 <p>May raise IndexError if the page number is out of range.</p></dd>
 
 <dt><a name="-getPageType"><strong>getPageType</strong>(...)</a></dt>

Modified: trunk/Scribus/doc/ru/scripterapi-page.html
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/doc/ru/scripterapi-page.html
==============================================================================
--- trunk/Scribus/doc/ru/scripterapi-page.html	(original)
+++ trunk/Scribus/doc/ru/scripterapi-page.html	Tue Nov  3 10:15:36 2020
@@ -47,8 +47,15 @@
 for editing. Finish editing with <a href="#-closeMasterPage">closeMasterPage()</a>.</p></dd>
 
 <dt><a name="-getAllObjects"><strong>getAllObjects</strong></a>(...)</dt>
-<dd><code>getAllObjects() -> list</code>
-<p>Returns a list containing the names of all objects on the current page.</p></dd>
+<dd><code>getAllObjects([type, page, "layer"]) -> list</code>
+<p>Returns a list containing the names of all objects of specified type and located on specified page and/or layer.</p>
+<p>This function accepts several optional keyword arguments:
+<ul>
+<li>type (optional): integer corresponding to item type, by default all items will be returned.</li>
+<li>page (optional): index of page on which returned objects are located, by default the current page. The page index starts at 0 and goes to the total number of pages - 1.</li>
+<li>"layer" (optional): name of layer on which returned objects are located, by default the function returns items located on all layers.</li>
+</ul></p>
+<p>May throw ValueError if page index or layer name is invalid.</p></dd>
 
 <dt><a name="-getHGuides"><strong>getHGuides</strong></a>(...)</dt>
 <dd><code>getHGuides() -> list</code>
@@ -57,7 +64,7 @@
 
 <dt><a name="-getMasterPage"><strong>getMasterPage</strong>(...)</a></dt>
 <dd><code>getMasterPage(nr) -> string</code>
-<p>Returns the name of master page applied to page "nr"</p>
+<p>Returns the name of master page applied to page "nr".</p>
 <p>May raise IndexError if the page number is out of range.</p></dd>
 
 <dt><a name="-getPageType"><strong>getPageType</strong>(...)</a></dt>

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp	Tue Nov  3 10:15:36 2020
@@ -310,66 +310,67 @@
 
 PyObject *scribus_getallobjects(PyObject* /* self */, PyObject* args, PyObject *keywds)
 {
-	PyObject *l;
-	int typ = -1;
+	int type = -1;
 	uint counter = 0;
 	uint counter2 = 0;
 
 	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc;
 	int pageNr = currentDoc->currentPageNumber();
-	char *kwlist[] = {const_cast<char*>(""), const_cast<char*>("page"), nullptr};
-
-	if (!PyArg_ParseTupleAndKeywords(args, keywds, "|ii", kwlist, &typ, &pageNr))
+	char *kwlist[] = { const_cast<char*>("type"), const_cast<char*>("page"), const_cast<char*>("layer"), nullptr};
+	char* szLayerName = const_cast<char*>("");
+
+	if (!PyArg_ParseTupleAndKeywords(args, keywds, "|iies", kwlist, &type, &pageNr, "utf-8", &szLayerName))
+		return nullptr;
+
+	if (!checkHaveDocument())
 		return nullptr;
 
 	int numPages = currentDoc->Pages->count();
-	if (pageNr < 0 || pageNr >= numPages) {
-		PyErr_SetString(PyExc_RuntimeError, QObject::tr("page number is invalid.","python error").toLocal8Bit().constData());
-		return nullptr;
-	}
-	//if (!PyArg_ParseTuple(args, "|i", &typ))
-	//	return nullptr;
-	if (!checkHaveDocument())
-		return nullptr;
+	if (pageNr < 0 || pageNr >= numPages)
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("page number is invalid.", "python error").toLocal8Bit().constData());
+		return nullptr;
+	}
+
+	const ScLayer *layer = nullptr;
+	QString layerName = QString::fromUtf8(szLayerName);
+	if (!layerName.isEmpty())
+	{
+		layer = currentDoc->Layers.layerByName(layerName);
+		if (!layer)
+		{
+			PyErr_SetString(PyExc_ValueError, QObject::tr("layer name is invalid.", "python error").toLocal8Bit().constData());
+			return nullptr;
+		}
+	}
+
 	// have doc already
-	if (typ != -1)
-	{
-		for (int lam2 = 0; lam2 < currentDoc->Items->count(); ++lam2)
-		{
-			if ((currentDoc->Items->at(lam2)->itemType() == typ) && (pageNr == currentDoc->Items->at(lam2)->OwnPage))
-				counter++;
-		}
-	}
-	else
-	{
-		for (int lam2 = 0; lam2 < currentDoc->Items->count(); ++lam2)
-		{
-			if (pageNr == currentDoc->Items->at(lam2)->OwnPage)
-				counter++;
-		}
-	}
-
-	l = PyList_New(counter);
-	for (int lam=0; lam < currentDoc->Items->count(); ++lam)
-	{
-		if  (pageNr == currentDoc->Items->at(lam)->OwnPage)
-		{
-			if (typ != -1)
-			{
-				if (currentDoc->Items->at(lam)->itemType() == typ)
-				{
-					PyList_SetItem(l, counter2, PyUnicode_FromString(currentDoc->Items->at(lam)->itemName().toUtf8()));
-					counter2++;
-				}
-			}
-			else
-			{
-				PyList_SetItem(l, counter2, PyUnicode_FromString(currentDoc->Items->at(lam)->itemName().toUtf8()));
-				counter2++;
-			}
-		}
-	}
-	return l;
+	for (int i = 0; i < currentDoc->Items->count(); ++i)
+	{
+		PageItem* item = currentDoc->Items->at(i);
+		if  (pageNr != item->OwnPage)
+			continue;
+		if ((type != -1) && (item->itemType() != type))
+			continue;
+		if (layer && (layer->ID != item->m_layerID))
+			continue;
+		counter++;
+	}
+
+	PyObject* pyList = PyList_New(counter);
+	for (int i = 0; i < currentDoc->Items->count(); ++i)
+	{
+		PageItem* item = currentDoc->Items->at(i);
+		if  (pageNr != item->OwnPage)
+			continue;
+		if ((type != -1) && (item->itemType() == type))
+			continue;
+		if (layer && (layer->ID != item->m_layerID))
+			continue;
+		PyList_SetItem(pyList, counter2, PyUnicode_FromString(item->itemName().toUtf8()));
+		counter2++;
+	}
+	return pyList;
 }
 
 PyObject *scribus_getobjectattributes(PyObject* /* self */, PyObject* args)

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h	Tue Nov  3 10:15:36 2020
@@ -243,11 +243,17 @@
 
 /*! docstring */
 PyDoc_STRVAR(scribus_getallobjects__doc__,
-QT_TR_NOOP("getAllObjects([\"page\"]) -> list\n\
-\n\
-Returns a list containing the names of all objects on the current page.\n\
-Takes an optional keyword argument that changes the page from which the objects are returned\n\
-The page index starts at 0 and goes to the total number of pages - 1.\n\
+QT_TR_NOOP("getAllObjects([type, page, \"layer\"]) -> list\n\
+\n\
+Returns a list containing the names of all objects of specified type and located\n\
+on specified page and/or layer.\n\
+This function accepts several optional keyword arguments:\n\
+- type (optional): integer corresponding to item type, by default all items will be returned.\n\
+- page (optional): index of page on which returned objects are located, by default the current page.\n\
+         The page index starts at 0 and goes to the total number of pages - 1.\n\
+- layer (optional): name of layer on which returned objects are located, by default\n\
+         the function returns items located on all layers.\n\
+May throw ValueError if page index or layer name is invalid.\n\
 "));
 /*! Returns a list with all objects in page */
 PyObject *scribus_getallobjects(PyObject * /*self*/, PyObject* args, PyObject *keywds);

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	Tue Nov  3 10:15:36 2020
@@ -96,7 +96,7 @@
 
 	buildScribusScriptsMenu();
 
-	m_menuMgr->addMenuStringToMenuBarBefore("Scripter","Windows");
+	m_menuMgr->addMenuStringToMenuBarBefore("Scripter", "Windows");
 	m_menuMgr->addMenuItemStringsToMenuBar("Scripter", m_scripterActions);
 	m_recentScripts = m_savedRecentScripts;
 	rebuildRecentScriptsMenu();

Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.cpp	Tue Nov  3 10:15:36 2020
@@ -310,66 +310,67 @@
 
 PyObject *scribus_getallobjects(PyObject* /* self */, PyObject* args, PyObject *keywds)
 {
-	PyObject *l;
-	int typ = -1;
+	int type = -1;
 	uint counter = 0;
 	uint counter2 = 0;
 
 	ScribusDoc* currentDoc = ScCore->primaryMainWindow()->doc;
 	int pageNr = currentDoc->currentPageNumber();
-	char *kwlist[] = {const_cast<char*>(""), const_cast<char*>("page"), nullptr};
-
-	if (!PyArg_ParseTupleAndKeywords(args, keywds, "|ii", kwlist, &typ, &pageNr))
+	char *kwlist[] = { const_cast<char*>("type"), const_cast<char*>("page"), const_cast<char*>("layer"), nullptr};
+	char* szLayerName = const_cast<char*>("");
+
+	if (!PyArg_ParseTupleAndKeywords(args, keywds, "|ii", kwlist, &type, &pageNr))
+		return nullptr;
+
+	if (!checkHaveDocument())
 		return nullptr;
 
 	int numPages = currentDoc->Pages->count();
-	if (pageNr < 0 || pageNr >= numPages) {
-		PyErr_SetString(PyExc_RuntimeError, QObject::tr("page number is invalid.","python error").toLocal8Bit().constData());
-		return nullptr;
-	}
-	//if (!PyArg_ParseTuple(args, "|i", &typ))
-	//	return nullptr;
-	if (!checkHaveDocument())
-		return nullptr;
+	if (pageNr < 0 || pageNr >= numPages)
+	{
+		PyErr_SetString(PyExc_ValueError, QObject::tr("page number is invalid.","python error").toLocal8Bit().constData());
+		return nullptr;
+	}
+
+	const ScLayer *layer = nullptr;
+	QString layerName = QString::fromUtf8(szLayerName);
+	if (!layerName.isEmpty())
+	{
+		layer = currentDoc->Layers.layerByName(layerName);
+		if (!layer)
+		{
+			PyErr_SetString(PyExc_ValueError, QObject::tr("layer name is invalid.", "python error").toLocal8Bit().constData());
+			return nullptr;
+		}
+	}
+
 	// have doc already
-	if (typ != -1)
-	{
-		for (int lam2 = 0; lam2 < currentDoc->Items->count(); ++lam2)
-		{
-			if ((currentDoc->Items->at(lam2)->itemType() == typ) && (pageNr == currentDoc->Items->at(lam2)->OwnPage))
-				counter++;
-		}
-	}
-	else
-	{
-		for (int lam2 = 0; lam2 < currentDoc->Items->count(); ++lam2)
-		{
-			if (pageNr == currentDoc->Items->at(lam2)->OwnPage)
-				counter++;
-		}
-	}
-
-	l = PyList_New(counter);
-	for (int lam=0; lam < currentDoc->Items->count(); ++lam)
-	{
-		if  (pageNr == currentDoc->Items->at(lam)->OwnPage)
-		{
-			if (typ != -1)
-			{
-				if (currentDoc->Items->at(lam)->itemType() == typ)
-				{
-					PyList_SetItem(l, counter2, PyString_FromString(currentDoc->Items->at(lam)->itemName().toUtf8()));
-					counter2++;
-				}
-			}
-			else
-			{
-				PyList_SetItem(l, counter2, PyString_FromString(currentDoc->Items->at(lam)->itemName().toUtf8()));
-				counter2++;
-			}
-		}
-	}
-	return l;
+	for (int i = 0; i < currentDoc->Items->count(); ++i)
+	{
+		PageItem* item = currentDoc->Items->at(i);
+		if  (pageNr != item->OwnPage)
+			continue;
+		if ((type != -1) && (item->itemType() != type))
+			continue;
+		if (layer && (layer->ID != item->m_layerID))
+			continue;
+		counter++;
+	}
+
+	PyObject* pyList = PyList_New(counter);
+	for (int i = 0; i < currentDoc->Items->count(); ++i)
+	{
+		PageItem* item = currentDoc->Items->at(i);
+		if  (pageNr != item->OwnPage)
+			continue;
+		if ((type != -1) && (item->itemType() == type))
+			continue;
+		if (layer && (layer->ID != item->m_layerID))
+			continue;
+		PyList_SetItem(pyList, counter2, PyString_FromString(item->itemName().toUtf8()));
+		counter2++;
+	}
+	return pyList;
 }
 
 PyObject *scribus_getobjectattributes(PyObject* /* self */, PyObject* args)

Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.h	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdgetprop.h	Tue Nov  3 10:15:36 2020
@@ -243,11 +243,17 @@
 
 /*! docstring */
 PyDoc_STRVAR(scribus_getallobjects__doc__,
-QT_TR_NOOP("getAllObjects([\"page\"]) -> list\n\
-\n\
-Returns a list containing the names of all objects on the current page.\n\
-Takes an optional keyword argument that changes the page from which the objects are returned\n\
-The page index starts at 0 and goes to the total number of pages - 1.\n\
+QT_TR_NOOP("getAllObjects([type, page, \"layer\"]) -> list\n\
+\n\
+Returns a list containing the names of all objects of specified type and located\n\
+on specified page and/or layer.\n\
+This function accepts several optional keyword arguments:\n\
+- type (optional): integer corresponding to item type, by default all items will be returned.\n\
+- page (optional): index of page on which returned objects are located, by default the current page.\n\
+         The page index starts at 0 and goes to the total number of pages - 1.\n\
+- layer (optional): name of layer on which returned objects are located, by default\n\
+         the function returns items located on all layers.\n\
+May throw ValueError if page index or layer name is invalid.\n\
 "));
 /*! Returns a list with all objects in page */
 PyObject *scribus_getallobjects(PyObject * /*self*/, PyObject* args, PyObject *keywds);

Modified: trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24159&path=/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptercore.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptercore.cpp	Tue Nov  3 10:15:36 2020
@@ -96,7 +96,7 @@
 
 	buildScribusScriptsMenu();
 
-	m_menuMgr->addMenuStringToMenuBarBefore("Scripter","Windows");
+	m_menuMgr->addMenuStringToMenuBarBefore("Scripter", "Windows");
 	m_menuMgr->addMenuItemStringsToMenuBar("Scripter", m_scripterActions);
 	m_recentScripts = m_savedRecentScripts;
 	rebuildRecentScriptsMenu();




More information about the scribus-commit mailing list