[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/libs/kokross
From: Jon de Andres Frias <jondeandres () gmail ! com>
Date: 2008-03-25 15:37:09
Message-ID: 1206459429.871537.23374.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 789889 by jdandres:
Fix a problem with Execute Script File since the module was not added, using \
addObject, to the script context.
Now is used a Kross::Action to do this.
M +12 -1 KoScriptingPart.cpp
M +1 -1 KoScriptingPart.h
--- trunk/koffice/libs/kokross/KoScriptingPart.cpp #789888:789889
@@ -156,7 +156,18 @@
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)
--- trunk/koffice/libs/kokross/KoScriptingPart.h #789888:789889
@@ -67,7 +67,7 @@
* 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:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic