guidesLock

Previous topic - Next topic

Darkoni

I needed a script function that locks document guides.

In my Python script, I called it:

scribus.guidesLock()

To make it work, I changed three files in Scribus 1.7.0.svn trunk:

scriptplugin.cpp
cmdtext.h
cmdtext.cpp

Here is addition for cmdtext.cpp

PyObject *scribus_guidesLock(PyObject* /* self */, PyObject* args)
{
ScribusDoc* doc = ScCore->primaryMainWindow()->doc;
doc->lockGuides(true);
Py_RETURN_NONE;
}

It needs some status checking, but for now it fits my needs :-)

My question is: How and where to submit code changes?

Best regards,

Darkoni

a.l.e

yep, those might be the files you need to change.

for reference, here is a recent example, of a new command added to the scripter:

https://bugs.scribus.net/view.php?id=16294

and, yes, you need to upload the diff file to the bug tracker.

concerning this specific patch, i think you will need to add an optional parameter to the command.

something like:

guidesLock(lock = True)

and also allow to disable the lock from the scripter.

and probably also

areGuidesLocked() or guidesLocked()

to check the current state.