View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0016090 | Scribus | Scripter | public | 2020-04-19 22:47 | 2020-08-11 20:56 |
Reporter | quazgar | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 1.5.6.svn | ||||
Fixed in Version | 1.5.6.svn | ||||
Summary | 0016090: Python documentation for getText() and insertText() could be improved. | ||||
Description | - getText() currently says it returns all the text although it's just the visible text. - getAllText() should advertise that it returns all the text. - insertText() should mention that it makes sense to call layoutText() before retrieving text for the next time. See attached patch. | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
0001_python_doc.patch (1,926 bytes)
Index: cmdtext.h =================================================================== --- cmdtext.h (revision 23621) +++ cmdtext.h (working copy) @@ -96,10 +96,12 @@ PyDoc_STRVAR(scribus_getframetext__doc__, QT_TR_NOOP("getText([\"name\"]) -> string\n\ \n\ -Returns the text of the text frame \"name\". If this text frame has some text\n\ -selected, the selected text is returned. All text in the frame, not just\n\ -currently visible text, is returned. If \"name\" is not given the currently\n\ -selected item is used.\n\ +Returns the visible text of the text frame \"name\". If this text frame has\n\ +some text selected, the selected text is returned.\n\ +\n\ +If \"name\" is not given the currently selected item is used.\n\ +\n\ +If you need all the text, not just the visible part, try getAllText() instead.\n\ ")); /*! Get frame text */ PyObject *scribus_getframetext(PyObject * /*self*/, PyObject* args); @@ -109,9 +111,11 @@ QT_TR_NOOP("getAllText([\"name\"]) -> string\n\ \n\ Returns the text of the text frame \"name\" and of all text frames which are\n\ -linked with this frame. If this textframe has some text selected, the selected\n\ -text is returned. If \"name\" is not given the currently selected item is\n\ -used.\n\ +linked with this frame. All text in the frame, not just currently visible text,\n\ +is returned. If this textframe has some text selected, the selected text is\n\ +returned.\n\ +\n\ +If \"name\" is not given the currently selected item is used.\n\ ")); /*! Get all text */ PyObject *scribus_gettext(PyObject * /*self*/, PyObject* args); @@ -189,6 +193,9 @@ not given the currently selected Item is used.\n\ \n\ May throw IndexError for an insertion out of bounds.\n\ +\n\ +After invoking this function, calling layoutText() may be necessary before\n\ +further calls to getText(). ")); /*! Insert text */ PyObject *scribus_inserttext(PyObject * /*self*/, PyObject* args); |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-04-19 22:47 | quazgar | New Issue | |
2020-04-19 22:47 | quazgar | File Added: 0001_python_doc.patch | |
2020-04-19 23:33 | jghali | Assigned To | => jghali |
2020-04-19 23:33 | jghali | Status | new => resolved |
2020-04-19 23:33 | jghali | Resolution | open => fixed |
2020-04-19 23:33 | jghali | Fixed in Version | => 1.5.6.svn |
2020-08-11 20:56 | cbradney | Status | resolved => closed |