[libwnck] TaskList: get rid of deprecated code
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck] TaskList: get rid of deprecated code
- Date: Fri, 19 Jul 2013 01:05:19 +0000 (UTC)
commit 3c403ebe9bf250e5deba86e435929bedf107e417
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Fri Jul 19 03:04:50 2013 +0200
TaskList: get rid of deprecated code
libwnck/tasklist.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 11b4e5c..ce74b37 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -1162,16 +1162,17 @@ wnck_tasklist_get_button_size (GtkWidget *widget)
GtkStateFlags state;
PangoContext *context;
PangoFontMetrics *metrics;
+ PangoFontDescription *description;
gint char_width;
gint text_width;
gint width;
style_context = gtk_widget_get_style_context (widget);
state = gtk_widget_get_state_flags (widget);
+ gtk_style_context_get (style_context, state, GTK_STYLE_PROPERTY_FONT, &description, NULL);
context = gtk_widget_get_pango_context (widget);
- metrics = pango_context_get_metrics (context,
- gtk_style_context_get_font (style_context, state),
+ metrics = pango_context_get_metrics (context, description,
pango_context_get_language (context));
char_width = pango_font_metrics_get_approximate_char_width (metrics);
pango_font_metrics_unref (metrics);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]