Bug#549038: eikazo: Uses deprecated libgtkhtml2
severity 549038 serious thanks On 05/05/10 12:12, Emilio Pozuelo Monfort wrote: Err I've just looked into it and I was wrong. It doesn't use gtkhtml for the about dialog (that would be quite weird) but for the Help documentation. There are a couple of options to go from here: use WebKit/Gecko/maybe gtkhtml3, or depend on a documentation viewer (such as yelp). I'll see if I can work something out. I haven't had the time to look at it, though it shouldn't be hard to port. I'm dropping python-gtkhtml2 now, so this is RC. I'll see if I can port it, though if you can have a look at it that would be great. Cheers, Emilio -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#549038: eikazo: Uses deprecated libgtkhtml2
Emilio Pozuelo Monfort po...@debian.org wrote: Hi, I'm dropping python-gtkhtml2 now, so this is RC. I'll see if I can port it, though if you can have a look at it that would be great. Not going to happen, I'm afraid... JB. -- Julien BLACHE jbla...@debian.org | Debian, because code matters more Debian GNU/Linux Developer| http://www.debian.org Public key available on http://www.jblache.org - KeyID: F5D6 5169 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#549038: eikazo: Uses deprecated libgtkhtml2
tags 549038 + patch thanks Hi, On 21/05/10 17:43, Julien BLACHE wrote: Emilio Pozuelo Monfort po...@debian.org wrote: I'm dropping python-gtkhtml2 now, so this is RC. I'll see if I can port it, though if you can have a look at it that would be great. Not going to happen, I'm afraid... I've looked at it and here's a patch. You'll need to depend on python-webkit and drop the python-gtkhtml2 dependency. I cannot run eikazo (it refuses to start saying I have no scanners) so I've tested the Help directly with $ python /usr/share/pyshared/Eikazo/Help.py And it works fine. Let me know if you find any problems with it. Cheers, Emilio diff -ruNp eikazo-0.5.2/Eikazo/Help.py eikazo-0.5.2.new/Eikazo/Help.py --- eikazo-0.5.2/Eikazo/Help.py 2006-08-08 14:38:39.0 +0200 +++ eikazo-0.5.2.new/Eikazo/Help.py 2010-05-21 18:21:07.0 +0200 @@ -18,16 +18,12 @@ Foundation, Inc., 59 Temple Place, Suite help widget and help window -# FIXME: Where is some documentation for gtkhtml2 ??? -# couldn't find anything, neither for the C libs nor for the Python wrapper -# So the stuff here is based on the Python example and some trial and error... -# # FIXME: a decent url parser should be used instead of the wuickly # hacked stuff. import os, sys, traceback import gtk -import gtkhtml2 # FIXME: use try/except!! +import webkit # FIXME: use try/except!! import I18n t = I18n.get_translation('eikazo') @@ -42,78 +38,35 @@ class Help: self.window = None def show(self, content=None): -dir = os.path.split(__file__)[0] +dir = os.path.abspath(os.path.split(__file__)[0]) self.dir = os.path.join(dir, 'doc') fname = os.path.join(self.dir, 'index.html') +fname = file:// + fname # webkit expects an URI if not self.window: self.window = gtk.Window() self.window.set_title(_('Eikazo Help')) - -self.doc = gtkhtml2.Document() -self.doc.clear() - -self.doc.connect('request_url', self.cb_request_url) -self.doc.connect('link_clicked', self.cb_link_clicked) self.widget = gtk.ScrolledWindow() -self.view = gtkhtml2.View() +self.view = webkit.WebView() self.widget.add(self.view) self.view.show() -# when is this callback called??? -#self.view.connect('request_object', self.cb_request_object) - -self.view.set_document(self.doc) - self.window.add(self.widget) self.widget.show() self.window.connect(destroy, self.cb_destroy) self.window.set_default_size(600, 400) self.window.show_all() -self.doc.open_stream('text/html') -self.doc.write_stream(open(fname).read()) -self.doc.close_stream() +self.view.load_uri(fname) def cb_destroy(self, w): self.window = None -del self.doc del self.widget del self.view - -def cb_request_url(self, doc, url, stream): - called for img tags and when a link to an anchor is clicked - -stream.write(open(os.path.join(self.dir, url)).read()) - -def cb_link_clicked(self, doc, link): -# contains the plain link as found in an a href tag. -# we may have a filename, an anchor or a filename and an anchor -link = link.split('#') -if link[0]: -try: -fname = os.path.join(self.dir, link[0]) -text = open(fname).read() -self.doc.open_stream('text/html') -self.doc.write_stream(text) -self.doc.close_stream() -except: -# a missing file here is not important enough to crash the -# whole application. Obly print the error message -err = sys.exc_info() -print str(err[0]), str(err[1]) -traceback.print_tb(err[2]) -if len(link) 1: -self.view.jump_to_anchor(link[1]) - -#def cb_request_object(self, doc, url, stream): -## no idea hwat this is good for... -#pass - if __name__ == '__main__': h = Help() h.show() h.window.show_all() -gtk.main() \ No hay ningún carácter de nueva lÃnea al final del fichero +gtk.main()
Bug#549038: eikazo: Uses deprecated libgtkhtml2
Emilio Pozuelo Monfort po...@debian.org wrote: Hi, I've looked at it and here's a patch. You'll need to depend on python-webkit and drop the python-gtkhtml2 dependency. I cannot run eikazo (it refuses to start saying I have no scanners) so I've tested the Help directly with Let me know if you find any problems with it. I'll look into it this week-end, thanks a lot! JB. -- Julien BLACHE - Debian GNU/Linux Developer - jbla...@debian.org Public key available on http://www.jblache.org - KeyID: F5D6 5169 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#549038: eikazo: Uses deprecated libgtkhtml2
On 03/05/10 18:03, Julien BLACHE wrote: Emilio Pozuelo Monfort po...@debian.org wrote: pretty easy, eikazo uses gtkhtml2 for the about dialog, but there's gtk.AboutDialog that should be used instead (and is much easier than gtkhtml2). Could you look into it and propose a patch? That would help a lot in the current situation. Err I've just looked into it and I was wrong. It doesn't use gtkhtml for the about dialog (that would be quite weird) but for the Help documentation. There are a couple of options to go from here: use WebKit/Gecko/maybe gtkhtml3, or depend on a documentation viewer (such as yelp). I'll see if I can work something out. Emilio -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#549038: eikazo: Uses deprecated libgtkhtml2
Package: eikazo Severity: normal Julien BLACHE wrote: Forwarded upstream, should have something in a couple weeks. How about that? Did you hear from upstream? The change should be pretty easy, eikazo uses gtkhtml2 for the about dialog, but there's gtk.AboutDialog that should be used instead (and is much easier than gtkhtml2). Emilio -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#549038: eikazo: Uses deprecated libgtkhtml2
Emilio Pozuelo Monfort po...@debian.org wrote: Hi, Forwarded upstream, should have something in a couple weeks. How about that? Did you hear from upstream? The change should be Yes; unfortunately it did not work out as planned for reasons that don't belong here. pretty easy, eikazo uses gtkhtml2 for the about dialog, but there's gtk.AboutDialog that should be used instead (and is much easier than gtkhtml2). Could you look into it and propose a patch? That would help a lot in the current situation. Thanks, JB. -- Julien BLACHE - Debian GNU/Linux Developer - jbla...@debian.org Public key available on http://www.jblache.org - KeyID: F5D6 5169 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#549038: eikazo: Uses deprecated libgtkhtml2
forwarded 549038 adeur...@gmx.net thanks j...@debian.org wrote: Hi, I suggest that you migrate eikazo as soon as possible to use webkit for rendering. For most packages, which use libgtkhtml2 in a simple way, porting should be trivial - and even more so for those written in Python. Forwarded upstream, should have something in a couple weeks. JB. -- Julien BLACHE - Debian GNU/Linux Developer - jbla...@debian.org Public key available on http://www.jblache.org - KeyID: F5D6 5169 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org