diff options
Diffstat (limited to 'browser-plugin/scriptable.cpp')
-rw-r--r-- | browser-plugin/scriptable.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/browser-plugin/scriptable.cpp b/browser-plugin/scriptable.cpp index ff053ef..d0c2854 100644 --- a/browser-plugin/scriptable.cpp +++ b/browser-plugin/scriptable.cpp @@ -210,7 +210,7 @@ ScriptablePluginObject::HasMethod (NPIdentifier name) mFindNextID }; - for (int i = 0; i < G_N_ELEMENTS(methods); i++) { + for (guint i = 0; i < G_N_ELEMENTS(methods); i++) { if (name == methods[i]) { return true; } @@ -239,19 +239,25 @@ ScriptablePluginObject::Invoke (NPIdentifier name, const NPVariant *args, if (name == mZoomInID) { plugin->ZoomIn (); + return true; } else if (name == mZoomOutID) { plugin->ZoomOut (); + return true; } else if (name == mFindNextID) { if (argCount < 1 || !NPVARIANT_IS_STRING (args[0])) { return false; } plugin->FindNext (NPVARIANT_TO_STRING (args[0]).utf8characters); + return true; } else if (name == mFindPreviousID) { if (argCount < 1 || !NPVARIANT_IS_STRING (args[0])) { return false; } plugin->FindPrevious(NPVARIANT_TO_STRING (args[0]).utf8characters); + return true; } + + return false; } bool |