[gspell/wip/text-view] Rename NavigatorText -> NavigatorTextView
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell/wip/text-view] Rename NavigatorText -> NavigatorTextView
- Date: Mon, 1 Feb 2016 13:06:27 +0000 (UTC)
commit e62f68c9e812c2799a2f1c9bb924ea306c045960
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon Feb 1 13:53:19 2016 +0100
Rename NavigatorText -> NavigatorTextView
This time is the good one.
docs/reference/gspell-1.0-sections.txt | 12 +-
docs/reference/gspell-docs.xml | 2 +-
gspell/Makefile.am | 4 +-
...vigator-text.c => gspell-navigator-text-view.c} | 130 ++++++++++----------
...vigator-text.h => gspell-navigator-text-view.h} | 18 ++--
gspell/gspell-navigator.c | 2 +-
gspell/gspell.h | 2 +-
po/POTFILES.in | 2 +-
tests/test-spell.c | 2 +-
9 files changed, 87 insertions(+), 87 deletions(-)
---
diff --git a/docs/reference/gspell-1.0-sections.txt b/docs/reference/gspell-1.0-sections.txt
index de926e7..589d403 100644
--- a/docs/reference/gspell-1.0-sections.txt
+++ b/docs/reference/gspell-1.0-sections.txt
@@ -79,13 +79,13 @@ GSPELL_TYPE_NAVIGATOR
</SECTION>
<SECTION>
-<FILE>navigator-text</FILE>
-<TITLE>GspellNavigatorText</TITLE>
-GspellNavigatorText
-gspell_navigator_text_new
+<FILE>navigator-text-view</FILE>
+<TITLE>GspellNavigatorTextView</TITLE>
+GspellNavigatorTextView
+gspell_navigator_text_view_new
<SUBSECTION Standard>
-GSPELL_TYPE_NAVIGATOR_TEXT
-GspellNavigatorTextClass
+GSPELL_TYPE_NAVIGATOR_TEXT_VIEW
+GspellNavigatorTextViewClass
</SECTION>
<SECTION>
diff --git a/docs/reference/gspell-docs.xml b/docs/reference/gspell-docs.xml
index d3bee8e..da0f159 100644
--- a/docs/reference/gspell-docs.xml
+++ b/docs/reference/gspell-docs.xml
@@ -35,7 +35,7 @@
<title>External Checkers</title>
<xi:include href="xml/checker-dialog.xml"/>
<xi:include href="xml/navigator.xml"/>
- <xi:include href="xml/navigator-text.xml"/>
+ <xi:include href="xml/navigator-text-view.xml"/>
</chapter>
<chapter>
diff --git a/gspell/Makefile.am b/gspell/Makefile.am
index 72547a6..fc3a5b6 100644
--- a/gspell/Makefile.am
+++ b/gspell/Makefile.am
@@ -25,7 +25,7 @@ gspell_public_headers = \
gspell-language-chooser-button.h \
gspell-language-chooser-dialog.h \
gspell-navigator.h \
- gspell-navigator-text.h \
+ gspell-navigator-text-view.h \
gspell-text-buffer.h
gspell_public_c_files = \
@@ -37,7 +37,7 @@ gspell_public_c_files = \
gspell-language-chooser-button.c \
gspell-language-chooser-dialog.c \
gspell-navigator.c \
- gspell-navigator-text.c \
+ gspell-navigator-text-view.c \
gspell-text-buffer.c
gspell_private_headers = \
diff --git a/gspell/gspell-navigator-text.c b/gspell/gspell-navigator-text-view.c
similarity index 75%
rename from gspell/gspell-navigator-text.c
rename to gspell/gspell-navigator-text-view.c
index 87ccc85..1a8f66d 100644
--- a/gspell/gspell-navigator-text.c
+++ b/gspell/gspell-navigator-text-view.c
@@ -1,7 +1,7 @@
/*
* This file is part of gspell, a spell-checking library.
*
- * Copyright 2015 - Sébastien Wilmet <swilmet gnome org>
+ * Copyright 2015, 2016 - Sébastien Wilmet <swilmet gnome org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -18,18 +18,18 @@
*/
#include "config.h"
-#include "gspell-navigator-text.h"
+#include "gspell-navigator-text-view.h"
#include <glib/gi18n-lib.h>
#include "gspell-text-buffer.h"
#include "gspell-utils.h"
/**
- * SECTION:navigator-text
+ * SECTION:navigator-text-view
* @Short_description: A GspellNavigator implementation for GtkTextView
- * @Title: GspellNavigatorText
+ * @Title: GspellNavigatorTextView
* @See_also: #GspellNavigator, #GspellCheckerDialog
*
- * #GspellNavigatorText is a simple implementation of the
+ * #GspellNavigatorTextView is a simple implementation of the
* #GspellNavigator interface for the #GtkTextView widget.
*
* If a selection exists in the #GtkTextView, only the selected text is spell
@@ -46,9 +46,9 @@
* #GspellChecker to the #GtkTextBuffer.
*/
-typedef struct _GspellNavigatorTextPrivate GspellNavigatorTextPrivate;
+typedef struct _GspellNavigatorTextViewPrivate GspellNavigatorTextViewPrivate;
-struct _GspellNavigatorTextPrivate
+struct _GspellNavigatorTextViewPrivate
{
GtkTextView *view;
GtkTextBuffer *buffer;
@@ -70,21 +70,21 @@ enum
static void gspell_navigator_iface_init (gpointer g_iface, gpointer iface_data);
-G_DEFINE_TYPE_WITH_CODE (GspellNavigatorText,
- gspell_navigator_text,
+G_DEFINE_TYPE_WITH_CODE (GspellNavigatorTextView,
+ gspell_navigator_text_view,
G_TYPE_OBJECT,
- G_ADD_PRIVATE (GspellNavigatorText)
+ G_ADD_PRIVATE (GspellNavigatorTextView)
G_IMPLEMENT_INTERFACE (GSPELL_TYPE_NAVIGATOR,
gspell_navigator_iface_init))
static void
-init_boundaries (GspellNavigatorText *navigator)
+init_boundaries (GspellNavigatorTextView *navigator)
{
- GspellNavigatorTextPrivate *priv;
+ GspellNavigatorTextViewPrivate *priv;
GtkTextIter start;
GtkTextIter end;
- priv = gspell_navigator_text_get_instance_private (navigator);
+ priv = gspell_navigator_text_view_get_instance_private (navigator);
g_return_if_fail (priv->start_boundary == NULL);
g_return_if_fail (priv->end_boundary == NULL);
@@ -111,12 +111,12 @@ init_boundaries (GspellNavigatorText *navigator)
}
static void
-set_view (GspellNavigatorText *navigator,
- GtkTextView *view)
+set_view (GspellNavigatorTextView *navigator,
+ GtkTextView *view)
{
- GspellNavigatorTextPrivate *priv;
+ GspellNavigatorTextViewPrivate *priv;
- priv = gspell_navigator_text_get_instance_private (navigator);
+ priv = gspell_navigator_text_view_get_instance_private (navigator);
g_return_if_fail (priv->view == NULL);
g_return_if_fail (priv->buffer == NULL);
@@ -130,14 +130,14 @@ set_view (GspellNavigatorText *navigator,
}
static void
-gspell_navigator_text_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+gspell_navigator_text_view_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
- GspellNavigatorTextPrivate *priv;
+ GspellNavigatorTextViewPrivate *priv;
- priv = gspell_navigator_text_get_instance_private (GSPELL_NAVIGATOR_TEXT (object));
+ priv = gspell_navigator_text_view_get_instance_private (GSPELL_NAVIGATOR_TEXT_VIEW (object));
switch (prop_id)
{
@@ -152,12 +152,12 @@ gspell_navigator_text_get_property (GObject *object,
}
static void
-gspell_navigator_text_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+gspell_navigator_text_view_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
- GspellNavigatorText *navigator = GSPELL_NAVIGATOR_TEXT (object);
+ GspellNavigatorTextView *navigator = GSPELL_NAVIGATOR_TEXT_VIEW (object);
switch (prop_id)
{
@@ -172,11 +172,11 @@ gspell_navigator_text_set_property (GObject *object,
}
static void
-gspell_navigator_text_dispose (GObject *object)
+gspell_navigator_text_view_dispose (GObject *object)
{
- GspellNavigatorTextPrivate *priv;
+ GspellNavigatorTextViewPrivate *priv;
- priv = gspell_navigator_text_get_instance_private (GSPELL_NAVIGATOR_TEXT (object));
+ priv = gspell_navigator_text_view_get_instance_private (GSPELL_NAVIGATOR_TEXT_VIEW (object));
g_clear_object (&priv->view);
@@ -210,20 +210,20 @@ gspell_navigator_text_dispose (GObject *object)
priv->buffer = NULL;
}
- G_OBJECT_CLASS (gspell_navigator_text_parent_class)->dispose (object);
+ G_OBJECT_CLASS (gspell_navigator_text_view_parent_class)->dispose (object);
}
static void
-gspell_navigator_text_class_init (GspellNavigatorTextClass *klass)
+gspell_navigator_text_view_class_init (GspellNavigatorTextViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->get_property = gspell_navigator_text_get_property;
- object_class->set_property = gspell_navigator_text_set_property;
- object_class->dispose = gspell_navigator_text_dispose;
+ object_class->get_property = gspell_navigator_text_view_get_property;
+ object_class->set_property = gspell_navigator_text_view_set_property;
+ object_class->dispose = gspell_navigator_text_view_dispose;
/**
- * GspellNavigatorText:view:
+ * GspellNavigatorTextView:view:
*
* The #GtkTextView. The buffer is not sufficient, the view is needed to
* scroll to the misspelled words.
@@ -240,18 +240,18 @@ gspell_navigator_text_class_init (GspellNavigatorTextClass *klass)
}
static void
-gspell_navigator_text_init (GspellNavigatorText *self)
+gspell_navigator_text_view_init (GspellNavigatorTextView *self)
{
}
static void
-select_misspelled_word (GspellNavigatorText *navigator)
+select_misspelled_word (GspellNavigatorTextView *navigator)
{
- GspellNavigatorTextPrivate *priv;
+ GspellNavigatorTextViewPrivate *priv;
GtkTextIter word_start;
GtkTextIter word_end;
- priv = gspell_navigator_text_get_instance_private (navigator);
+ priv = gspell_navigator_text_view_get_instance_private (navigator);
gtk_text_buffer_get_iter_at_mark (priv->buffer, &word_start, priv->word_start);
gtk_text_buffer_get_iter_at_mark (priv->buffer, &word_end, priv->word_end);
@@ -269,18 +269,18 @@ select_misspelled_word (GspellNavigatorText *navigator)
}
static gboolean
-gspell_navigator_text_goto_next (GspellNavigator *navigator,
- gchar **word_p,
- GspellChecker **spell_checker_p,
- GError **error_p)
+gspell_navigator_text_view_goto_next (GspellNavigator *navigator,
+ gchar **word_p,
+ GspellChecker **spell_checker_p,
+ GError **error_p)
{
- GspellNavigatorTextPrivate *priv;
+ GspellNavigatorTextViewPrivate *priv;
GspellChecker *spell_checker;
GtkTextIter word_start;
GtkTextIter end;
GtkTextTag *no_spell_check_tag;
- priv = gspell_navigator_text_get_instance_private (GSPELL_NAVIGATOR_TEXT (navigator));
+ priv = gspell_navigator_text_view_get_instance_private (GSPELL_NAVIGATOR_TEXT_VIEW (navigator));
g_assert ((priv->word_start == NULL && priv->word_end == NULL) ||
(priv->word_start != NULL && priv->word_end != NULL));
@@ -393,7 +393,7 @@ gspell_navigator_text_goto_next (GspellNavigator *navigator,
gtk_text_buffer_move_mark (priv->buffer, priv->word_start, &word_start);
gtk_text_buffer_move_mark (priv->buffer, priv->word_end, &word_end);
- select_misspelled_word (GSPELL_NAVIGATOR_TEXT (navigator));
+ select_misspelled_word (GSPELL_NAVIGATOR_TEXT_VIEW (navigator));
if (spell_checker_p != NULL)
{
@@ -420,16 +420,16 @@ gspell_navigator_text_goto_next (GspellNavigator *navigator,
}
static void
-gspell_navigator_text_change (GspellNavigator *navigator,
- const gchar *word,
- const gchar *change_to)
+gspell_navigator_text_view_change (GspellNavigator *navigator,
+ const gchar *word,
+ const gchar *change_to)
{
- GspellNavigatorTextPrivate *priv;
+ GspellNavigatorTextViewPrivate *priv;
GtkTextIter word_start;
GtkTextIter word_end;
gchar *word_in_buffer = NULL;
- priv = gspell_navigator_text_get_instance_private (GSPELL_NAVIGATOR_TEXT (navigator));
+ priv = gspell_navigator_text_view_get_instance_private (GSPELL_NAVIGATOR_TEXT_VIEW (navigator));
g_return_if_fail (GTK_IS_TEXT_MARK (priv->word_start));
g_return_if_fail (GTK_IS_TEXT_MARK (priv->word_end));
@@ -451,14 +451,14 @@ gspell_navigator_text_change (GspellNavigator *navigator,
}
static void
-gspell_navigator_text_change_all (GspellNavigator *navigator,
- const gchar *word,
- const gchar *change_to)
+gspell_navigator_text_view_change_all (GspellNavigator *navigator,
+ const gchar *word,
+ const gchar *change_to)
{
- GspellNavigatorTextPrivate *priv;
+ GspellNavigatorTextViewPrivate *priv;
GtkTextIter iter;
- priv = gspell_navigator_text_get_instance_private (GSPELL_NAVIGATOR_TEXT (navigator));
+ priv = gspell_navigator_text_view_get_instance_private (GSPELL_NAVIGATOR_TEXT_VIEW (navigator));
g_return_if_fail (GTK_IS_TEXT_MARK (priv->start_boundary));
g_return_if_fail (GTK_IS_TEXT_MARK (priv->end_boundary));
@@ -508,23 +508,23 @@ gspell_navigator_iface_init (gpointer g_iface,
{
GspellNavigatorInterface *iface = g_iface;
- iface->goto_next = gspell_navigator_text_goto_next;
- iface->change = gspell_navigator_text_change;
- iface->change_all = gspell_navigator_text_change_all;
+ iface->goto_next = gspell_navigator_text_view_goto_next;
+ iface->change = gspell_navigator_text_view_change;
+ iface->change_all = gspell_navigator_text_view_change_all;
}
/**
- * gspell_navigator_text_new:
+ * gspell_navigator_text_view_new:
* @view: a #GtkTextView.
*
- * Returns: (transfer full): a new #GspellNavigatorText object.
+ * Returns: (transfer full): a new #GspellNavigatorTextView object.
*/
GspellNavigator *
-gspell_navigator_text_new (GtkTextView *view)
+gspell_navigator_text_view_new (GtkTextView *view)
{
g_return_val_if_fail (GTK_IS_TEXT_VIEW (view), NULL);
- return g_object_new (GSPELL_TYPE_NAVIGATOR_TEXT,
+ return g_object_new (GSPELL_TYPE_NAVIGATOR_TEXT_VIEW,
"view", view,
NULL);
}
diff --git a/gspell/gspell-navigator-text.h b/gspell/gspell-navigator-text-view.h
similarity index 69%
rename from gspell/gspell-navigator-text.h
rename to gspell/gspell-navigator-text-view.h
index 0cc7801..052d8bd 100644
--- a/gspell/gspell-navigator-text.h
+++ b/gspell/gspell-navigator-text-view.h
@@ -1,7 +1,7 @@
/*
* This file is part of gspell, a spell-checking library.
*
- * Copyright 2015 - Sébastien Wilmet <swilmet gnome org>
+ * Copyright 2015, 2016 - Sébastien Wilmet <swilmet gnome org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -17,8 +17,8 @@
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GSPELL_NAVIGATOR_TEXT_H__
-#define __GSPELL_NAVIGATOR_TEXT_H__
+#ifndef __GSPELL_NAVIGATOR_TEXT_VIEW_H__
+#define __GSPELL_NAVIGATOR_TEXT_VIEW_H__
#if !defined (__GSPELL_H_INSIDE__) && !defined (GSPELL_COMPILATION)
#error "Only <gspell/gspell.h> can be included directly."
@@ -30,12 +30,12 @@
G_BEGIN_DECLS
-#define GSPELL_TYPE_NAVIGATOR_TEXT (gspell_navigator_text_get_type ())
-G_DECLARE_DERIVABLE_TYPE (GspellNavigatorText, gspell_navigator_text,
- GSPELL, NAVIGATOR_TEXT,
+#define GSPELL_TYPE_NAVIGATOR_TEXT_VIEW (gspell_navigator_text_view_get_type ())
+G_DECLARE_DERIVABLE_TYPE (GspellNavigatorTextView, gspell_navigator_text_view,
+ GSPELL, NAVIGATOR_TEXT_VIEW,
GObject)
-struct _GspellNavigatorTextClass
+struct _GspellNavigatorTextViewClass
{
GObjectClass parent_class;
@@ -43,10 +43,10 @@ struct _GspellNavigatorTextClass
gpointer padding[8];
};
-GspellNavigator * gspell_navigator_text_new (GtkTextView *view);
+GspellNavigator * gspell_navigator_text_view_new (GtkTextView *view);
G_END_DECLS
-#endif /* __GSPELL_NAVIGATOR_TEXT_H__ */
+#endif /* __GSPELL_NAVIGATOR_TEXT_VIEW_H__ */
/* ex:set ts=8 noet: */
diff --git a/gspell/gspell-navigator.c b/gspell/gspell-navigator.c
index 564bae7..abc9f91 100644
--- a/gspell/gspell-navigator.c
+++ b/gspell/gspell-navigator.c
@@ -23,7 +23,7 @@
* SECTION:navigator
* @Short_description: Interface to navigate through misspelled words
* @Title: GspellNavigator
- * @See_also: #GspellNavigatorText, #GspellCheckerDialog
+ * @See_also: #GspellNavigatorTextView, #GspellCheckerDialog
*
* #GspellNavigator is an interface to navigate through misspelled words,
* and correct the mistakes.
diff --git a/gspell/gspell.h b/gspell/gspell.h
index 3c3641b..6976cab 100644
--- a/gspell/gspell.h
+++ b/gspell/gspell.h
@@ -30,7 +30,7 @@
#include <gspell/gspell-language-chooser-button.h>
#include <gspell/gspell-language-chooser-dialog.h>
#include <gspell/gspell-navigator.h>
-#include <gspell/gspell-navigator-text.h>
+#include <gspell/gspell-navigator-text-view.h>
#include <gspell/gspell-text-buffer.h>
#undef __GSPELL_H_INSIDE__
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 71ae3d8..23f1f65 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -9,7 +9,7 @@ gspell/gspell-language-chooser.c
gspell/gspell-language-chooser-button.c
gspell/gspell-language-chooser-dialog.c
gspell/gspell-navigator.c
-gspell/gspell-navigator-text.c
+gspell/gspell-navigator-text-view.c
gspell/gspell-osx.c
gspell/gspell-text-buffer.c
gspell/gspell-utils.c
diff --git a/tests/test-spell.c b/tests/test-spell.c
index a757fc9..b0a4c3f 100644
--- a/tests/test-spell.c
+++ b/tests/test-spell.c
@@ -59,7 +59,7 @@ checker_button_clicked_cb (GtkButton *checker_button,
g_return_if_reached ();
}
- navigator = gspell_navigator_text_new (spell->view);
+ navigator = gspell_navigator_text_view_new (spell->view);
checker_dialog = gspell_checker_dialog_new (GTK_WINDOW (window), navigator);
g_object_unref (navigator);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]