Skip to content

Commit b65cf7b

Browse files
committed
GeanyVC: Remove GtkSpell 2.0 code
Only supports GTK+ 2.
1 parent 9df283b commit b65cf7b

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ jobs:
124124
# geanypg
125125
libgpgme-dev
126126
# geanyvc
127-
libgtkspell-dev
128127
libgtkspell3-3-dev
129128
# geaniuspaste/updatechecker
130129
libsoup2.4-dev

build/geanyvc.m4

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ AC_DEFUN([GP_CHECK_GEANYVC],
66
AC_HELP_STRING([--enable-gtkspell=ARG],
77
[Enable GtkSpell support in GeanyVC. [[default=auto]]]),,
88
enable_gtkspell=auto)
9-
GP_CHECK_GTK3([gtkspell_package=gtkspell3-3.0],
10-
[gtkspell_package=gtkspell-2.0])
9+
GTKSPELL_PACKAGE_NAME=gtkspell3-3.0
1110
if [[ x"$enable_gtkspell" = "xauto" ]]; then
12-
PKG_CHECK_MODULES(GTKSPELL, $gtkspell_package,
11+
PKG_CHECK_MODULES(GTKSPELL, ${GTKSPELL_PACKAGE_NAME},
1312
enable_gtkspell=yes, enable_gtkspell=no)
1413
elif [[ x"$enable_gtkspell" = "xyes" ]]; then
15-
PKG_CHECK_MODULES(GTKSPELL, [$gtkspell_package])
14+
PKG_CHECK_MODULES(GTKSPELL, [${GTKSPELL_PACKAGE_NAME}])
1615
fi
1716
if [[ x"$enable_gtkspell" = "xyes" ]]; then
1817
AC_DEFINE(USE_GTKSPELL, 1, [GtkSpell support])

geanyvc/src/geanyvc.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,7 @@
4141

4242
#ifdef USE_GTKSPELL
4343
#include <gtkspell/gtkspell.h>
44-
/* forward compatibility with GtkSpell3 */
45-
#if GTK_CHECK_VERSION(3, 0, 0)
46-
#define GtkSpell GtkSpellChecker
47-
#define gtkspell_set_language gtk_spell_checker_set_language
48-
static GtkSpell *gtkspell_new_attach(GtkTextView *view, const gchar *lang, GError **error)
44+
static GtkSpellChecker *gtkspell_new_attach(GtkTextView *view, const gchar *lang, GError **error)
4945
{
5046
GtkSpellChecker *speller = gtk_spell_checker_new();
5147

@@ -60,7 +56,6 @@ static GtkSpell *gtkspell_new_attach(GtkTextView *view, const gchar *lang, GErro
6056
return speller;
6157
}
6258
#endif
63-
#endif
6459

6560
GeanyData *geany_data;
6661
GeanyPlugin *geany_plugin;
@@ -1773,7 +1768,7 @@ vccommit_activated(G_GNUC_UNUSED GtkMenuItem * menuitem, G_GNUC_UNUSED gpointer
17731768
gint height;
17741769

17751770
#ifdef USE_GTKSPELL
1776-
GtkSpell *speller = NULL;
1771+
GtkSpellChecker *speller = NULL;
17771772
GError *spellcheck_error = NULL;
17781773
#endif
17791774

0 commit comments

Comments
 (0)