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 434991 - pango_color_parse() should accept color format "rgb:RR/GG/BB"
pango_color_parse() should accept color format "rgb:RR/GG/BB"
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Documentation
unspecified
Other Linux
: Normal enhancement
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-05-01 20:06 UTC by Sven Arvidsson
Modified: 2008-05-24 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for rgb:RR/GG/BB (1.47 KB, patch)
2007-05-01 20:07 UTC, Sven Arvidsson
rejected Details | Review
Fix documentation for gdk_color_parse () (1.68 KB, patch)
2008-04-20 21:53 UTC, Björn Lindqvist
committed Details | Review

Description Sven Arvidsson 2007-05-01 20:06:41 UTC
[ Forwarded from http://bugs.debian.org/296939 ]

"In trying to port wmakerconf from GTK+ 1.2 to GTK+ 2.x, I have come across
the problem that wmakerconf no longer understands color strings of
the format rgb:RR/GG/BB (where RR, GG and BB are integers in hex format).
The reason is that gdk_color_parse() was formerly a wrapper around
XParseColor() and is now a wrapper around pango_color_parse().  Further
investigation reveals that pango_color_parse() has no mechanism to understand
this format of color specification.

This is annoying for two reasons: first, functionality present in an
earlier version of GTK+ has been lost for no good reason.  Second, the GTK+
API reference for version 2.8 is now misleading, since it untruthfully
states of gdk_color_parse():

	The text string can be in any of the forms accepted by XParseColor.

Please add back this functionality to pango_color_parse().  I'll submit
a patch myself if I have time in the next few days; otherwise, it doesn't
seem like a difficult job."

and

"I've spent a few minutes to write the long-ago promised patch, in case
you want to submit it upstream.  However, by this point I guess any
package that was going to be ported to gtk+2 already has been, so the
pango maintainers should feel free to downgrade this bug to "wishlist"
or close it if they want."

I'm attaching the patch, written by Kevin B. McCarty <kmccarty@Princeton.EDU>.
Comment 1 Sven Arvidsson 2007-05-01 20:07:21 UTC
Created attachment 87355 [details] [review]
patch for rgb:RR/GG/BB
Comment 2 Owen Taylor 2007-05-01 20:14:22 UTC
What is keeping you from calling XParseColor in wmakerconf? Things will
work better if you are using the same parsing function as WindowMaker 
itself.

The particular form discussed here is just one of a large
number of similar forms accepted by XParseColor(), I would suggest rejecting 
this patch.

Comment 3 Sebastian Dröge (slomo) 2008-04-14 13:02:22 UTC
In that case we should fix the gdk_color_parse() docs to say which format is accepted by the function instead of saying it supports everything that XParseColor() supports.
Comment 4 Owen Taylor 2008-04-14 13:14:56 UTC
Yeah, the docs could use improvement there. They haven't been correct since
GTK+-1.2.
Comment 5 Björn Lindqvist 2008-04-20 21:45:59 UTC
Rejecting patch because its proposed solution was not accepted.
Comment 6 Björn Lindqvist 2008-04-20 21:53:42 UTC
Created attachment 109601 [details] [review]
Fix documentation for gdk_color_parse ()

Patch to fix documentation for gdk_color_parse(). Describe the color parsing syntax exactly like pango_color_parse().
Comment 7 Matthias Clasen 2008-05-24 00:40:44 UTC
Thanks, please commit.
Comment 8 Björn Lindqvist 2008-05-24 16:52:49 UTC
Committed in r20135:

2008-05-24  Björn Lindqvist  <bjourne@gmail.com>

	* gdk/gdkcolor.c (gdk_color_parse): Update docstring to match
	pango_color_parse, do not reference XParseColor forms (#434991).