Permalink
Browse files

Improve docs

  • Loading branch information...
1 parent d11e88e commit 7c52b31de721cf613bc5232ca3bf5bfbdeaddae6 @jeremysanders committed May 12, 2010
Showing with 19 additions and 3 deletions.
  1. +13 −3 README
  2. +6 −0 partwin.cpp
View
16 README
@@ -5,6 +5,16 @@ It uses Nokia's QtBrowserPlugin, part of Qt Solutions
Build instructions:
-cmake .
-make
-make install
+$ cmake .
+$ make
+$ make install
+
+Make sure that libokularplugin.so is in your mozilla/firefox plugins path
+
+e.g.
+$ mkdir -p ${HOME}/.mozilla/plugins
+$ ln -s /usr/lib/libokularplugin.so ${HOME}/.mozilla/plugins
+
+You'll need to make /usr/lib/libokularplugin.so point to the file
+which was installed by the make install step above.
+
View
@@ -81,6 +81,7 @@ PartWin::~PartWin()
bool PartWin::readData(QIODevice *source, const QString &/*format*/)
{
+ // read data into temporary file
QTemporaryFile file( QDir::tempPath() + "/okularplugin_XXXXXX.pdf" );
if (!source->open(QIODevice::ReadOnly))
@@ -94,6 +95,8 @@ bool PartWin::readData(QIODevice *source, const QString &/*format*/)
}
file.flush();
}
+
+ // open up temporary file into okular
QString url = QString("file://") + file.fileName();
m_part->openUrl( url );
@@ -119,6 +122,9 @@ void PartWin::transferComplete(const QString &url, int id, Reason r)
void PartWin::enterEvent(QEvent *event)
{
+ // this is required because firefox stops sending keyboard
+ // events to the plugin after opening windows (e.g. download dialog)
+ // setting the active window brings the events back
if ( QApplication::activeWindow() == 0 )
{
QApplication::setActiveWindow(this);

0 comments on commit 7c52b31

Please sign in to comment.