Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update location of schema file on desktop builds.

  • Loading branch information...
commit 988e8115fcd58709cb8613016d2901ef241e4bb0 1 parent 6a28ee9
Scott Shillcock authored
Showing with 20 additions and 3 deletions.
  1. +17 −2 BrowserAdapter.cpp
  2. +2 −0  Makefile.Ubuntu
  3. +1 −1  Makefile.inc
View
19 BrowserAdapter.cpp
@@ -55,6 +55,7 @@ LICENSE@@@ */
#include "NPObjectEvent.h"
#include <pbnjson.hpp>
+#include <QtCore/QDir>
// what user does browserserver run as?
#define BROWSERVER_USER "luna"
@@ -463,7 +464,7 @@ BrowserAdapter::BrowserAdapter(NPP instance, GMainContext *ctxt, int16_t argc, c
, mFlashGestureLock(false)
, mMouseInInteractiveRect(false)
, m_spotlightHandle(0)
- , m_hitTestSchema(pbnjson::JSchemaFile("/etc/palm/browser/HitTest.schema"))
+ , m_hitTestSchema("{}")
, m_ft(0)
, m_clickPt(0, 0)
, m_penDownDoc(0, 0)
@@ -486,6 +487,14 @@ BrowserAdapter::BrowserAdapter(NPP instance, GMainContext *ctxt, int16_t argc, c
, m_bufferLockName(0)
{
+#ifdef ISIS_DESKTOP
+ QString schemaFile = QString("%1/.isis/conf/HitTest.schema").arg(QDir::homePath());
+#else
+ QString schemaFile("/etc/palm/browser/HitTest.schema");
+#endif
+
+ m_hitTestSchema = pbnjson::JSchemaFile(qPrintable(schemaFile));
+
//openlog("browser-adapter", 0, LOG_USER);
g_message("%s: %p", __PRETTY_FUNCTION__, this);
@@ -4128,8 +4137,14 @@ void BrowserAdapter::jsonToRects(const char* rectsArrayJson)
// parse out rectangle coordinates
pbnjson::JValue rectsArray;
pbnjson::JDomParser parser(NULL);
- pbnjson::JSchemaFile schema("/etc/palm/browser/InteractiveWidgetRect.schema");
+#ifdef ISIS_DESKTOP
+ QString schemaFile = QString("%1/.isis/conf/InteractiveWidgetRect.schema").arg(QDir::homePath());
+#else
+ QString schemaFile("/etc/palm/browser/InteractiveWidgetRect.schema");
+#endif
+
+ pbnjson::JSchemaFile schema(qPrintable(schemaFile));
if (!parser.parse(rectsArrayJson, schema, NULL)) {
TRACEF("%s: unable to parse string '%s'\n", __FUNCTION__, rectsArrayJson);
goto Done;
View
2  Makefile.Ubuntu
@@ -23,6 +23,8 @@ LIBS += \
-lQtNetwork \
-lQtCore
+LOCAL_CFLAGS += -DISIS_DESKTOP
+
include Makefile.inc
install: all
View
2  Makefile.inc
@@ -37,7 +37,7 @@ LIBS := $(LIBS) \
-lglib-2.0 \
-lrt -lpthread -lpbnjson_cpp
-LOCAL_CFLAGS := $(CFLAGS) -MD -Wall -Werror $(FLAGS_OPT)
+LOCAL_CFLAGS += $(CFLAGS) -MD -Wall -Werror $(FLAGS_OPT)
EXPORT_FLAGS = -Wl,--version-script=BrowserAdapter.exports
Please sign in to comment.
Something went wrong with that request. Please try again.