[gspell/wip/inline-checker-gtv] Don't depend on GtkSourceView
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell/wip/inline-checker-gtv] Don't depend on GtkSourceView
- Date: Sun, 13 Dec 2015 13:14:12 +0000 (UTC)
commit f116046bd5b5ce35b1b70b814ae1df0e8cf230db
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sun Dec 13 14:12:24 2015 +0100
Don't depend on GtkSourceView
README | 4 ----
configure.ac | 3 +--
gspell/Makefile.am | 8 +++-----
tests/test-spell.c | 14 ++++++--------
4 files changed, 10 insertions(+), 19 deletions(-)
---
diff --git a/README b/README
index 8005830..c222e53 100644
--- a/README
+++ b/README
@@ -59,12 +59,8 @@ Dependencies
* Enchant >= 1.6.0
* GLib >= 2.44
* GTK+ >= 3.16
-* GtkSourceView >= 3.16
* iso-codes
-It is planned to remove the dependency to GtkSourceView in a future version of
-gspell.
-
Installation from a tarball
---------------------------
diff --git a/configure.ac b/configure.ac
index ff96b79..2e45f8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,7 +37,6 @@ enchant_req=1.6.0
iso_codes_req=0.35
glib_req=2.44
gtk_req=3.16
-gtksourceview_req=3.16
AC_CONFIG_SRCDIR([gspell/gspell-checker.c])
AC_CONFIG_HEADER([config.h])
@@ -74,7 +73,7 @@ AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS])
# pkg-config
AX_REQUIRE_DEFINED([AX_PKG_CHECK_MODULES])
AX_PKG_CHECK_MODULES([DEP],
- [glib-2.0 >= $glib_req gtk+-3.0 >= $gtk_req gtksourceview-3.0 >= $gtksourceview_req],
+ [glib-2.0 >= $glib_req gtk+-3.0 >= $gtk_req],
[enchant >= $enchant_req])
# iso-codes
diff --git a/gspell/Makefile.am b/gspell/Makefile.am
index 85a18b4..0a4dd27 100644
--- a/gspell/Makefile.am
+++ b/gspell/Makefile.am
@@ -119,8 +119,8 @@ Gspell_1_gir_FILES = \
$(gspell_public_c_files) \
$(BUILT_SOURCES)
-Gspell_1_gir_INCLUDES = GtkSource-3.0 Gtk-3.0
-Gspell_1_gir_PACKAGES = gtksourceview-3.0 gtk+-3.0
+Gspell_1_gir_INCLUDES = Gtk-3.0
+Gspell_1_gir_PACKAGES = gtk+-3.0
Gspell_1_gir_EXPORT_PACKAGES = gspell-1
girdir = $(datadir)/gir-1.0
@@ -142,9 +142,7 @@ gspell-1.vapi: Gspell-1.gir
VAPIGEN_VAPIS = gspell-1.vapi
-gspell_1_vapi_DEPS = \
- gtk+-3.0 \
- gtksourceview-3.0
+gspell_1_vapi_DEPS = gtk+-3.0
gspell-1.deps:
$(AM_V_GEN) for pkg in $(gspell_1_vapi_DEPS); do \
diff --git a/tests/test-spell.c b/tests/test-spell.c
index c3e1151..19a3c95 100644
--- a/tests/test-spell.c
+++ b/tests/test-spell.c
@@ -28,7 +28,7 @@ struct _TestSpell
{
GtkGrid parent;
- GtkSourceView *view;
+ GtkTextView *view;
GspellChecker *checker;
GspellInlineCheckerGtv *inline_spell;
};
@@ -68,8 +68,7 @@ checker_button_clicked_cb (GtkButton *checker_button,
g_return_if_reached ();
}
- navigator = gspell_navigator_gtv_new (GTK_TEXT_VIEW (spell->view),
- spell->checker);
+ navigator = gspell_navigator_gtv_new (spell->view, spell->checker);
checker_dialog = gspell_checker_dialog_new (GTK_WINDOW (window), navigator);
g_object_unref (navigator);
@@ -84,11 +83,11 @@ highlight_checkbutton_toggled_cb (GtkToggleButton *checkbutton,
{
if (gtk_toggle_button_get_active (checkbutton))
{
- GtkSourceBuffer *buffer;
+ GtkTextBuffer *buffer;
g_assert (spell->inline_spell == NULL);
- buffer = GTK_SOURCE_BUFFER (gtk_text_view_get_buffer (GTK_TEXT_VIEW (spell->view)));
+ buffer = gtk_text_view_get_buffer (spell->view);
/* A real application needs to check if
* gspell_checker_get_language() != NULL. If it is NULL, the
@@ -97,8 +96,7 @@ highlight_checkbutton_toggled_cb (GtkToggleButton *checkbutton,
*/
spell->inline_spell = gspell_inline_checker_gtv_new (buffer, spell->checker);
- gspell_inline_checker_gtv_attach_view (spell->inline_spell,
- GTK_TEXT_VIEW (spell->view));
+ gspell_inline_checker_gtv_attach_view (spell->inline_spell, spell->view);
}
else
{
@@ -166,7 +164,7 @@ test_spell_init (TestSpell *spell)
{
GtkWidget *scrolled_window;
- spell->view = GTK_SOURCE_VIEW (gtk_source_view_new ());
+ spell->view = gtk_text_view_new ();
spell->checker = gspell_checker_new (NULL);
gtk_orientable_set_orientation (GTK_ORIENTABLE (spell),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]