Features/Evince Introspection Bindings
The pygtk bindings used until F14 to use the evince backend in Read activity, are no longer present in F16. We need use the new gi based bindings
- Targeted release: 0.96
- Last updated: 31 Jan 2012
- Percentage of completion: 90%
- This feature depends on evince 3.4 (shipped in F17)
- The bindings are already fixed and packaged in Fedora Rawhide
The first step is port this simple demo to gtk3:
e = evince.View() docmodel = evince.DocumentModel() doc = evince.document_factory_get_document('file:///path/to/file/example.pdf') docmodel.set_document(doc) e.set_model(model)
With gtk 3 is:
from gi.repository import Gtk, Gio from gi.repository import EvinceDocument from gi.repository import EvinceView
class HelloWorldApp(Gtk.Application): def __init__(self): Gtk.Application.__init__(self, application_id="apps.test.helloevince", flags=Gio.ApplicationFlags.FLAGS_NONE) self.connect("activate", self.on_activate) def on_activate(self, data=None): window = Gtk.Window(type=Gtk.WindowType.TOPLEVEL) window.set_title("Evince Gtk3 Python Example") window.set_border_width(24)
scroll = Gtk.ScrolledWindow() window.add(scroll)
EvinceDocument.init() doc = EvinceDocument.Document.factory_get_document('file:///home/gonzalo/Desktop/AjedrezyLeyendas-Postmortem.pdf') view = EvinceView.View() model = EvinceView.DocumentModel() model.set_document(doc) view.set_model(model) scroll.add(view)
window.show_all() self.add_window(window) if __name__ == "__main__": app = HelloWorldApp() app.run(None)
Not directly related. Evince developers have a request to support epub format .
We are implementing our own epub reader displaying it with webkit. If implemented in evince, we can simplify our code a lot.
Benefit to Sugar
Have a working Read activity. Evince does not include the old bindings anymore.
What work do the developers have to accomplish to complete the feature in time for release? Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?
Does the feature have a direct impact on the work flow, or does it need a UI? Link here mockups, or add detailed descriptions.
How To Test
If this feature is noticeable by its target audience, how will their experiences change as a result? Describe what they will see or notice.
Is there upstream documentation on this feature, or notes you have written yourself? Has this topic been discussed in the mailing list or during a meeting? Link to that material here so other interested developers can get involved.
The Sugar Release Notes inform end-users about what is new in the release. An Example is 0.84/Notes. The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns. If there are any such changes involved in this feature, indicate them here. You can also link to upstream documentation if it satisfies this need. This information forms the basis of the release notes edited by the release team and shipped with the release.