After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 329658 - Unable to provide pango.parse_markup with empty string for accel_marker
Unable to provide pango.parse_markup with empty string for accel_marker
Status: RESOLVED FIXED
Product: pygtk
Classification: Bindings
Component: documentation
unspecified
Other All
: Normal normal
: pygtk-2.10
Assigned To: John Finlay
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2006-02-02 19:30 UTC by Johan Svedberg
Modified: 2006-04-02 15:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Johan Svedberg 2006-02-02 19:30:56 UTC
Please describe the problem:
The docs say you should be able to pass 0 as accell_marker, i.e.

pango.parse_markup("foo", 0)

but this doesn't work:

TypeError: accel_mark must be one characterTypeError: pango.parse_markup()
argument 2 must be string or read-only buffer, not int

passing a empty string doesn't work either:

TypeError: accel_mark must be one character

I suggest we support passing None as second parameter for this.

Steps to reproduce:



Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 John Finlay 2006-02-03 04:04:34 UTC
This looks like a doc bug to me. To specify that no accel_marker is needed you have to pass the u'\x00' character. I think it would be useful to have accel_marker default to u'\x00' in a future release of PyGTK.
Comment 2 Johan (not receiving bugmail) Dahlin 2006-04-02 15:36:13 UTC
Fixed in CVS:
/cvs/gnome/gnome-python/pygtk/ChangeLog,v  <--  ChangeLog
new revision: 1.1380; previous revision: 1.1379
done
Checking in pango.override;
/cvs/gnome/gnome-python/pygtk/pango.override,v  <--  pango.override
new revision: 1.39; previous revision: 1.38
done
Checking in tests/Makefile.am;
/cvs/gnome/gnome-python/pygtk/tests/Makefile.am,v  <--  Makefile.am
new revision: 1.30; previous revision: 1.29
done
RCS file: /cvs/gnome/gnome-python/pygtk/tests/test_pango.py,v
done
Checking in tests/test_pango.py;
/cvs/gnome/gnome-python/pygtk/tests/test_pango.py,v  <--  test_pango.py
initial revision: 1.1
done