summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/scriptdialog.cpp
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2007-04-15 01:19:33 +0000
committerishmal <ishmal@users.sourceforge.net>2007-04-15 01:19:33 +0000
commit764a6cc7d70c01b190dde53dd0c368a194dfba43 (patch)
tree0128fb0f57c4115dd40bbecfcdeaaf9b3c0117be /src/ui/dialog/scriptdialog.cpp
parentRearrange bindings to use PyCXX (diff)
downloadinkscape-764a6cc7d70c01b190dde53dd0c368a194dfba43.tar.gz
inkscape-764a6cc7d70c01b190dde53dd0c368a194dfba43.zip
Tweak capture of error messages
(bzr r2892)
Diffstat (limited to 'src/ui/dialog/scriptdialog.cpp')
-rw-r--r--src/ui/dialog/scriptdialog.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/ui/dialog/scriptdialog.cpp b/src/ui/dialog/scriptdialog.cpp
index a8c0286d6..07f26b71f 100644
--- a/src/ui/dialog/scriptdialog.cpp
+++ b/src/ui/dialog/scriptdialog.cpp
@@ -1,7 +1,10 @@
-/*
- * Other dudes from The Inkscape Organization
+/**
+ * Dialog for executing and monitoring script execution
+ *
+ * Author:
+ * Bob Jamison
*
- * Copyright (C) 2004, 2005 Authors
+ * Copyright (C) 2004-2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
@@ -101,10 +104,10 @@ static char *defaultPythonCodeStr =
#if defined(WITH_PYTHON)
"# This is a sample Python script.\n"
"# To run it, select 'Execute Python' from the File menu above.\n"
- "desktop = inkscape.getDesktop()\n"
- "dialogmanager = inkscape.getDialogManager()\n"
- "document = desktop.getDocument()\n"
- "document.hello()\n"
+ "desktop = inkscape.activeDesktop\n"
+ "dialogmanager = desktop.dialogManager\n"
+ "document = inkscape.activeDocument\n"
+ "inkscape.hello()\n"
"dialogmanager.showAbout()\n"
#elif defined(WITH_PERL)
"# This is a sample Perl script.\n"
@@ -158,9 +161,12 @@ lang)
Glib::ustring error;
Inkscape::Extension::Script::InkscapeScript engine;
bool ok = engine.interpretScript(script, output, error, lang);
- if (!ok) return;
outputText.get_buffer()->set_text(output);
errorText.get_buffer()->set_text(error);
+ if (!ok)
+ {
+ //do we want something here?
+ }
}
/**