Re: Convert Glade 1 to Glade 2
| From: | Steph Fox | Date: | Wed, 14 Dec 2005 15:15:02 +0000 |
| Subject: | Re: Convert Glade 1 to Glade 2 | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6393@lists.php.net to get a copy of this message | ||
Maybe we just should convert that python script to a PHP script ;)
----- Original Message ----- From: "David Palomares" <david@mainsip.com>
To: "Steph Fox" <steph@zend.com>
Cc: "Anant Narayanan" <anant@kix.in>; <php-gtk-general@lists.php.net>
Sent: Wednesday, December 14, 2005 5:07 PM
Subject: Re: [PHP-GTK] Convert Glade 1 to Glade 2
Hi All, I've downloaded python2.4, and executed the libglade-convert script and it works. For those interested, i installed python on c:\python24, copy libglade-convert and the glade file to convert to this dir, and then executed, from cmd, "python.exe libglade-convert gladefile.glade > newgladefile.glade" from the c:\python24 dir. But there is still a problem with accented chars. For example, the script fails on<label>ArtÃculos -> Palm DB</label>That shows as "Artículos -> Palm DB" on glade1 for windows. The error is on the "Ã" char, and it seems related to UTF8 conversion done to output the glade2 file (it doesn't save it to a file, it output it to stdout). The error (i know this isn't a python mailing-list) is: print '%s <property name="%s"%s>%s</property>' % \ UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3: ordinal not in range(128) And it seems "Ã" (and others) isn't a ascii char. So, for we, poors no-english developers... any way to first convert the glade file to ascii without loosing the special chars? (remember, for example, the "Ã" is an accented "í"). I'll try on python and glade related sites, and post if i find a solution. Thanks, David ------------------------------------------------------------------------ Logo mainsip <http://www.mainsip.com> C/ Isabel de Farnesio Nº 20 - Local 4 || C.P. 28660 - Boadilla del Monte (Madrid) Teléfono 91 632 69 50 - Fax 91 632 69 18 www.mainsip.com <http://www.mainsip.com> - info@mainsip.com <mailto:info@mainsip.com> Steph Fox escribió:mm, and the libglade-convert script therein needs a python 2 installation. Which you can also get for windows without difficulty. You'll need a python xml parser module to run it. It _shouldn't_ alter your chars, but it's hard to know why that might be happening without knowing python. The line is simply label['label'] = text; - there's no conversion there. - Steph ----- Original Message ----- From: "Steph Fox" <steph@zend.com> To: "Anant Narayanan" <anant@kix.in>; "David Palomares" <david@mainsip.com>; <php-gtk-general@lists.php.net> Sent: Wednesday, December 14, 2005 4:00 PM Subject: Re: [PHP-GTK] Convert Glade 1 to Glade 2? There is indeed a native libglade package for windows. http://gladewin32.sourceforge.net/modules/news/ - Steph ----- Original Message ----- From: "Anant Narayanan" <anant@kix.in> To: "David Palomares" <david@mainsip.com>; <php-gtk-general@lists.php.net> Sent: Wednesday, December 14, 2005 2:39 PM Subject: Re: [PHP-GTK] Convert Glade 1 to Glade 2 Hi, You can try gnope: http://www.gnope.org/ It's fairly simple to use and deploy php-gtk2 on windows. There's no native libglade package for windows, but you can always install an emulation environment like Cygwin to the get the job done. Hope this helps, -- Anant Narayanan ------------------------- Find Freedom! http://www.kix.in/ -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php