Article View: news.software.readers
Article #165533Re: [XPN 0.4.5] Type Error
From: Nemesis
Date: Mon, 18 Apr 2005 19:13
Date: Mon, 18 Apr 2005 19:13
65 lines
4129 bytes
4129 bytes
Mentre io pensavo ad una intro simpatica "Patrick Lamaizière" scriveva:
[Error #1]
> I've got a "TypeError" with Xpn :
> ./xpn.py:2145: GtkDeprecationWarning: gtk.FALSE is deprecated, use False
[cut]
[Error #2]
> TypeError: flag values must be strings, ints or tuples
[cut]
> I use gtk-2.6.7, py24-gtk-2.6.1, python-2.4.1 under FreeBSD (5.4RC2)
> May be a version problem between py24-gtk-2.6.1 and gtk-2.6.7 ?
> Thanks.
Hi Patrick,
You these issues are related to pygtk2.6. Something changed passing from
pygtk2.4 to pygtk2.6, until now I wasn't able to try XPN with
pygtk2.6/gtk2.6, but now I got them working on Windows and I'm working
to solve these problems.
By the way, the former is only a deprecation warning it shouldn't
prevent XPN working.
The latter is a real error (caused by a change in the pygtk API), if you
want you can try to solve this problem modifying the "insert_menu_item"
method, you can find it in xpn_src/Menubar.py.
This is "insert_menu_item" before the change:
--------------------------------------------------------------------------------------------------------
def insert_menu_item(self,menu,name,image_name,accel_group,accel_key,modifier):
menuitem=gtk.ImageMenuItem(name)
image=gtk.Image()
image.set_from_file("pixmaps/"+image_name)
menuitem.set_image(image)
menuitem.set_border_width(2)
menu.append(menuitem)
if accel_key:
menuitem.add_accelerator("activate",accel_group,ord(accel_key), modifier, gtk.ACCEL_VISIBLE)
return menuitem
--------------------------------------------------------------------------------------------------------
and this is "insert_menu_item" after the change:
--------------------------------------------------------------------------------------------------------
def insert_menu_item(self,menu,name,image_name,accel_group,accel_key,modifier):
menuitem=gtk.ImageMenuItem(name)
image=gtk.Image()
image.set_from_file("pixmaps/"+image_name)
menuitem.set_image(image)
menuitem.set_border_width(2)
menu.append(menuitem)
if accel_key:
if modifier==gtk.FALSE: modifier=0
menuitem.add_accelerator("activate",accel_group,ord(accel_key), modifier, gtk.ACCEL_VISIBLE)
return menuitem
--------------------------------------------------------------------------------------------------------
This little change should solve the problem. If you can't get it working
contact me, I may send you a correct version I'm working on. I think
I'll release it in the next month with some little changes.
--
I've got to sit down and work out where I stand.
|\ | |HomePage : http://nem01.altervista.org
| \|emesis |XPN (my nr): http://xpn.altervista.org
Technical Details
Message-ID:
<20050418181447.2115.690.XPN@orion.homeinvalid>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!fr.ip.ndsoftware.net!news.newsland.it!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mailReferences:
<Xns38FF773BAB3F5plam@nulle.invalid>Show Full Headers
Complete Article Headers
Message-ID: <20050418181447.2115.690.XPN@orion.homeinvalid>
Subject: Re: [XPN 0.4.5] Type Error
Date: Mon, 18 Apr 2005 19:13:12 GMT
From: Nemesis <nemesis@nowhere.invalid>
References: <Xns38FF773BAB3F5plam@nulle.invalid>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.ams.giganews.com!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!fr.ip.ndsoftware.net!news.newsland.it!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail
Newsgroups: news.software.readers
User-Agent: XPN/0.4.5 (It was my idea? ; Linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Face: "=~[{Do2qU|>g#w5%KfRN.!iS]mP!fd77;
SvQ=}2S3k}-$hVRw^4>b|(}:a"b\)mX{=)5qLdm$?eUX~eZ+A2p(eptnM79skBz`q6TZ%OhRjni*Eo,*75oc}PJ?Kwh!Spd7l<)@M~/3",y%4Qq0XEqjNL0z&vuS}
Lines: 65
NNTP-Posting-Host: 151.26.88.247
X-Complaints-To: abuse@libero.it
X-Trace: twister1.libero.it 1113851592 151.26.88.247 (Mon,
NNTP-Posting-Date: Mon, 18 Apr 2005 21:13:12 MET DST
Organization: [Infostrada]