index a8c0286d68f3cfcaa41182306c75be5c58a8dfdf..304362f60b3d2b84583c3ac07de8da11a1d5b0ac 100644 (file)
-/*
- * 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
*/
/**
* Constructor
*/
- ScriptDialogImpl();
+ ScriptDialogImpl(Behavior::BehaviorFactory behavior_factory);
/**
* Destructor
#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"
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?
+ }
}
/**
/**
* Constructor
*/
-ScriptDialogImpl::ScriptDialogImpl()
+ScriptDialogImpl::ScriptDialogImpl(Behavior::BehaviorFactory behavior_factory) :
+ ScriptDialog(behavior_factory)
{
Gtk::VBox *mainVBox = get_vbox();
/**
* Factory method. Use this to create a new ScriptDialog
*/
-ScriptDialog *ScriptDialog::create()
+ScriptDialog *ScriptDialog::create(Behavior::BehaviorFactory behavior_factory)
{
- ScriptDialog *dialog = new ScriptDialogImpl();
+ ScriptDialog *dialog = new ScriptDialogImpl(behavior_factory);
return dialog;
}