/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.cpp |
---|
21,6 → 21,14 |
return PyLong_FromLong(static_cast<long>(ScCore->primaryMainWindow()->doc->currentPageNumber() + 1)); |
} |
PyObject *scribus_currentpagenumberforsection(PyObject* /* self */) |
{ |
if (!checkHaveDocument()) |
return nullptr; |
int i = ScCore->primaryMainWindow()->doc->currentPageNumber(); |
return PyUnicode_FromString(ScCore->primaryMainWindow()->doc->getSectionPageNumberForPageIndex(i).toUtf8()); |
} |
PyObject *scribus_redraw(PyObject* /* self */) |
{ |
if (!checkHaveDocument()) |
519,7 → 527,6 |
Py_RETURN_NONE; |
} |
/*! HACK: this removes "warning: 'blah' defined but not used" compiler warnings |
with header files structure untouched (docstrings are kept near declarations) |
PV */ |
/trunk/Scribus/scribus/plugins/scriptplugin/cmdpage.h |
---|
37,6 → 37,17 |
/*! get actual page */ |
PyObject *scribus_currentpage(PyObject * /*self*/); |
/*! docstring */ |
PyDoc_STRVAR(scribus_currentpagenumberforsection__doc__, |
QT_TR_NOOP("currentPage() -> integer\n\ |
\n\ |
Returns the number of the current working page based on the section of the document.\n\ |
\n\ |
")); |
/*! get actual page */ |
PyObject *scribus_currentpagenumberforsection(PyObject * /*self*/); |
/*! docstring */ |
PyDoc_STRVAR(scribus_redraw__doc__, |
QT_TR_NOOP("redrawAll()\n\ |
224,5 → 235,6 |
")); |
PyObject *scribus_importpage(PyObject */*self*/, PyObject* args); |
#endif |
/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp |
---|
310,6 → 310,8 |
{const_cast<char*>("createTable"), scribus_createtable, METH_VARARGS, tr(scribus_createtable__doc__)}, |
{const_cast<char*>("createText"), scribus_createtext, METH_VARARGS, tr(scribus_createtext__doc__)}, |
{const_cast<char*>("currentPage"), (PyCFunction)scribus_currentpage, METH_NOARGS, tr(scribus_currentpage__doc__)}, |
{const_cast<char*>("currentPageNumber"), (PyCFunction)scribus_currentpage, METH_NOARGS, tr(scribus_currentpage__doc__)}, |
{const_cast<char*>("currentPageNumberForSection"), (PyCFunction)scribus_currentpagenumberforsection, METH_NOARGS, tr(scribus_currentpage__doc__)}, |
{const_cast<char*>("defineColor"), scribus_newcolor, METH_VARARGS, tr(scribus_newcolor__doc__)}, |
{const_cast<char*>("defineColorCMYK"), scribus_newcolorcmyk, METH_VARARGS, tr(scribus_newcolorcmyk__doc__)}, |
{const_cast<char*>("defineColorCMYKFloat"), scribus_newcolorcmykfloat, METH_VARARGS, tr(scribus_newcolorcmykfloat__doc__)}, |