[balsa/gtk3] Port to newly released Gtkspell 3.0
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Port to newly released Gtkspell 3.0
- Date: Thu, 15 Nov 2012 02:01:47 +0000 (UTC)
commit d3fb76d1e8e6aaed7b43578254219c0f3dbca3b0
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Nov 14 21:01:08 2012 -0500
Port to newly released Gtkspell 3.0
* configure.in: renamed pkg-config file.
* src/sendmsg-window.c (sw_spell_attach), (sw_spell_detach): new
API.
ChangeLog | 10 +++++++++-
configure.in | 2 +-
src/sendmsg-window.c | 17 +++++++++--------
3 files changed, 19 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1735278..182336b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
+2012-11-14 Peter Bloomfield
+
+ Port to newly released Gtkspell 3.0
+
+ * configure.in: renamed pkg-config file.
+ * src/sendmsg-window.c (sw_spell_attach), (sw_spell_detach): new
+ API.
+
2012-10-29
-
+
* configure.in, NEWS: release 2.4.91
2012-10-22 Pawel Salek
diff --git a/configure.in b/configure.in
index 4d33ac0..3ecf2b7 100644
--- a/configure.in
+++ b/configure.in
@@ -822,7 +822,7 @@ dnl #####################################################################
# Spell check detection.
#
if test x$with_gtkspell != xno; then
- PKG_CHECK_MODULES(SPELL, [ gtkspell-3.0 enchant ])
+ PKG_CHECK_MODULES(SPELL, [ gtkspell3-3.0 enchant ])
AC_DEFINE(HAVE_GTKSPELL,1,[Defined when GtkSpell can be used.])
else
PKG_CHECK_MODULES(SPELL, [ enchant ])
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index f90ad91..4db0b29 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -6292,12 +6292,12 @@ sw_buffer_set_undo(BalsaSendmsg * bsmsg, gboolean undo, gboolean redo)
static void
sw_spell_attach(BalsaSendmsg * bsmsg)
{
- GtkSpell *spell;
+ GtkSpellChecker *spell;
GError *err = NULL;
- spell = gtkspell_new_attach(GTK_TEXT_VIEW(bsmsg->text),
- bsmsg->spell_check_lang, &err);
- if (!spell) {
+ spell = gtk_spell_checker_new();
+ gtk_spell_checker_set_language(spell, bsmsg->spell_check_lang, &err);
+ if (err) {
/* Should not happen, since we now check the language. */
balsa_information_parented(GTK_WINDOW(bsmsg->window),
LIBBALSA_INFORMATION_WARNING,
@@ -6307,17 +6307,18 @@ sw_spell_attach(BalsaSendmsg * bsmsg)
/* No spell checker, so deactivate the button. */
sw_set_active(bsmsg, "CheckSpelling", FALSE);
- }
+ } else
+ gtk_spell_checker_attach(spell, GTK_TEXT_VIEW(bsmsg->text));
}
static gboolean
sw_spell_detach(BalsaSendmsg * bsmsg)
{
- GtkSpell *spell;
+ GtkSpellChecker *spell;
- spell = gtkspell_get_from_text_view(GTK_TEXT_VIEW(bsmsg->text));
+ spell = gtk_spell_checker_get_from_text_view(GTK_TEXT_VIEW(bsmsg->text));
if (spell)
- gtkspell_detach(spell);
+ gtk_spell_checker_detach(spell);
return spell != NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]