summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-03-31test: Fix broken header path from distcheckDan Nicholson1-1/+1
2012-03-20viewer: Add accelerator to focus page selectorDan Nicholson2-0/+44
An accelerator group for EvView shortcuts is added with an initial accelerator to focus the page selector in the toolbar. Since these accelerators are only intended to be associated with the EvView, we set them sensitive only when it comes into focus.
2012-03-20viewer: Connect accelerators and add to toplevel windowDan Nicholson1-25/+48
The toolbar accelerators were not being activated for two reasons: 1. GtkUIManager does not connect toolbar accelerators automatically 2. The accelerators were never being connected to the toplevel window
2012-03-20viewer: Add page selector to toolbarDan Nicholson7-5/+887
This adds the page selector widget to the toolbar with actions. The code is copied directly from evince's libmisc.
2012-03-17Drop explicit grab focus on EvViewDan Nicholson2-9/+6
It turns out that the reason the toolbar was getting focus first for my previewer and not the real evince-previewer was that the toolbar buttons were set as sensitive when the widget was shown. If instead the document is loaded after the window is shown like in both the plugin and the real previewer, then the initial focus will be on the scrolled window as desired.
2012-03-16viewer: Add continuous view toggle buttonDan Nicholson1-1/+37
Similar code as the best fit/page width toggle buttons.
2012-03-14viewer: Add toggle buttons for setting the sizing modeDan Nicholson1-0/+72
Set the sizing mode to Best Fit or Page Width just like evince. This needs a little dance to shut off the signal handlers when the mode gets set initially or otherwise outside of the buttons themselves.
2012-03-14test: Add html page testing different modes of renderingDan Nicholson2-1/+27
Some simple html to show both local and remote PDFs in their own window and as objects embedded on the page. It should probably have a couple more file types, too.
2012-03-13plugin: Remove redundant debug messageDan Nicholson1-1/+0
2012-03-13viewer: Add toolbar just with page up/down buttons for nowDan Nicholson4-0/+68
Add back the toolbar to the EvbpViewer widget. As on the previous attempt, the UI manager XML is being kept inline so now external files are needed. Right now this just has the page up/down buttons.
2012-03-11Begin EvbpViewer widgetDan Nicholson6-50/+184
Start building up a widget object, EvbpViewer, again. Once we're doing anything more complicated than just putting an EvView in a scrolled window, it'll help to keep most of it in it's own widget. The widget subclasses GtkBox so we can just put a toolbar and scrolled window in.
2012-03-07Add a test script for launching firefox with the built pluginDan Nicholson3-0/+21
A simple wrapper script setting the plugin path to include the built library, enabling the debug messages, and loading the test pdf unless told otherwise. An environment variable EVBP_PROFILE allows to use a specific firefox profile rather than the default.
2012-03-06plugin: Initialize only evince prior to NP_InitializeDan Nicholson1-18/+30
We need to load evince in order to get the MIME types in NP_GetMIMEDescription, and this happens prior to NP_Initialize. Unfortunately, evince has issues if it's shutdown and restarted, so right now the full plugin initialization sequence is kicked off when geting the MIME types. That's a little dirty, so just initialize evince once and let the rest happen as normal from NP_Initialize.
2012-03-06config: Rework Mozilla dependencies so we don't link in librariesDan Nicholson3-7/+10
We really only need the headers for xulrunner and nspr and don't want to link anything since the symbols will all resolve at runtime when the plugin is loaded.
2012-03-06plugin: Drop unused filename memberDan Nicholson1-2/+0
The EvDocument holds the file's uri, so there's no need to hold on to the filename as given to us by the browser.
2012-03-06Add 2011 to copyright statementsDan Nicholson5-5/+5
I wrote a lot of this last year.
2012-03-05test: Revamp previewer and enable it in the buildDan Nicholson2-38/+106
The code is very similar to the plugin and gives an opportunity to make sure the way we use evince still works correctly.
2012-03-05config: Drop AM_MAINTAINER_MODEDan Nicholson1-1/+0
Without this declaration, automake uses maintainer mode all the time. That seems like a win to me since maintainer mode always does the right thing when the changes to the autotools files have been made.
2012-03-05Add GPLv2+ licenses to the codeDan Nicholson6-0/+434
GPL seems more appropriate than LGPL at this point since I can't see anyone linking to this code. And v2+ seems like a good compromise since so many people are anti-v3.
2012-03-05plugin: Drop unneeded headerDan Nicholson1-1/+0
I'm pretty sure glib.h pulls everything necessary in.
2012-03-04plugin: Add a couple more debugging messagesDan Nicholson1-1/+5
2012-03-03plugin: Add to and improve logging of errorsDan Nicholson1-18/+43
2012-03-03plugin: Remove superfluous headerDan Nicholson3-21/+14
It was just holding a structure definition.
2012-03-03config.h is requiredDan Nicholson2-10/+0
Too many things are defined by autoconf to try to support building without it.
2012-03-03plugin: Silence debug messages unless EVBP_DEBUG is setDan Nicholson1-0/+15
Unless the EVBP_DEBUG environment variable is set, install a debug message handler that simply discards them.
2012-03-03plugin: Use glib's debugging facilityDan Nicholson4-82/+36
I don't see a good reason to have a hand-rolled debug logger when glib already has one. This does drop the backwards compat define for __func__, though, which means we need C99. It's 2012 now.
2012-03-03plugin: Don't unref widgetsDan Nicholson1-2/+0
When the plug is destroyed, it will take down the widgets for us. Trying to unref after that will just cause warnings.
2012-03-03plugin: Greatly simplify pluginDan Nicholson13-1705/+51
And it works! Instead of using the EvPreviewer object, just create the documents and widgets straight in the plugin. This removes the toolbar for now and just leaves a scrolled window for the view. We'll get that back later.
2012-03-03Move plugin sources to src directoryDan Nicholson9-4/+4
2012-03-03plugin: Show the plug widget, tooDan Nicholson1-0/+1
2011-02-18plugin: Stream document to local file and pass to previewerDan Nicholson1-0/+15
Evince can't handle streamed documents, so tell Mozilla to save the file locally and provide us the filename. This in turn is passed on to the previewer for rendering. Unfortunately, this causes the code to segfault, and I don't know why.
2011-02-18plugin: Require XEmbed with GTK for embedding previewerDan Nicholson1-0/+37
The way we want the plugin to work is to embed our previewer widget within the browser process and have it pass through all events as if it was a normal GTK process. This is accomplished through the XEmbed Extension as described here: https://developer.mozilla.org/en/XEmbed_Extension_for_Mozilla_Plugins
2011-02-18plugin: Debug function callsDan Nicholson1-0/+42
The Mozilla NPAPI call sequence isn't all that clear, so it's nice to see a log of the functions.
2011-02-18Add DEBUG logging macroDan Nicholson2-0/+52
When DEBUG is defined and we have a suitable compiler, evbp_debug will log a message with the file, function name and the format string passed to it. Otherwise, it just logs the format string to stderr.
2011-02-18plugin: Only initialize backends onceDan Nicholson1-16/+46
Some of the plugin backends (I think evince in particular), don't react well when they're initialized repeatedly. Since we build the MIME string dynamically, we need to do initialization from both NP_Initialize and NP_GetMIMEDescription. Just move all the init and shutdown code to their own functions and make sure we only do it once.
2011-02-18plugin: Initialize and destroy previewerDan Nicholson1-1/+23
Still not doing anything useful, but now the widget is wired up and the backends are enabled.
2011-02-18plugin: Create plugin module using Mozilla NPAPIDan Nicholson5-1/+262
Basic beginnings of a plugin for the evince previewer. Right now basically all it does is set up the function tables and return the MIME description. The plugin is created as a libtool module. The mozilla-plugin and nspr packages are dependencies to get the NPAPI SDK headers and associated NSPR types. Hopefully that's available on most platforms.
2011-02-18plugin: Generate Mozilla MIME string from evince backend infoDan Nicholson5-1/+131
We could hardcode a list of likely MIME types that the plugin will support, but we can get the information directly from evince's backends manager. A mapping from mime type to file extension (which Mozilla wants) is used and contains all the MIME types supported by evince as of gnome-2-30. A small test program has been added to show the constructed MIME description as used by Mozilla.
2011-02-15Enable compiler warning flags and use them by defaultDan Nicholson3-1/+20
For GCC, allow the warning flags to enabled. Turn them on by default so we see things ahead of time.
2011-02-15Add test app and test pdf fileDan Nicholson6-1/+72
The test program is a just a simple exerciser for the EvPreviewer widget, and the pdf is borrowed from evince.
2011-02-15previewer: Drop unused dpi memberDan Nicholson1-1/+0
2011-02-15Convert previewer to GtkVBox classDan Nicholson1-31/+58
In order to embed the previewer into other windows (such as the browser window), change the widget to subclass the vbox one level down from the window. Some code restructuring is needed to handle things that hookup to the window. To that effect, a toplevel member has been added that points to the a toplevel window when the hierarchy changes. The max and min scale also have to be delayed until the screen becomes available.
2011-02-15Remove model property and move all initialization to _initDan Nicholson2-57/+10
There's no reason to pass in our own document model when creating the previewer. Just have the previewer create its own during initialization. With all the previewer components created immediately and all properties removed, the constructor can be dropped and all the code moved to _init.
2011-02-15Embed previewer GtkUIManager XML in sourceDan Nicholson4-59/+40
Instead of loading the GtkUIManager XML for the previewer from an external file that has to be found and located, embed it in the source and load it as a string. This allows the plugin to be completely self contained in the module. Also, this allows the PrintPreview button to be hidden when the printing code is not enabled.
2011-02-15Merge previewer code and rename class to EvPreviewerDan Nicholson5-888/+718
Since we intend to use the previewer as a widget rather than an app, we can merge the app code into the object code. Likewise, the Window part of the class is pretty superfluous. One change is that the document loading happens as part of setting the source file.
2011-02-15Add autotools support and libevpreviewer.la convenience libraryDan Nicholson5-0/+87
Adds the basic support for building the previewer code and making a libtool convenience library. AM_GLIB_GNU_GETTEXT is currently commented out as none of the localization support is available.
2011-02-15Initial commit of previewer code for pluginDan Nicholson8-0/+1864
This is a dump of the evince-previewer code from the gnome-2-30 branch of evince (commit 38693288). This code will be converted into a widget in a convenience library to be used from the mozilla plugin. The source for evince's libmisc have also been copied with the previewer code.