r23385 by jghali - Rename a few scripter functions according to their user visible names
scribus-commit
scribus-commit at lists.scribus.net
Wed Nov 27 01:09:56 UTC 2019
Author: jghali
Date: Wed Nov 27 01:09:56 2019
New Revision: 23385
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23385
Log:
Rename a few scripter functions according to their user visible names
Modified:
trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h
trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.h
trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23385&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp Wed Nov 27 01:09:56 2019
@@ -229,7 +229,7 @@
return PyLong_FromLong(static_cast<long>(item->cornerRadius()));
}
-PyObject *scribus_getimgoffset(PyObject* /* self */, PyObject* args)
+PyObject *scribus_getimageoffset(PyObject* /* self */, PyObject* args)
{
char *Name = const_cast<char*>("");
if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
@@ -242,7 +242,7 @@
return Py_BuildValue("(ff)", item->imageXOffset() * item->imageXScale(), item->imageYOffset() * item->imageYScale());
}
-PyObject *scribus_getimgscale(PyObject* /* self */, PyObject* args)
+PyObject *scribus_getimagescale(PyObject* /* self */, PyObject* args)
{
char *Name = const_cast<char*>("");
if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
@@ -290,7 +290,7 @@
return PyUnicode_FromString(item->Pfile.toUtf8());
}
-PyObject *scribus_getposi(PyObject* /* self */, PyObject* args)
+PyObject *scribus_getposition(PyObject* /* self */, PyObject* args)
{
char *Name = const_cast<char*>("");
if (!PyArg_ParseTuple(args, "|es", "utf-8", &Name))
@@ -474,17 +474,29 @@
void cmdgetpropdocwarnings()
{
QStringList s;
- s << scribus_getobjecttype__doc__ << scribus_getfillcolor__doc__
+ s << scribus_getallobj__doc__
+ << scribus_getcornerrad__doc__
<< scribus_getcustomlinestyle__doc__
- << scribus_getfilltrans__doc__ << scribus_getfillblend__doc__
- << scribus_getlinecolor__doc__ << scribus_getlinetrans__doc__
- << scribus_getlineblend__doc__ << scribus_getlinewidth__doc__
- << scribus_getlineshade__doc__ << scribus_getlinejoin__doc__
- << scribus_getlinecap__doc__ << scribus_getlinestyle__doc__
- << scribus_getfillshade__doc__ << scribus_getcornerrad__doc__
- << scribus_getimageexiffield__doc__
- << scribus_getimgscale__doc__ << scribus_getimagefile__doc__
- << scribus_getposi__doc__ << scribus_getsize__doc__
- << scribus_getrotation__doc__ << scribus_getallobj__doc__
- << scribus_getobjectattributes__doc__ << scribus_getimagecolorspace__doc__;
-}
+ << scribus_getfillcolor__doc__
+ << scribus_getfillblend__doc__
+ << scribus_getfillshade__doc__
+ << scribus_getfilltrans__doc__
+ << scribus_getimagecolorspace__doc__
+ << scribus_getimageexiffield__doc__
+ << scribus_getimagefile__doc__
+ << scribus_getimageoffset__doc__
+ << scribus_getimagescale__doc__
+ << scribus_getlinecolor__doc__
+ << scribus_getlineblend__doc__
+ << scribus_getlinecap__doc__
+ << scribus_getlinejoin__doc__
+ << scribus_getlineshade__doc__
+ << scribus_getlinetrans__doc__
+ << scribus_getlinewidth__doc__
+ << scribus_getlinestyle__doc__
+ << scribus_getobjectattributes__doc__
+ << scribus_getobjecttype__doc__
+ << scribus_getposition__doc__
+ << scribus_getrotation__doc__
+ << scribus_getsize__doc__;
+}
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23385&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdgetprop.h Wed Nov 27 01:09:56 2019
@@ -197,27 +197,27 @@
PyObject *scribus_getimagefile(PyObject * /*self*/, PyObject* args);
/*! docstring */
-PyDoc_STRVAR(scribus_getimgoffset__doc__,
+PyDoc_STRVAR(scribus_getimageoffset__doc__,
QT_TR_NOOP("getImageOffset([\"name\"]) -> (x,y)\n\
\n\
Returns a (x, y) tuple containing the offset values in point unit of the image\n\
frame \"name\". If \"name\" is not given the currently selected item is used.\n\
"));
/*! Returns image scale of the object */
-PyObject *scribus_getimgoffset(PyObject * /*self*/, PyObject* args);
-
-/*! docstring */
-PyDoc_STRVAR(scribus_getimgscale__doc__,
+PyObject *scribus_getimageoffset(PyObject * /*self*/, PyObject* args);
+
+/*! docstring */
+PyDoc_STRVAR(scribus_getimagescale__doc__,
QT_TR_NOOP("getImageScale([\"name\"]) -> (x,y)\n\
\n\
Returns a (x, y) tuple containing the scaling values of the image frame\n\
\"name\". If \"name\" is not given the currently selected item is used.\n\
"));
/*! Returns image scale of the object */
-PyObject *scribus_getimgscale(PyObject * /*self*/, PyObject* args);
-
-/*! docstring */
-PyDoc_STRVAR(scribus_getposi__doc__,
+PyObject *scribus_getimagescale(PyObject * /*self*/, PyObject* args);
+
+/*! docstring */
+PyDoc_STRVAR(scribus_getposition__doc__,
QT_TR_NOOP("getPosition([\"name\"]) -> (x,y)\n\
\n\
Returns a (x, y) tuple with the position of the object \"name\".\n\
@@ -226,7 +226,7 @@
- see UNIT_<type> for reference.\n\
"));
/*! Returns position of the object */
-PyObject *scribus_getposi(PyObject * /*self*/, PyObject* args);
+PyObject *scribus_getposition(PyObject * /*self*/, PyObject* args);
/*! docstring */
PyDoc_STRVAR(scribus_getsize__doc__,
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23385&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp Wed Nov 27 01:09:56 2019
@@ -14,7 +14,7 @@
#include <QApplication>
-PyObject *scribus_actualpage(PyObject* /* self */)
+PyObject *scribus_currentpage(PyObject* /* self */)
{
if (!checkHaveDocument())
return nullptr;
@@ -32,7 +32,7 @@
Py_RETURN_NONE;
}
-PyObject *scribus_pageposition(PyObject* /* self */, PyObject* args)
+PyObject *scribus_getpagetype(PyObject* /* self */, PyObject* args)
{
int e;
if (!PyArg_ParseTuple(args, "i", &e))
@@ -185,7 +185,7 @@
return t;
}
-PyObject *scribus_pagensize(PyObject* /* self */, PyObject* args)
+PyObject *scribus_getpagensize(PyObject* /* self */, PyObject* args)
{
int e;
if (!PyArg_ParseTuple(args, "i", &e))
@@ -209,7 +209,7 @@
return t;
}
-PyObject *scribus_pagenmargins(PyObject* /* self */, PyObject* args)
+PyObject *scribus_getpagenmargins(PyObject* /* self */, PyObject* args)
{
int e;
if (!PyArg_ParseTuple(args, "i", &e))
@@ -529,13 +529,22 @@
void cmdpagedocwarnings()
{
QStringList s;
- s << scribus_newpage__doc__ << scribus_pageposition__doc__
- << scribus_actualpage__doc__ << scribus_redraw__doc__
- << scribus_savepageeps__doc__ << scribus_deletepage__doc__
- << scribus_gotopage__doc__ << scribus_pagecount__doc__
- << scribus_getHguides__doc__ << scribus_setHguides__doc__
- << scribus_getVguides__doc__ << scribus_setVguides__doc__
- << scribus_pagedimension__doc__ << scribus_getpageitems__doc__
- << scribus_getpagemargins__doc__ << scribus_importpage__doc__
- << scribus_pagensize__doc__ << scribus_pagenmargins__doc__;
-}
+ s << scribus_currentpage__doc__
+ << scribus_deletepage__doc__
+ << scribus_getHguides__doc__
+ << scribus_getVguides__doc__
+ << scribus_getpageitems__doc__
+ << scribus_getpagemargins__doc__
+ << scribus_getpagensize__doc__
+ << scribus_getpagetype__doc__
+ << scribus_gotopage__doc__
+ << scribus_importpage__doc__
+ << scribus_newpage__doc__
+ << scribus_pagecount__doc__
+ << scribus_pagedimension__doc__
+ << scribus_getpagenmargins__doc__
+ << scribus_redraw__doc__
+ << scribus_savepageeps__doc__
+ << scribus_setHguides__doc__
+ << scribus_setVguides__doc__;
+}
Modified: trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23385&path=/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.h
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.h (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.h Wed Nov 27 01:09:56 2019
@@ -28,14 +28,14 @@
PyObject *scribus_newpage(PyObject * /*self*/, PyObject* args);
/*! docstring */
-PyDoc_STRVAR(scribus_actualpage__doc__,
+PyDoc_STRVAR(scribus_currentpage__doc__,
QT_TR_NOOP("currentPage() -> integer\n\
\n\
Returns the number of the current working page. Page numbers are counted from 1\n\
upwards, no matter what the displayed first page number of your document is.\n\
"));
/*! get actual page */
-PyObject *scribus_actualpage(PyObject * /*self*/);
+PyObject *scribus_currentpage(PyObject * /*self*/);
/*! docstring */
PyDoc_STRVAR(scribus_redraw__doc__,
@@ -47,13 +47,13 @@
PyObject *scribus_redraw(PyObject * /*self*/);
/*! docstring */
-PyDoc_STRVAR(scribus_pageposition__doc__,
+PyDoc_STRVAR(scribus_getpagetype__doc__,
QT_TR_NOOP("getPageType() -> integer\n\
\n\
Returns the type of the Page, 0 means left Page, 1 is a middle Page and 2 is a right Page\n\
"));
/*! Go to page */
-PyObject *scribus_pageposition(PyObject * /*self*/, PyObject* args);
+PyObject *scribus_getpagetype(PyObject * /*self*/, PyObject* args);
/*! docstring */
PyDoc_STRVAR(scribus_savepageeps__doc__,
@@ -157,7 +157,7 @@
PyObject *scribus_pagedimension(PyObject * /*self*/);
/*! docstring */
-PyDoc_STRVAR(scribus_pagensize__doc__,
+PyDoc_STRVAR(scribus_getpagensize__doc__,
QT_TR_NOOP("getPageNSize(nr) -> tuple\n\
\n\
Returns a tuple with a particular page's size measured in the document's current units.\n\
@@ -167,7 +167,7 @@
returns a tuple with a particular page's size in used system
e.g. when is the doc in picas returns picas ;)
*/
-PyObject *scribus_pagensize(PyObject * /*self*/, PyObject* args);
+PyObject *scribus_getpagensize(PyObject * /*self*/, PyObject* args);
/*! docstring */
PyDoc_STRVAR(scribus_getpagemargins__doc__,
@@ -183,7 +183,7 @@
PyObject *scribus_getpagemargins(PyObject * /*self*/);
/*! docstring */
-PyDoc_STRVAR(scribus_pagenmargins__doc__,
+PyDoc_STRVAR(scribus_getpagenmargins__doc__,
QT_TR_NOOP("getPageNMargins(nr) -> tuple\n\
\n\
Returns a tuple with a particular page's margins measured in the document's current units.\n\
@@ -193,7 +193,7 @@
returns a tuple with a particular page's size in used system
e.g. when is the doc in picas returns picas ;)
*/
-PyObject *scribus_pagenmargins(PyObject * /*self*/, PyObject* args);
+PyObject *scribus_getpagenmargins(PyObject * /*self*/, PyObject* args);
/*! docstring */
PyDoc_STRVAR(scribus_getpageitems__doc__,
Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23385&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp (original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp Wed Nov 27 01:09:56 2019
@@ -310,7 +310,7 @@
{const_cast<char*>("createParagraphStyle"), (PyCFunction)scribus_createparagraphstyle, METH_VARARGS|METH_KEYWORDS, tr(scribus_createparagraphstyle__doc__)},
{const_cast<char*>("createCharStyle"), (PyCFunction)scribus_createcharstyle, METH_VARARGS|METH_KEYWORDS, tr(scribus_createcharstyle__doc__)},
{const_cast<char*>("createCustomLineStyle"), scribus_createcustomlinestyle, METH_VARARGS, tr(scribus_createcustomlinestyle__doc__)},
- {const_cast<char*>("currentPage"), (PyCFunction)scribus_actualpage, METH_NOARGS, tr(scribus_actualpage__doc__)},
+ {const_cast<char*>("currentPage"), (PyCFunction)scribus_currentpage, METH_NOARGS, tr(scribus_currentpage__doc__)},
{const_cast<char*>("defineColor"), scribus_newcolor, METH_VARARGS, tr(scribus_newcolor__doc__)},
{const_cast<char*>("defineColorLab"), scribus_newcolorlab, METH_VARARGS, tr(scribus_newcolorlab__doc__) },
{const_cast<char*>("defineColorRGB"), scribus_newcolorrgb, METH_VARARGS, tr(scribus_newcolorrgb__doc__)},
@@ -364,8 +364,8 @@
{const_cast<char*>("getImageColorSpace"), scribus_getimagecolorspace, METH_VARARGS, tr(scribus_getimagecolorspace__doc__) },
{const_cast<char*>("getImageFile"), scribus_getimagefile, METH_VARARGS, tr(scribus_getimagefile__doc__)},
{const_cast<char*>("getImageExifField"), scribus_getimageexiffield, METH_VARARGS, tr(scribus_getimageexiffield__doc__)},
- {const_cast<char*>("getImageOffset"), scribus_getimgoffset, METH_VARARGS, tr(scribus_getimgoffset__doc__)},
- {const_cast<char*>("getImageScale"), scribus_getimgscale, METH_VARARGS, tr(scribus_getimgscale__doc__)},
+ {const_cast<char*>("getImageOffset"), scribus_getimageoffset, METH_VARARGS, tr(scribus_getimageoffset__doc__)},
+ {const_cast<char*>("getImageScale"), scribus_getimagescale, METH_VARARGS, tr(scribus_getimagescale__doc__)},
{const_cast<char*>("getLayers"), (PyCFunction)scribus_getlayers, METH_NOARGS, tr(scribus_getlayers__doc__)},
{const_cast<char*>("getLayerBlendmode"), scribus_glayerblend, METH_VARARGS, tr(scribus_glayerblend__doc__)},
{const_cast<char*>("getLayerTransparency"), scribus_glayertrans, METH_VARARGS, tr(scribus_glayertrans__doc__)},
@@ -381,11 +381,11 @@
{const_cast<char*>("getMasterPage"), scribus_getmasterpage, METH_VARARGS, tr(scribus_getmasterpage__doc__)},
{const_cast<char*>("getPageItems"), (PyCFunction)scribus_getpageitems, METH_NOARGS, tr(scribus_getpageitems__doc__)},
{const_cast<char*>("getPageMargins"), (PyCFunction)scribus_getpagemargins, METH_NOARGS, tr(scribus_getpagemargins__doc__)},
- {const_cast<char*>("getPageType"), (PyCFunction)scribus_pageposition, METH_VARARGS, tr(scribus_pageposition__doc__)},
+ {const_cast<char*>("getPageType"), (PyCFunction)scribus_getpagetype, METH_VARARGS, tr(scribus_getpagetype__doc__)},
{const_cast<char*>("getPageSize"), (PyCFunction)scribus_pagedimension, METH_NOARGS, tr(scribus_pagedimension__doc__)},
- {const_cast<char*>("getPageNSize"), scribus_pagensize, METH_VARARGS, tr(scribus_pagensize__doc__)},
- {const_cast<char*>("getPageNMargins"), scribus_pagenmargins, METH_VARARGS, tr(scribus_pagenmargins__doc__)},
- {const_cast<char*>("getPosition"), scribus_getposi, METH_VARARGS, tr(scribus_getposi__doc__)},
+ {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*>("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__)},
{const_cast<char*>("getObjectAttributes"), scribus_getobjectattributes, METH_VARARGS, tr(scribus_getobjectattributes__doc__)},
More information about the scribus-commit
mailing list