r23694 by jghali - Adjust scripter's scribus_getstylenames() function name according to non deprecated Python function name

scribus-commit scribus-commit at lists.scribus.net
Tue May 5 16:38:30 UTC 2020


Author: jghali
Date: Tue May  5 16:38:30 2020
New Revision: 23694

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23694
Log:
Adjust scripter's scribus_getstylenames() function name according to non deprecated Python function name

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.h
    trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23694&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.cpp	Tue May  5 16:38:30 2020
@@ -400,7 +400,7 @@
  * Craig Ringer, 2004-09-09
  * Enumerate all known paragraph styles
  */
-PyObject *scribus_getstylenames(PyObject* /* self */)
+PyObject *scribus_getparagraphstyles(PyObject* /* self */)
 {
 	PyObject *styleList;
 	if (!checkHaveDocument())
@@ -447,6 +447,7 @@
 	s  << scribus_createcharstyle__doc__
 	   << scribus_createcustomlinestyle__doc__
 	   << scribus_createparagraphstyle__doc__
+	   << scribus_getallstyles__doc__
 	   << scribus_getcharstylenames__doc__
-	   << scribus_getstylenames__doc__;
-}
+	   << scribus_getparagraphstyles__doc__;
+}

Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23694&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.h	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdstyle.h	Tue May  5 16:38:30 2020
@@ -108,16 +108,22 @@
 PyObject *scribus_createcustomlinestyle(PyObject * /* self */, PyObject* args);
 
 /*! docstring */
-PyDoc_STRVAR(scribus_getstylenames__doc__,
+PyDoc_STRVAR(scribus_getparagraphstyles__doc__,
+QT_TR_NOOP("getParagraphStyles() -> list\n\
+\n\
+Return a list of the names of all paragraph styles in the current document.\n\
+"));
+
+PyDoc_STRVAR(scribus_getallstyles__doc__,
 QT_TR_NOOP("getAllStyles() -> list\n\
 \n\
-Return a list of the names of all paragraph styles in the current document.\n\
+Deprecated. Use getParagraphStyles() instead.\n\
 "));
 /**
  Craig Ringer, 2004-09-09
  Enumerate all known paragraph styles
 */
-PyObject *scribus_getstylenames(PyObject * /*self*/);
+PyObject *scribus_getparagraphstyles(PyObject * /*self*/);
 
 /*! docstring */
 PyDoc_STRVAR(scribus_getcharstylenames__doc__,

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23694&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp	Tue May  5 16:38:30 2020
@@ -332,7 +332,7 @@
 	{const_cast<char*>("flipObject"), scribus_flipobject, METH_VARARGS, tr(scribus_flipobject__doc__)},
 	{const_cast<char*>("getActiveLayer"), (PyCFunction)scribus_getactlayer, METH_NOARGS, tr(scribus_getactlayer__doc__)},
 	{const_cast<char*>("getAllObjects"), (PyCFunction)scribus_getallobj, METH_VARARGS|METH_KEYWORDS, tr(scribus_getallobj__doc__)},
-	{const_cast<char*>("getAllStyles"), (PyCFunction)scribus_getstylenames, METH_NOARGS, tr(scribus_getstylenames__doc__)}, //Deprecated
+	{const_cast<char*>("getAllStyles"), (PyCFunction)scribus_getparagraphstyles, METH_NOARGS, tr(scribus_getallstyles__doc__)}, //Deprecated
 	{const_cast<char*>("getAllText"), scribus_getalltext, METH_VARARGS, tr(scribus_getalltext__doc__)},
 	{const_cast<char*>("getCellStyle"), scribus_getcellstyle, METH_VARARGS, tr(scribus_getcellstyle__doc__)},
 	{const_cast<char*>("getCellColumnSpan"), scribus_getcellcolumnspan, METH_VARARGS, tr(scribus_getcellcolumnspan__doc__)},
@@ -386,7 +386,7 @@
 	{const_cast<char*>("getPageNSize"), scribus_getpagensize, METH_VARARGS, tr(scribus_getpagensize__doc__)},
 	{const_cast<char*>("getPageNMargins"), scribus_getpagenmargins, METH_VARARGS, tr(scribus_getpagenmargins__doc__)},
 	{const_cast<char*>("getParagraphStyle"), scribus_getparagraphstyle, METH_VARARGS, tr(scribus_getparagraphstyle__doc__) },
-	{const_cast<char*>("getParagraphStyles"), (PyCFunction)scribus_getstylenames, METH_NOARGS, tr(scribus_getstylenames__doc__)},
+	{const_cast<char*>("getParagraphStyles"), (PyCFunction)scribus_getparagraphstyles, METH_NOARGS, tr(scribus_getparagraphstyles__doc__)},
 	{const_cast<char*>("getPosition"), scribus_getposition, METH_VARARGS, tr(scribus_getposition__doc__)},
 	{const_cast<char*>("getRotation"), scribus_getrotation, METH_VARARGS, tr(scribus_getrotation__doc__)},
 	{const_cast<char*>("getObjectType"), scribus_getobjecttype, METH_VARARGS, tr(scribus_getobjecttype__doc__)},




More information about the scribus-commit mailing list