Changes

Jump to: navigation, search

Features/Evince Introspection Bindings

1,195 bytes added, 09:15, 4 November 2011
Initial information
There are a bug related https://bugzilla.gnome.org/show_bug.cgi?id=635705
the evince developers know we need it, and there are working on this. and The patches are against evince 3.4 (shipped in F17), after review of the method factory_get_document needed patches, we need look if can be backported to open a document, is marked as not introspectable https://bugzillaevince 3.gnome.org/show_bug2to update Fedora 16.cgi?id=662709
=== Implementation plan ===
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)
 
 
=== More information ===
628
edits

Navigation menu