Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--browser-plugin/Makefile.am1
-rw-r--r--browser-plugin/plugin.cpp2
-rw-r--r--browser-plugin/scriptable.cpp8
3 files changed, 9 insertions, 2 deletions
diff --git a/browser-plugin/Makefile.am b/browser-plugin/Makefile.am
index 6c84773..77ad2c9 100644
--- a/browser-plugin/Makefile.am
+++ b/browser-plugin/Makefile.am
@@ -18,6 +18,7 @@ libevince_plugin_la_CPPFLAGS = \
-DXP_UNIX \
-DMOZ_X11 \
-DEV_BINARY_VERSION=\"$(EV_BINARY_VERSION)\" \
+ $(WARN_CXXFLAGS) \
$(BROWSER_PLUGIN_CFLAGS) \
$(AM_CPPFLAGS)
diff --git a/browser-plugin/plugin.cpp b/browser-plugin/plugin.cpp
index ffdc767..587c7f7 100644
--- a/browser-plugin/plugin.cpp
+++ b/browser-plugin/plugin.cpp
@@ -24,8 +24,8 @@
#include "scriptable.h"
Plugin::Plugin (NPP instance) : mInstance (instance),
- mWindow (0),
mScriptableObject (0),
+ mWindow (0),
mLoadJob (0)
{
mScrolledWindow = gtk_scrolled_window_new (NULL, NULL);
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