Merge lp:~larsu/indicator-messages/dont-use-deprecated-function into lp:~indicator-applet-developers/indicator-messages/trunk.13.10

Proposed by Lars Karlitski
Status: Merged
Approved by: Ted Gould
Approved revision: 347
Merged at revision: 346
Proposed branch: lp:~larsu/indicator-messages/dont-use-deprecated-function
Merge into: lp:~indicator-applet-developers/indicator-messages/trunk.13.10
Diff against target: 31 lines (+13/-8)
1 file modified
src/ido-detail-label.c (+13/-8)
To merge this branch: bzr merge lp:~larsu/indicator-messages/dont-use-deprecated-function
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+166491@code.launchpad.net

Commit message

use gtk_style_context_get instead of deprecated gtk_style_context_get_font

Description of the change

use gtk_style_context_get instead of deprecated gtk_style_context_get_font (build hits Werror with gtk 3.8 otherwise)

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/ido-detail-label.c'
2--- src/ido-detail-label.c 2012-09-04 17:20:20 +0000
3+++ src/ido-detail-label.c 2013-05-30 11:56:29 +0000
4@@ -138,14 +138,19 @@
5 gtk_widget_get_font_metrics (GtkWidget *widget,
6 PangoContext *context)
7 {
8- const PangoFontDescription *font;
9-
10- font = gtk_style_context_get_font (gtk_widget_get_style_context (widget),
11- gtk_widget_get_state_flags (widget));
12-
13- return pango_context_get_metrics (context,
14- font,
15- pango_context_get_language (context));
16+ PangoFontDescription *font;
17+ PangoFontMetrics *metrics;
18+
19+ gtk_style_context_get (gtk_widget_get_style_context (widget),
20+ gtk_widget_get_state_flags (widget),
21+ "font", &font, NULL);
22+
23+ metrics = pango_context_get_metrics (context,
24+ font,
25+ pango_context_get_language (context));
26+
27+ pango_font_description_free (font);
28+ return metrics;
29 }
30
31 static gint

Subscribers

People subscribed via source and target branches