All pastes #956735 Raw Edit

Unnamed

public text v1 · immutable
#956735 ·published 2008-03-25 15:16 UTC
rendered paste body
Index: libs/kokross/KoScriptingPart.cpp
===================================================================
--- libs/kokross/KoScriptingPart.cpp    (revisión: 789368)
+++ libs/kokross/KoScriptingPart.cpp    (copia de trabajo)
@@ -156,7 +156,18 @@ bool KoScriptingPart::showExecuteScriptF
     filedialog->setCaption( i18n("Execute Script File") );
     filedialog->setOperationMode( KFileDialog::Opening );
     filedialog->setMode( KFile::File | KFile::ExistingOnly | KFile::LocalOnly );
-    return filedialog->exec() ? Kross::Manager::self().executeScriptFile( filedialog->selectedUrl().path() ) : false;
+    if (filedialog->exec()) {
+        Kross::Action action(this, "Execute Script File");
+        action.addObject(d->module);
+
+        action.setFile(filedialog->selectedUrl().path());
+        action.trigger();
+
+        return true;
+    }
+
+    return false;
+
 }

 void addMenu(QMenu* menu, Kross::ActionCollection* collection)
Index: libs/kokross/KoScriptingPart.h
===================================================================
--- libs/kokross/KoScriptingPart.h      (revisión: 789368)
+++ libs/kokross/KoScriptingPart.h      (copia de trabajo)
@@ -67,7 +67,7 @@ class KOKROSS_EXPORT KoScriptingPart : p
         * a scripting file and execute it.
         * \return true if the user did choose a file and the file got executed successful.
         */
-        static bool showExecuteScriptFile();
+       bool showExecuteScriptFile();

     protected Q_SLOTS: