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 567070 - need function to check whether an elemend ID exists
need function to check whether an elemend ID exists
Status: RESOLVED FIXED
Product: librsvg
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks: 580998
 
 
Reported: 2009-01-08 19:57 UTC by Christian Persch
Modified: 2011-04-16 20:02 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
[PATCH] Bug 567070 – need function to check whether an elemend ID exists (1.95 KB, patch)
2009-01-08 19:57 UTC, Christian Persch
accepted-commit_now Details | Review

Description Christian Persch 2009-01-08 19:57:20 UTC
I need a function to check whether an element with a given ID exists in the document in a RsvgHandle. My use case for this is aisleriot's KDE card theme support code, where I check whether the SVG has the whole set of cards or is missing some of them (some KDE themes have e.g. just one joker instead of #{black,red}_joker elements, or #back{red,blue,...} variants but no #back itself.) So:

gboolean rsvg_handle_has_sub (RsvgHandle *handle, const char *id).

Not sure about that name... rsvg_handle_has_element_by_id() maybe? get_has_element_by_id()? ....
Comment 1 Christian Persch 2009-01-08 19:57:59 UTC
Created attachment 126051 [details] [review]
[PATCH] Bug 567070 – need function to check whether an elemend ID exists

 doc/rsvg-sections.txt |    1 +
 librsvg.def           |    1 +
 rsvg-base.c           |   24 ++++++++++++++++++++++++
 rsvg.h                |    2 ++
 4 files changed, 28 insertions(+), 0 deletions(-)
Comment 2 Dominic Lachowicz 2009-01-08 20:01:37 UTC
Patch approved
Comment 3 Christian Persch 2009-01-08 23:46:06 UTC
Committed; thanks!