summaryrefslogtreecommitdiff
path: root/Plugins/skins/SkinLib/SkinnedDialog.cpp
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-01-09 02:46:23 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-01-09 02:46:23 +0000
commit283ebdc88fe0867c50f56306bf53dcdeec0da013 (patch)
treeabab71b8038f352d2db28390bc2922936b96b19a /Plugins/skins/SkinLib/SkinnedDialog.cpp
parentfefa34c8d2d2501ca1ec2e7cd57f98a8816f3939 (diff)
skins: List of skins and notification on options
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@126 c086bb3d-8645-0410-b8da-73a8550f86e7
Diffstat (limited to 'Plugins/skins/SkinLib/SkinnedDialog.cpp')
-rw-r--r--Plugins/skins/SkinLib/SkinnedDialog.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/Plugins/skins/SkinLib/SkinnedDialog.cpp b/Plugins/skins/SkinLib/SkinnedDialog.cpp
index d3abe0c..fdca335 100644
--- a/Plugins/skins/SkinLib/SkinnedDialog.cpp
+++ b/Plugins/skins/SkinLib/SkinnedDialog.cpp
@@ -58,22 +58,21 @@ void SkinnedDialog::setSize(const Size &size)
releaseState();
}
-bool SkinnedDialog::compile()
+int SkinnedDialog::compile()
{
- bool changed = fileChanged();
- if (!changed)
- return true;
+ if (!fileChanged())
+ return 1;
releaseCompiledScript();
struct _stat st = {0};
if (_tstat(filename.c_str(), &st) != 0)
- return false;
+ return 0;
std::tstring text;
readFile(text);
if (text.size() <= 0)
- return false;
+ return 0;
script = new V8Script();
script->setExceptionCallback(errorCallback, errorCallbackParam);
@@ -81,7 +80,7 @@ bool SkinnedDialog::compile()
if (!script->compile(text.c_str(), this))
{
releaseCompiledScript();
- return false;
+ return 0;
}
std::pair<SkinOptions *,DialogState *> pair = script->configure(this);
@@ -90,12 +89,12 @@ bool SkinnedDialog::compile()
if (opts == NULL)
{
releaseCompiledScript();
- return false;
+ return 0;
}
fileChangedTime = st.st_mtime;
- return true;
+ return 2;
}
DialogState * SkinnedDialog::getState()