[Xfce4-commits] [apps/xfce4-dict] 02/02: Replace a couple of deprecated functions
noreply at xfce.org
noreply at xfce.org
Sat May 26 22:00:22 CEST 2018
This is an automated email from the git hooks/post-receive script.
a n d r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-dict.
commit 4aed4a3b3b891d11eda9ce3978dc694b470f0693
Author: Andre Miranda <andreldm at xfce.org>
Date: Sat May 26 16:59:53 2018 -0300
Replace a couple of deprecated functions
---
lib/dictd.c | 2 +-
lib/speedreader.c | 7 ++++---
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/dictd.c b/lib/dictd.c
index b46a4aa..6c4aa80 100644
--- a/lib/dictd.c
+++ b/lib/dictd.c
@@ -680,7 +680,7 @@ void dict_dictd_start_query(DictData *dd, const gchar *word)
{
if (dd->query_is_running)
{
- gdk_beep();
+ gdk_display_beep (gdk_display_get_default ());
}
else
{
diff --git a/lib/speedreader.c b/lib/speedreader.c
index a4396d6..0cd43ef 100644
--- a/lib/speedreader.c
+++ b/lib/speedreader.c
@@ -353,7 +353,7 @@ static void sr_start(XfdSpeedReader *dialog)
XfdSpeedReaderPrivate *priv = XFD_SPEED_READER_GET_PRIVATE(dialog);
gint wpm, grouping;
gint interval;
- const gchar *fontname;
+ gchar *fontname;
gchar *text, *cleaned_text;
GtkTextIter start, end;
gchar *css;
@@ -381,7 +381,7 @@ static void sr_start(XfdSpeedReader *dialog)
GTK_TOGGLE_BUTTON(priv->check_mark_paragraphs));
/* set the font */
- fontname = gtk_font_button_get_font_name(GTK_FONT_BUTTON(priv->button_font));
+ fontname = gtk_font_chooser_get_font(GTK_FONT_CHOOSER(priv->button_font));
font = pango_font_description_from_string(fontname);
if (G_LIKELY (font))
@@ -435,6 +435,7 @@ static void sr_start(XfdSpeedReader *dialog)
g_free(text);
g_free(cleaned_text);
+ g_free(fontname);
}
@@ -743,7 +744,7 @@ GtkWidget *xfd_speed_reader_new(GtkWindow *parent, DictData *dd)
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->spin_wpm), dd->speedreader_wpm);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->spin_grouping), dd->speedreader_grouping);
- gtk_font_button_set_font_name(GTK_FONT_BUTTON(priv->button_font), dd->speedreader_font);
+ gtk_font_chooser_set_font(GTK_FONT_CHOOSER(priv->button_font), dd->speedreader_font);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->check_mark_paragraphs),
dd->speedreader_mark_paragraphs);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list