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 690593 - ui: Don't use deprecated GtkStyleContext API
ui: Don't use deprecated GtkStyleContext API
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-21 03:03 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-12-23 08:18 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ui: Don't use deprecated GtkStyleContext API (3.64 KB, patch)
2012-12-21 03:03 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
ui: Don't use deprecated GtkStyleContext API (3.91 KB, patch)
2012-12-21 17:38 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-12-21 03:03:26 UTC
See patch.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-12-21 03:03:28 UTC
Created attachment 232029 [details] [review]
ui: Don't use deprecated GtkStyleContext API

Update for deprecations.
Comment 2 Rui Matos 2012-12-21 14:36:48 UTC
Review of attachment 232029 [details] [review]:

::: src/ui/theme-viewer.c
@@ +935,2 @@
   style = gtk_widget_get_style_context (widget);
+  gtk_style_context_get (style, GTK_STATE_FLAG_NORMAL, "font", &font_desc, NULL);

Leaking font_desc here, are we not?

::: src/ui/ui.c
@@ +735,3 @@
   GtkStyleContext *style = NULL;
   PangoContext *context;
+  PangoFontDescription *font_desc, *free_font_desc = NULL;

Need to keep font_desc const or do an explicit cast below otherwise you get

ui/ui.c:742:17: error: assignment discards 'const' qualifier from pointer target type [-Werror]
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-12-21 17:38:39 UTC
Created attachment 232077 [details] [review]
ui: Don't use deprecated GtkStyleContext API

Update for deprecations.
Comment 4 Rui Matos 2012-12-21 17:49:18 UTC
Review of attachment 232077 [details] [review]:

++
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-12-23 08:18:04 UTC
Attachment 232077 [details] pushed as 4e21d5d - ui: Don't use deprecated GtkStyleContext API