summaryrefslogtreecommitdiff
path: root/logview/src/logview-window.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-08-07 14:19:06 +0200
committerraveit65 <[email protected]>2016-08-07 16:52:41 +0200
commit46d29ffcb42fab0f6e3965332cb6992c1760f14c (patch)
tree1c6657645d3febd730a187e5f4bc27263c4cbef6 /logview/src/logview-window.c
parenta3897f51ab6eea768e39c8959380caa1ae8ea215 (diff)
downloadmate-utils-46d29ffcb42fab0f6e3965332cb6992c1760f14c.tar.bz2
mate-utils-46d29ffcb42fab0f6e3965332cb6992c1760f14c.tar.xz
GTK+-3 logview-window: avoid deprecated gtk_widget_modify_font ()
Diffstat (limited to 'logview/src/logview-window.c')
-rw-r--r--logview/src/logview-window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/logview/src/logview-window.c b/logview/src/logview-window.c
index 7a78ebad..ee0bad4f 100644
--- a/logview/src/logview-window.c
+++ b/logview/src/logview-window.c
@@ -239,7 +239,11 @@ logview_set_font (LogviewWindow *logview,
font_desc = pango_font_description_from_string (fontname);
if (font_desc) {
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_override_font (logview->priv->text_view, font_desc);
+#else
gtk_widget_modify_font (logview->priv->text_view, font_desc);
+#endif
pango_font_description_free (font_desc);
}
}
@@ -254,7 +258,11 @@ logview_set_fontsize (LogviewWindow *logview, gboolean store)
context = gtk_widget_get_pango_context (priv->text_view);
fontdesc = pango_context_get_font_description (context);
pango_font_description_set_size (fontdesc, (priv->fontsize) * PANGO_SCALE);
+#if GTK_CHECK_VERSION(3,0,0)
+ gtk_widget_override_font (priv->text_view, fontdesc);
+#else
gtk_widget_modify_font (priv->text_view, fontdesc);
+#endif
if (store) {
logview_prefs_store_fontsize (logview->priv->prefs, priv->fontsize);