diff options
author | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-01-05 02:30:47 +0000 |
---|---|---|
committer | pescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7> | 2009-01-05 02:30:47 +0000 |
commit | 30f9565911217d38cefda3920f55d183d8f6e219 (patch) | |
tree | 5b907567893e751131ae04ac91e37baf3f3775c8 /Plugins/skins/SkinLib/V8Script.cpp | |
parent | bcee062d113ca9da6e6b16b8b3fa6399db35fce4 (diff) |
Some refactors
Changed project settings
Added align
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@123 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/skins/SkinLib/V8Script.cpp')
-rw-r--r-- | Plugins/skins/SkinLib/V8Script.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Plugins/skins/SkinLib/V8Script.cpp b/Plugins/skins/SkinLib/V8Script.cpp index b18bdf2..2df8cad 100644 --- a/Plugins/skins/SkinLib/V8Script.cpp +++ b/Plugins/skins/SkinLib/V8Script.cpp @@ -1,7 +1,7 @@ #include "globals.h"
#include "V8Script.h"
-#include "utf8_helpers.h"
+#include <utf8_helpers.h>
using namespace v8;
@@ -65,9 +65,17 @@ bool V8Script::compile(const TCHAR *source, Dialog *dlg) HandleScope handle_scope;
Handle<ObjectTemplate> global = ObjectTemplate::New();
+
global->Set(String::New("IsEmpty"), FunctionTemplate::New(&IsEmptyCallback));
global->Set(String::New("RGB"), FunctionTemplate::New(&RGBCallback));
+ global->Set(String::New("NUMBER"), String::New("NUMBER"));
+ global->Set(String::New("CHECKBOX"), String::New("CHECKBOX"));
+ global->Set(String::New("TEXT"), String::New("TEXT"));
+ global->Set(String::New("LEFT"), String::New("LEFT"));
+ global->Set(String::New("CENTER"), String::New("CENTER"));
+ global->Set(String::New("RIGHT"), String::New("RIGHT"));
+
context = Context::New(NULL, global);
Context::Scope context_scope(context);
@@ -172,10 +180,6 @@ std::pair<SkinOptions *,DialogState *> V8Script::configure(Dialog *dlg) wrappers.fillWrapper(get(global, field->getField()->getName()), field);
}
- global->Set(String::New("NUMBER"), String::New("NUMBER"));
- global->Set(String::New("CHECKBOX"), String::New("CHECKBOX"));
- global->Set(String::New("TEXT"), String::New("TEXT"));
-
TryCatch try_catch;
Handle<Value> result = configure->Call(global, 0, NULL);
if (result.IsEmpty())
|