Features/Evince Introspection Bindings: Difference between revisions
No edit summary |
No edit summary |
||
| (18 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
[[Category: | [[Category:FeatureLanded|Evince Introspection Bindings]] | ||
<!-- You can add categories to tie features back to real deployments/schools requesting them, for example | <!-- You can add categories to tie features back to real deployments/schools requesting them, for example | ||
[[Category:Features requested by School Xyz|<Feature Name>]] (the |Feature Name option sorts the entry on the category page under the first letter of <Feature Name>). --> | [[Category:Features requested by School Xyz|<Feature Name>]] (the |Feature Name option sorts the entry on the category page under the first letter of <Feature Name>). --> | ||
| Line 16: | Line 15: | ||
== Current status == | == Current status == | ||
* Targeted release: 0.96 | * Targeted release: 0.96 | ||
* Last updated: | * Last updated: 31 Jan 2012 | ||
* Percentage of completion: | * Percentage of completion: 100% | ||
== Initial information == | == Initial information == | ||
* | * This feature depends on evince 3.4 (shipped in F17) | ||
* The bindings are already fixed and packaged in Fedora Rawhide | |||
and | |||
=== Implementation plan === | === Implementation plan === | ||
| Line 36: | Line 33: | ||
docmodel.set_document(doc) | docmodel.set_document(doc) | ||
e.set_model(model) | 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 === | |||
Not directly related. Evince developers have a request to support epub format [https://bugzilla.gnome.org/show_bug.cgi?id=539347]. | |||
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 == | == Benefit to Sugar == | ||
Have a working Read activity. Evince does not include the old bindings anymore. | |||
== Scope == | == Scope == | ||
| Line 50: | Line 88: | ||
== How To Test == | == How To Test == | ||
Need be tested in a F17 based image | |||
== Dependencies == | == Dependencies == | ||
Evince 3.4 | |||
== | == Release Notes == | ||
This change is a internal implementation issue. To the users should be almost equal than the previous version. | |||
== Comments and Discussion == | == Comments and Discussion == | ||
* See [[{{TALKPAGENAME}}|discussion tab for this feature]] | * See [[{{TALKPAGENAME}}|discussion tab for this feature]] | ||