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 605764 - No pointer or deeper explanation in description of deprecated function.
No pointer or deeper explanation in description of deprecated function.
Status: RESOLVED NOTABUG
Product: gtksourceview
Classification: Platform
Component: General
2.9.x
Other Linux
: Normal minor
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2009-12-30 22:04 UTC by Krzesimir Nowak
Modified: 2010-01-06 11:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Krzesimir Nowak 2009-12-30 22:04:25 UTC
gtk_source_view_get_mark_category_pixbuf() is deprecated since 2.8, but contrary to also deprecated gtk_source_view_set_mark_category_pixbuf(), it does not have in its description which function should be used instead.

In C++ bindings, when a C function gets deprecated, we mark respective method as deprecated, but inside this method a nondeprecated function is used. For example:

deprecated C function: gtk_source_view_set_mark_category_pixbuf()
deprecated C++ method: SourceView::set_mark_category_pixbuf() which internally calls gtk_source_view_set_mark_category_icon_from_pixbuf().

I have no idea (didn't investigated it thoroughly though) which nondeprecated function to use in place of gtk_source_view_get_mark_category_pixbuf().

It would be useful to know since distcheck in C++ bindings using mm-common uses nitpicky flags with -Werror, so compilation ends with warning about using deprecated function.

Thanks.
Comment 1 Paolo Borelli 2009-12-30 22:44:12 UTC
Well, the fact is that when we added the old api we didn't think much about it and jsut added the getter. But when we revised the api to add different ways to set the image, we felt that adding all the getters was not a good idea (eg: what would get_icon_name give you if you set the icon using a pixbuf etc).

We also could not think of any use cases where you need the getter, so we simply decided to drop it and deprecate the old function.

So in this case there is no replacement
Comment 2 Krzesimir Nowak 2010-01-05 13:10:59 UTC
Thanks for explanation. In the end, I decided to change behaviour of get_mark_category_pixbuf() method to return an empty Glib::RefPtr<Gdk::Pixbuf>.
Comment 3 Paolo Borelli 2010-01-06 11:12:10 UTC
I guess we can close this.