summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-02-23Track original URI of file for savingHEADmasterDan Nicholson3-22/+32
Use the original URI of the file when setting a default for the saved file. This is an improvement over using the document title or the temporary file name from the browser. As a bonus, this avoids the deprecated ev_backends_manager_get_document_type_info API from evince.
2013-02-23mime: Use G_N_ELEMENTS instead of separate variableDan Nicholson1-2/+1
2013-02-23Avoid Gtk[HV]Box warnings on gtk3Dan Nicholson2-0/+8
2013-02-23evbp: Initialize gtk to avoid g_thread_init warningsDan Nicholson1-4/+2
It was assumed that gtk was already initialized, but there's no harm in initializing it again and avoids the deprecation warnings from g_thread_init.
2013-02-23plug: Destroy child to avoid bugs in removing plug from socketDan Nicholson1-0/+15
When GtkPlug is in the same process as GtkSocket, a complicated pile of code is invoked to remove the plug from the socket when the socket is being destroyed. This leads to the plug being in some dicey intermediate states where it is changing back to a toplevel and critical warnings are thrown from its contained widgets. Workaround this by just destroying the contained widget (the viewer) as soon as the plug removal can be detected.
2013-02-23evbp: Handle destruction appropriatelyDan Nicholson1-1/+5
Without referencing the objects, the lifetimes of the plug and viewer were difficult to manage and the pointers could become invalid unexpectedly.
2013-02-23evbp: Protect against SetWindow after plug has been destroyedDan Nicholson1-4/+8
For some reason, Epiphany (WebKitGtk) likes to send a last SetWindow even as it's in the process of destroying the widget. Check whether the plug is still a GtkWindow before telling it to resize to the Window we're being told about.
2013-02-23previewer: Quit the separate plug process when the widget is destroyedDan Nicholson1-0/+2
Until now, the forked plug process was hanging around in the main loop because nothing was forcing it to quit. Watch for the plug widget to be destroyed and quit the main loop to exit.
2013-02-23previewer: Block destruction of socket when plug removedDan Nicholson1-2/+2
When the socket is destroyed upon removing the plug, gtk tends to hit some critical warnings. Instead, keep the socket from being immediately destroyed and instead destroy it with the toplevel window.
2013-02-23previewer: Destroy window on quit to use same exit pathDan Nicholson1-1/+2
When the Quit button was clicked, the main loop was being quit immediately without destroying the window. This makes sure the window is destroyed like when it's deleted so the same cleanup code is exercised.
2013-02-23plug: Begin custom EvbpPlug classDan Nicholson5-2/+116
There are a few bugs in the usage of GtkPlug that cause critical warnings and crashes. Using our own class to override methods might give a chance to workaround these issues.
2013-02-12Add a print button to the toolbarDan Nicholson1-0/+57
Print the document from the toolbar or via Ctrl-p using the ev-print-operation backend. This is different than the Print dialog from the browser, which has a NPAPI interface to pass back a block of PostScript. That doesn't seem to be working from firefox, but this usage is probably what people typically want anyway (print the document rather than just what appears on the web page).
2013-01-19Only force redrawing when the plugin is in-processDan Nicholson1-1/+2
Out-of-process GtkPlug seems to work fine, so let's reserve this hack only for when it's needed.
2013-01-19Track whether the plugin is in- or out-of processDan Nicholson1-0/+8
GtkPlug behaves differently in each instance, so we need to keep track of how the plugin is being run.
2013-01-19test: Don't quote BROWSER variable to allow argsDan Nicholson1-1/+1
Quoting the BROWSER variable is nice to protect against spaces in the filename, but it keeps multiple arguments from passing through. The latter is more useful as it allows you to do things like BROWSER="gdb --args epiphany" ./test/browser.sh.
2013-01-19test: Run epiphany in private instanceDan Nicholson1-1/+1
This ensures that it doesn't open with the same (failed) tabs as last time.
2013-01-19mime: Add a bunch more types from newer evinceDan Nicholson1-1/+13
2013-01-19mime: Workaround ABI breakage in newer evinceDan Nicholson1-0/+5
Prior to 3.4, evince would allocate EvTypeInfo's in ev_backends_manager_get_all_types_info(), but now it just returns pointers into its own table.
2013-01-19mime: Use g_list_free_full instead of separate loopDan Nicholson1-2/+1
2013-01-19ev-page-action-widget: Use g_signal_connect instead of g_signal_connect_objectCarlos Garcia Campos1-4/+4
g_signal_connect_object has been finally fixed in recent versions of glib, so the signal is disconnected when the object is disposed. However we are manually disconnecting the signal handler, which gives a runtime warning with recent glib versions because the signal has already been disconnected. Use g_signal_connect() and keep disocnnecting the signal manually to make sure it still works with previous versions of glib. This is upstream evince commit 30f23d6.
2013-01-19test: Allow previewer to run with plug in same or separate processDan Nicholson3-126/+155
GtkSocket/GtkPlug behave differently when the plug is embedded in the same process rather than running in a separate process. It seems that epiphany does the former while firefox does the latter and that might be causing some of the behavioral differences. When the previewer is run without options, the plug is embedded in the same proceess. When executed with the -f/--fork option, the plug is run from a separate process.
2013-01-19Set appropriate size request on plug creationDan Nicholson1-0/+2
When the plug is out of process, it doesn't get appropriate allocations from the socket. Firefox seems to handle this fine, but let's just make use of the size information it's provided us.
2013-01-19Move forced redraw out of widget into pluginDan Nicholson2-6/+12
The EvbpViewer widget normally works fine, and the forced resizing only seems to be needed on Epiphany.
2013-01-19Resize plug window rather than returning after initial SetWindowDan Nicholson1-15/+14
Epiphany seems to like to call SetWindow a lot and depends on the plugin resizing its window appropriately. If the plug already exists, resize it to the requested dimensions rather than just returning even if the dimensions are the same.
2013-01-19Log plugin and Evince version during initializationDan Nicholson1-0/+3
2013-01-19Add Evince major version to description stringDan Nicholson1-2/+9
2013-01-19Destroy the GtkPlug when the plugin is destroyedDan Nicholson1-0/+4
Previously the GtkPlug was being implicitly destroyed when the EvbpViewer object was destroyed. This worked fine under firefox where the plugin code jumped through hoops to make sure the GtkPlug was disconnected before destroying its GtkSocket, but other browsers may not perform this trick for us.
2013-01-19Keep track of the GtkPlugDan Nicholson1-4/+5
This is our toplevel widget and we really need to keep tabs on its interactions with the embedder.
2012-10-31Resize the EvbpViewer widget according to its parent containerJames Collier1-0/+6
Doing this upon opening a new document in epiphany ensures the widget is the correct size and is scrollable.
2012-10-31test: Set G_MESSAGES_DEBUG for newer glibDan Nicholson1-1/+2
On newer glib, G_MESSAGES_DEBUG controls which domains get their debug messages printed. Set this in addition to the local EVBP_DEBUG setup so that debug messages are received on older and newer glib.
2012-10-30test: Make plugin test script more flexible on browsers to useDan Nicholson4-17/+32
Instead of hardcoding the test script to use firefox only, make it more flexible so that other epiphany and other Mozilla browsers can be started.
2012-10-30test: Start separate browser instance when profile specifiedDan Nicholson1-1/+1
Mozilla browsers allow starting a totally separate instance when a profile is specified and -no-remote is passed on the command line. This allows much easier testing without killing any currently running browsers.
2012-10-30Respond to NPPVpluginWantsAllNetworkStreams query from browserDan Nicholson1-0/+4
Apparently NPPVpluginWantsAllNetworkStreams is always queried, so tell the browser that we don't need all the network streams.
2012-08-21Limit exported symbols to just those needed for NPAPIDan Nicholson2-1/+9
To load the plugin only NP_Initialize and friends are needed. After that the NPPluginFuncs vtable is used to call into the plugin. This keeps the symbols from the viewer widget and mime code from being visible outside of the plugin.
2012-08-18Add and distribute README and AUTHORSDan Nicholson4-1/+37
Add README and AUTHORS files describing the project a bit more. Distribute them by removing the foreign option from automake. This also distributes the INSTALL file, but automake will give us a stock one if none is in the directory.
2012-08-18Allow plugin installation directories to be specifiedDan Nicholson2-4/+37
Instead of always putting the plugins into ${libdir}/mozilla/plugins, allow the directories to be specified by --with-gtk2-plugindir and --with-gtk3-plugindir. This also changes the default for the gtk3 plugin to ${libdir}/epiphany/plugins until the mozilla based browsers can support gtk3 plugins.
2012-08-08Enable gtk3 when epiphany is installedDan Nicholson1-4/+7
If Epiphany is installed it's likely people would want to use the plugin with it. Turn on the gtk3 build in that case. This can still be configured explicitly with --enable/disable-gtk3.
2012-08-08Allow building both gtk2 and gtk3 versions of pluginDan Nicholson3-28/+71
To make things more useful for GNOME/epiphany, which is squarely in gtk3 land, allow building both the gtk2 and gtk3 versions of the plugin. I'm not sure what will happen when both plugin's are in the browser's path. A subsequent patch will allow finer grained control of the installation directory.
2012-08-08test: Convert previewer to socket/plugDan Nicholson4-84/+130
This plugs a big hole in the previewer test app where the widget was used differently than in the browser. Now they both get instantiated through GtkSocket/GtkPlug.
2012-06-09Update NEWS and bump version to 0.2.0 for release0.2.0Dan Nicholson2-1/+13
2012-06-09Retroactively add NEWS for 0.1.0Dan Nicholson1-0/+6
2012-06-06Optionally build against gtk3 and evince3Dan Nicholson2-9/+37
The current not ideal situation for NPAPI plugins is that only gtk2 is supported on mozilla browsers and only gtk3 is supported on epiphany. Thus, a choice needs to be made whether to link in one gtk version or the other depending on the intended usage. The viewer code is entirely compatible with gtk3 and evince3, but GtkPlug needs a little adjustment. However, the plugin immediately crashes on firefox since it's still running gtk2 and our plugin is in the same address space. To use gtk3 unconditionally we'll either need to run the plugin in a separate process like totem or just wait patiently for gtk3 to be supported by firefox. I choose the latter for now and default to gtk2 since firefox is by far the more popular browser.
2012-06-06Change library name to libevince-pluginDan Nicholson1-4/+4
This is a little more in line with other NPAPI plugins and more descriptive than libevbp.
2012-05-27Add EvbpViewer convenience library to use in testsDan Nicholson2-15/+10
Rather than build all the EvbpViewer sources twice, make a convience library for the tests to link to. This does add the unfortunate effect of relinking libevbp-viewer.la and libevbp.la every time there's a change in the source, though.
2012-05-27Add suffix to default save filename from mime rulesDan Nicholson4-7/+17
When we try to construct the filename from the document title, use the mime type mappings to get a suffix.
2012-05-27Rename mime function to match module betterDan Nicholson4-4/+4
2012-05-26Add a Open in Evince toolbar buttonDan Nicholson1-0/+41
There are many, many features available in Evince that I have no intention of supporting here. The purpose of this plugin is to display documents simply in the browser. Add a button to launch the current file in the full Evince viewer.
2012-05-26Add a Save Copy toolbar buttonDan Nicholson1-0/+83
Allow the user to save a copy of the current document. The initial directory is the XDG Downloads directory. The initial filename is the document title since the current filename is likely some temporary thing from the browser. It then falls back to the current filename, though.
2012-03-31Bump versionDan Nicholson1-1/+1
2012-03-31Create ChangeLog from git during dist0.1.0Dan Nicholson2-0/+15
This is cobbled together from Xorg and gtk. Seems to work through distcheck.