From 64edc353390ba3d92707c7457208c60e8103122a Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 23 Apr 2010 10:25:54 +0000 Subject: Fix methods in the scriptable interface They are disabled with a define and it looks like they lagged behind changes in the plugin. --- (limited to 'browser-plugin') 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 } -- cgit v0.9.1