Index: Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp
===================================================================
--- Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp	(revision 15091)
+++ Scribus/scribus/plugins/scriptplugin/cmdgetprop.cpp	(working copy)
@@ -8,6 +8,7 @@
 #include "cmdutil.h"
 #include "scribuscore.h"
 #include "scribusdoc.h"
+#include "undomanager.h"
 
 /* getObjectType(name) */
 PyObject *scribus_getobjecttype(PyObject* /* self */, PyObject* args)
@@ -327,6 +328,13 @@
 	return l;
 }
 
+PyObject *scribus_getundoenabled(PyObject* /* self */, PyObject* args)
+{
+	if(!checkHaveDocument())
+		return NULL;
+	return PyBool_FromLong(UndoManager::undoEnabled() ? 1 : 0);
+}
+
 /*! HACK: this removes "warning: 'blah' defined but not used" compiler warnings
 with header files structure untouched (docstrings are kept near declarations)
 PV */
@@ -342,5 +350,6 @@
 	  << scribus_getfillshade__doc__ << scribus_getcornerrad__doc__ 
 	  << scribus_getimgscale__doc__ << scribus_getimgname__doc__ 
 	  << scribus_getposi__doc__ << scribus_getsize__doc__ 
-	  << scribus_getrotation__doc__ <<  scribus_getallobj__doc__;
+	  << scribus_getrotation__doc__ <<  scribus_getallobj__doc__
+	  << scribus_getundoenabled__doc__;
 }
Index: Scribus/scribus/plugins/scriptplugin/cmdgetprop.h
===================================================================
--- Scribus/scribus/plugins/scriptplugin/cmdgetprop.h	(revision 15091)
+++ Scribus/scribus/plugins/scriptplugin/cmdgetprop.h	(working copy)
@@ -219,5 +219,14 @@
 /*! Returns a list with all objects in page */
 PyObject *scribus_getallobj(PyObject * /*self*/, PyObject* args);
 
+/*! docstring */
+PyDoc_STRVAR(scribus_getundoenabled__doc__,
+QT_TR_NOOP("getUndoEnabled(bool)\n\
+\n\
+Get undo-manager status.\n\
+"));
+/*! Enable/disable the undo-manager. */
+PyObject *scribus_getundoenabled(PyObject * /*self*/, PyObject* args);
+
 #endif
 
Index: Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp
===================================================================
--- Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp	(revision 15091)
+++ Scribus/scribus/plugins/scriptplugin/cmdmisc.cpp	(working copy)
@@ -16,6 +16,7 @@
 #include "scribusdoc.h"
 #include "fonts/scfontmetrics.h"
 #include "prefsmanager.h"
+#include "undomanager.h"
 
 PyObject *scribus_setredraw(PyObject* /* self */, PyObject* args)
 {
@@ -771,6 +772,15 @@
 	Py_RETURN_NONE;
 }
 
+PyObject *scribus_setundoenabled(PyObject* /* self */, PyObject* args)
+{
+	int e;
+	if (!PyArg_ParseTuple(args, "i", &e))
+		return NULL;
+	UndoManager::instance()->setUndoEnabled(static_cast<bool>(e));
+	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 */
@@ -790,5 +800,6 @@
 	  << scribus_glayerblend__doc__ << scribus_glayertrans__doc__ 
 	  << scribus_removelayer__doc__ << scribus_createlayer__doc__ 
 	  << scribus_getlanguage__doc__ << scribus_moveselectiontofront__doc__
-	  << scribus_moveselectiontoback__doc__ << scribus_filequit__doc__;
+	  << scribus_moveselectiontoback__doc__ << scribus_filequit__doc__
+	  << scribus_setundoenabled__doc__;
 }
Index: Scribus/scribus/plugins/scriptplugin/cmdmisc.h
===================================================================
--- Scribus/scribus/plugins/scriptplugin/cmdmisc.h	(revision 15091)
+++ Scribus/scribus/plugins/scriptplugin/cmdmisc.h	(working copy)
@@ -348,6 +348,17 @@
 /*! 04.01.2007 : Joachim Neu : Moves item selection to back. */
 PyObject *scribus_moveselectiontoback(PyObject*);
 
+/*! docstring */
+PyDoc_STRVAR(scribus_setundoenabled__doc__,
+QT_TR_NOOP("setUndoEnabled(bool)\n\
+\n\
+Set undo-manager status.\n\
+This change will persist even after the script exits, so make sure to call\n\
+setUndoEnabled(True) in a finally: clause at the top level of your script.\n\
+"));
+/*! Enable/disable page redrawing. */
+PyObject *scribus_setundoenabled(PyObject * /*self*/, PyObject* args);
+
 #endif
 
 
Index: Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp
===================================================================
--- Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp	(revision 15091)
+++ Scribus/scribus/plugins/scriptplugin/scriptplugin.cpp	(working copy)
@@ -329,6 +329,7 @@
 	{const_cast<char*>("editMasterPage"), scribus_editmasterpage, METH_VARARGS, tr(scribus_editmasterpage__doc__)},
 	{const_cast<char*>("fileDialog"), (PyCFunction)scribus_filedia, METH_VARARGS|METH_KEYWORDS, tr(scribus_filedia__doc__)},
 	{const_cast<char*>("fileQuit"), scribus_filequit, METH_VARARGS, tr(scribus_filequit__doc__)},
+	{const_cast<char*>("getUndoEnabled"), scribus_getundoenabled, METH_VARARGS, tr(scribus_getundoenabled__doc__)},
 	{const_cast<char*>("getActiveLayer"), (PyCFunction)scribus_getactlayer, METH_NOARGS, tr(scribus_getactlayer__doc__)},
 	{const_cast<char*>("getAllObjects"), scribus_getallobj, METH_VARARGS, tr(scribus_getallobj__doc__)},
 	{const_cast<char*>("getAllStyles"), (PyCFunction)scribus_getstylenames, METH_NOARGS, tr(scribus_getstylenames__doc__)},
@@ -443,6 +444,7 @@
 	{const_cast<char*>("setActiveLayer"), scribus_setactlayer, METH_VARARGS, tr(scribus_setactlayer__doc__)},
 	{const_cast<char*>("setPDFBookmark"), scribus_setpdfbookmark, METH_VARARGS, tr(scribus_setpdfbookmark__doc__)},
 	{const_cast<char*>("isPDFBookmark"), scribus_ispdfbookmark, METH_VARARGS, tr(scribus_ispdfbookmark__doc__)},
+	{const_cast<char*>("setUndoEnabled"), scribus_setundoenabled, METH_VARARGS, tr(scribus_setundoenabled__doc__)},
 	{const_cast<char*>("setTextDistances"), scribus_settextdistances, METH_VARARGS, tr(scribus_settextdistances__doc__)},
 	{const_cast<char*>("setColumnGap"), scribus_setcolumngap, METH_VARARGS, tr(scribus_setcolumngap__doc__)},
 	{const_cast<char*>("setColumns"), scribus_setcolumns, METH_VARARGS, tr(scribus_setcolumns__doc__)},
