Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marcopg@litl.com>2010-04-23 10:25:54 (GMT)
committer Marco Pesenti Gritti <marcopg@litl.com>2010-07-27 22:04:23 (GMT)
commit64edc353390ba3d92707c7457208c60e8103122a (patch)
tree4fb0b35dbc3ac1c5c26d0ff773a313e4e366e753
parent2c2c415bfee72cef4eea935e833161034a8278b2 (diff)
Fix methods in the scriptable interface
They are disabled with a define and it looks like they lagged behind changes in the plugin.
-rw-r--r--browser-plugin/scriptable.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/browser-plugin/scriptable.cpp b/browser-plugin/scriptable.cpp
index 8c8e9e2..2c03ee8 100644
--- a/browser-plugin/scriptable.cpp
+++ b/browser-plugin/scriptable.cpp
@@ -220,6 +220,7 @@ ScriptablePluginObject::HasMethod (NPIdentifier name)
NPIdentifier methods[] = {
mZoomInID,
mZoomOutID,
+ mFindTermsID,
mFindPreviousID,
mFindNextID
};
@@ -400,17 +401,17 @@ ScriptablePluginObject::Invoke (NPIdentifier name, const NPVariant *args,
plugin->ZoomOut ();
return true;
#if CAN_CALL_METHODS
- } else if (name == mFindNextID) {
+ } else if (name == mFindTermsID) {
if (argCount < 1 || !NPVARIANT_IS_STRING (args[0])) {
return false;
}
- plugin->FindNext (NPVARIANT_TO_STRING (args[0]).utf8characters);
+ plugin->Find (NPVARIANT_TO_STRING (args[0]).utf8characters);
+ return true;
+ } else if (name == mFindNextID) {
+ plugin->FindNext ();
return true;
} else if (name == mFindPreviousID) {
- if (argCount < 1 || !NPVARIANT_IS_STRING (args[0])) {
- return false;
- }
- plugin->FindPrevious(NPVARIANT_TO_STRING (args[0]).utf8characters);
+ plugin->FindPrevious ();
return true;
#endif
}