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 694359 - [PATCH] Fix deprecated declaration
[PATCH] Fix deprecated declaration
Status: RESOLVED FIXED
Product: libgd
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libgd maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-02-21 13:40 UTC by Ángel Guzmán Maeso (shakaran)
Modified: 2013-02-21 23:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix deprecated declaration (1.05 KB, patch)
2013-02-21 13:40 UTC, Ángel Guzmán Maeso (shakaran)
needs-work Details | Review
New updated patch (1.63 KB, patch)
2013-02-21 14:14 UTC, Ángel Guzmán Maeso (shakaran)
committed Details | Review

Description Ángel Guzmán Maeso (shakaran) 2013-02-21 13:40:19 UTC
Created attachment 237037 [details] [review]
Fix deprecated declaration

* gd-two-lines-renderer.c: Fix deprecated declaration
gtk_style_context_get_font to gtk_style_context_get
Comment 1 Cosimo Cecchi 2013-02-21 13:47:28 UTC
Review of attachment 237037 [details] [review]:

Thanks for the patch! I have a comment below:

::: libgd/gd-two-lines-renderer.c
@@ +332,3 @@
   /* Fetch the average size of a charachter */
   context = gtk_widget_get_pango_context (widget);
+  gtk_style_context_get (style_context, 0, "font", &font_desc, NULL);

I believe if you do this, then you need to change the PangoFontDescription pointer not to be const anymore, and then later call pango_font_description_free() when you're done using it.
Comment 2 Ángel Guzmán Maeso (shakaran) 2013-02-21 14:14:01 UTC
Created attachment 237041 [details] [review]
New updated patch

Updating the patch with comments suggested
Comment 3 Cosimo Cecchi 2013-02-21 14:21:23 UTC
Review of attachment 237041 [details] [review]:

Thanks, this looks good. Do you have git commit access?
Comment 4 Ángel Guzmán Maeso (shakaran) 2013-02-21 14:31:49 UTC
No, I don't have commit access. But I am still a gnome newbie, maybe it is better if someone check my patchs/commits before to be commited. I don't want break some important application in gnome.
Comment 5 Cosimo Cecchi 2013-02-21 23:34:37 UTC
Thanks, I pushed this to master.