Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 24769 → Rev 24770

/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.cpp
270,6 → 270,22
Py_RETURN_NONE;
}
 
PyObject *scribus_getinfo(PyObject* /* self */)
{
if (!checkHaveDocument())
return nullptr;
if (! ScCore->primaryMainWindow()->doc->hasName)
{
return PyUnicode_FromString("");
}
 
DocumentInformation& docInfo = ScCore->primaryMainWindow()->doc->documentInfo();
return Py_BuildValue("(sss)",
docInfo.author().toUtf8().data(),
docInfo.title().toUtf8().data(),
docInfo.comments().toUtf8().data());
}
 
PyObject *scribus_setunit(PyObject* /* self */, PyObject* args)
{
int e;
483,6 → 499,7
<< scribus_deletemasterpage__doc__
<< scribus_editmasterpage__doc__
<< scribus_getdocname__doc__
<< scribus_getinfo__doc__
<< scribus_getmasterpage__doc__
<< scribus_getunit__doc__
<< scribus_havedoc__doc__
/trunk/Scribus/scribus/plugins/scriptplugin/cmddoc.h
182,6 → 182,16
PyObject *scribus_setinfo(PyObject * /*self*/, PyObject* args);
 
/*! docstring */
PyDoc_STRVAR(scribus_getinfo__doc__,
QT_TR_NOOP("getInfo() -> \"author\", \"info\", \"description\"\n\
\n\
Gets the document information. \"Author\", \"Info\", \"Description\" are\n\
strings.\n\
"));
/** Gets document infos - author, title and description */
PyObject *scribus_getinfo(PyObject * /*self*/);
 
/*! docstring */
PyDoc_STRVAR(scribus_setbleeds__doc__,
QT_TR_NOOP("setBleeds(lr, rr, tr, br)\n\
\n\
/trunk/Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
369,6 → 369,7
{const_cast<char*>("getImageFile"), scribus_getimagefile, METH_VARARGS, tr(scribus_getimagefile__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*>("getInfo"), (PyCFunction)scribus_getinfo, METH_VARARGS, tr(scribus_getinfo__doc__)},
{const_cast<char*>("getLastLinkedFrame"), scribus_getlastlinkedframe, METH_VARARGS, tr(scribus_getlastlinkedframe__doc__)},
{const_cast<char*>("getLayerBlendmode"), scribus_getlayerblendmode, METH_VARARGS, tr(scribus_getlayerblendmode__doc__)},
{const_cast<char*>("getLayerTransparency"), scribus_getlayertransparency, METH_VARARGS, tr(scribus_getlayertransparency__doc__)},
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmddoc.cpp
270,6 → 270,22
Py_RETURN_NONE;
}
 
PyObject *scribus_getinfo(PyObject* /* self */)
{
if (!checkHaveDocument())
return nullptr;
if (! ScCore->primaryMainWindow()->doc->hasName)
{
return PyUnicode_FromString("");
}
 
DocumentInformation& docInfo = ScCore->primaryMainWindow()->doc->documentInfo();
return Py_BuildValue("(sss)",
docInfo.author().toUtf8().data(),
docInfo.title().toUtf8().data(),
docInfo.comments().toUtf8().data());
}
 
PyObject *scribus_setunit(PyObject* /* self */, PyObject* args)
{
int e;
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmddoc.h
182,6 → 182,16
PyObject *scribus_setinfo(PyObject * /*self*/, PyObject* args);
 
/*! docstring */
PyDoc_STRVAR(scribus_getinfo__doc__,
QT_TR_NOOP("getInfo() -> \"author\", \"info\", \"description\"\n\
\n\
Gets the document information. \"Author\", \"Info\", \"Description\" are\n\
strings.\n\
"));
/** Gets document infos - author, title and description */
PyObject *scribus_getinfo(PyObject * /*self*/);
 
/*! docstring */
PyDoc_STRVAR(scribus_setbleeds__doc__,
QT_TR_NOOP("setBleeds(lr, rr, tr, br)\n\
\n\
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/cmdtext.h
198,6 → 198,15
PyObject *scribus_getlinespacing(PyObject * /*self*/, PyObject* args);
 
/*! docstring */
PyDoc_STRVAR(scribus_getlinespacingmode__doc__,
QT_TR_NOOP("getLineSpacingMode([\"name\"]) -> float\n\
\n\
Returns the line spacing mode of the text frame \"name\". If \"name\" is not given the currently selected item is used.\n\
"));
/*! Get line spacing mode*/
PyObject *scribus_getlinespacingmode(PyObject * /*self*/, PyObject* args);
 
/*! docstring */
PyDoc_STRVAR(scribus_gettextdistances__doc__,
QT_TR_NOOP("getTextDistances([\"name\"]) -> tuple\n\
\n\
390,6 → 399,7
\n\
May throw ValueError if any of the distances are out of bounds (must be positive).\n\
"));
 
/*! Set text distances */
PyObject *scribus_settextdistances(PyObject */*self*/, PyObject* args);
 
/trunk/Scribus/scribus/plugins/scriptplugin_py2x/scriptplugin.cpp
369,6 → 369,7
{const_cast<char*>("getImageFile"), scribus_getimagefile, METH_VARARGS, tr(scribus_getimagefile__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*>("getInfo"), (PyCFunction)scribus_getinfo, METH_VARARGS, tr(scribus_getinfo__doc__)},
{const_cast<char*>("getLastLinkedFrame"), scribus_getlastlinkedframe, METH_VARARGS, tr(scribus_getlastlinkedframe__doc__)},
{const_cast<char*>("getLayerBlendmode"), scribus_getlayerblendmode, METH_VARARGS, tr(scribus_getlayerblendmode__doc__)},
{const_cast<char*>("getLayerTransparency"), scribus_getlayertransparency, METH_VARARGS, tr(scribus_getlayertransparency__doc__)},