[gspell/wip/inline-checker] Rename InlineCheckerText -> InlineCheckerTextView



commit de02e89e4ee3429255f31a009a0dffb361543bb3
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Jan 6 14:43:28 2016 +0100

    Rename InlineCheckerText -> InlineCheckerTextView
    
    For symmetry with InlineCheckerTextBuffer.

 docs/reference/Makefile.am                         |    2 +-
 gspell/Makefile.am                                 |    4 +-
 ...er-text.c => gspell-inline-checker-text-view.c} |   80 +++++++++++---------
 ...er-text.h => gspell-inline-checker-text-view.h} |   16 ++--
 gspell/gspell-text-view.c                          |    4 +-
 po/POTFILES.in                                     |    2 +-
 6 files changed, 57 insertions(+), 51 deletions(-)
---
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 4a3f74b..d4576e1 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -21,8 +21,8 @@ CFILE_GLOB = $(top_srcdir)/gspell/*.c
 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
 IGNORE_HFILES =                                        \
        gspell-buffer-notifier.h                \
-       gspell-inline-checker-text.h            \
        gspell-inline-checker-text-buffer.h     \
+       gspell-inline-checker-text-view.h       \
        gspell-osx.h                            \
        gspell-utils.h                          \
        gtktextregion.h
diff --git a/gspell/Makefile.am b/gspell/Makefile.am
index b717bca..d2274bb 100644
--- a/gspell/Makefile.am
+++ b/gspell/Makefile.am
@@ -43,16 +43,16 @@ gspell_public_c_files =                             \
 gspell_private_headers =                       \
        gconstructor.h                          \
        gspell-buffer-notifier.h                \
-       gspell-inline-checker-text.h            \
        gspell-inline-checker-text-buffer.h     \
+       gspell-inline-checker-text-view.h       \
        gspell-utils.h                          \
        gtktextregion.h
 
 gspell_private_c_files =                       \
        gspell-buffer-notifier.c                \
        gspell-init.c                           \
-       gspell-inline-checker-text.c            \
        gspell-inline-checker-text-buffer.c     \
+       gspell-inline-checker-text-view.c       \
        gspell-utils.c                          \
        gtktextregion.c
 
diff --git a/gspell/gspell-inline-checker-text.c b/gspell/gspell-inline-checker-text-view.c
similarity index 56%
rename from gspell/gspell-inline-checker-text.c
rename to gspell/gspell-inline-checker-text-view.c
index ce8ed11..02657e5 100644
--- a/gspell/gspell-inline-checker-text.c
+++ b/gspell/gspell-inline-checker-text-view.c
@@ -17,14 +17,14 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "gspell-inline-checker-text.h"
+#include "gspell-inline-checker-text-view.h"
 #include "gspell-inline-checker-text-buffer.h"
 
 /* Inline spell checker for GtkTextView. Handles buffer changes. */
 
-typedef struct _GspellInlineCheckerTextPrivate GspellInlineCheckerTextPrivate;
+typedef struct _GspellInlineCheckerTextViewPrivate GspellInlineCheckerTextViewPrivate;
 
-struct _GspellInlineCheckerTextPrivate
+struct _GspellInlineCheckerTextViewPrivate
 {
        GtkTextView *view;
        GspellInlineCheckerTextBuffer *inline_checker;
@@ -36,15 +36,17 @@ enum
        PROP_VIEW,
 };
 
-G_DEFINE_TYPE_WITH_PRIVATE (GspellInlineCheckerText, _gspell_inline_checker_text, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GspellInlineCheckerTextView,
+                           _gspell_inline_checker_text_view,
+                           G_TYPE_OBJECT)
 
 static void
-update_inline_checker (GspellInlineCheckerText *self)
+update_inline_checker (GspellInlineCheckerTextView *self)
 {
-       GspellInlineCheckerTextPrivate *priv;
+       GspellInlineCheckerTextViewPrivate *priv;
        GtkTextBuffer *buffer;
 
-       priv = _gspell_inline_checker_text_get_instance_private (self);
+       priv = _gspell_inline_checker_text_view_get_instance_private (self);
 
        if (priv->view == NULL)
        {
@@ -65,22 +67,22 @@ update_inline_checker (GspellInlineCheckerText *self)
 }
 
 static void
-notify_buffer_cb (GtkTextView             *view,
-                 GParamSpec              *pspec,
-                 GspellInlineCheckerText *self)
+notify_buffer_cb (GtkTextView                 *view,
+                 GParamSpec                  *pspec,
+                 GspellInlineCheckerTextView *self)
 {
        update_inline_checker (self);
 }
 
 static void
-set_view (GspellInlineCheckerText *self,
-         GtkTextView             *view)
+set_view (GspellInlineCheckerTextView *self,
+         GtkTextView                 *view)
 {
-       GspellInlineCheckerTextPrivate *priv;
+       GspellInlineCheckerTextViewPrivate *priv;
 
        g_return_if_fail (GTK_IS_TEXT_VIEW (view));
 
-       priv = _gspell_inline_checker_text_get_instance_private (self);
+       priv = _gspell_inline_checker_text_view_get_instance_private (self);
 
        g_assert (priv->view == NULL);
        g_assert (priv->inline_checker == NULL);
@@ -97,14 +99,16 @@ set_view (GspellInlineCheckerText *self,
 }
 
 static void
-_gspell_inline_checker_text_get_property (GObject    *object,
-                                         guint       prop_id,
-                                         GValue     *value,
-                                         GParamSpec *pspec)
+_gspell_inline_checker_text_view_get_property (GObject    *object,
+                                              guint       prop_id,
+                                              GValue     *value,
+                                              GParamSpec *pspec)
 {
-       GspellInlineCheckerTextPrivate *priv;
+       GspellInlineCheckerTextView *self;
+       GspellInlineCheckerTextViewPrivate *priv;
 
-       priv = _gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
+       self = GSPELL_INLINE_CHECKER_TEXT_VIEW (object);
+       priv = _gspell_inline_checker_text_view_get_instance_private (self);
 
        switch (prop_id)
        {
@@ -119,12 +123,12 @@ _gspell_inline_checker_text_get_property (GObject    *object,
 }
 
 static void
-_gspell_inline_checker_text_set_property (GObject      *object,
-                                         guint         prop_id,
-                                         const GValue *value,
-                                         GParamSpec   *pspec)
+_gspell_inline_checker_text_view_set_property (GObject      *object,
+                                              guint         prop_id,
+                                              const GValue *value,
+                                              GParamSpec   *pspec)
 {
-       GspellInlineCheckerText *self = GSPELL_INLINE_CHECKER_TEXT (object);
+       GspellInlineCheckerTextView *self = GSPELL_INLINE_CHECKER_TEXT_VIEW (object);
 
        switch (prop_id)
        {
@@ -139,11 +143,13 @@ _gspell_inline_checker_text_set_property (GObject      *object,
 }
 
 static void
-_gspell_inline_checker_text_dispose (GObject *object)
+_gspell_inline_checker_text_view_dispose (GObject *object)
 {
-       GspellInlineCheckerTextPrivate *priv;
+       GspellInlineCheckerTextView *self;
+       GspellInlineCheckerTextViewPrivate *priv;
 
-       priv = _gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
+       self = GSPELL_INLINE_CHECKER_TEXT_VIEW (object);
+       priv = _gspell_inline_checker_text_view_get_instance_private (self);
 
        if (priv->view != NULL && priv->inline_checker != NULL)
        {
@@ -154,17 +160,17 @@ _gspell_inline_checker_text_dispose (GObject *object)
        priv->view = NULL;
        g_clear_object (&priv->inline_checker);
 
-       G_OBJECT_CLASS (_gspell_inline_checker_text_parent_class)->dispose (object);
+       G_OBJECT_CLASS (_gspell_inline_checker_text_view_parent_class)->dispose (object);
 }
 
 static void
-_gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
+_gspell_inline_checker_text_view_class_init (GspellInlineCheckerTextViewClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-       object_class->get_property = _gspell_inline_checker_text_get_property;
-       object_class->set_property = _gspell_inline_checker_text_set_property;
-       object_class->dispose = _gspell_inline_checker_text_dispose;
+       object_class->get_property = _gspell_inline_checker_text_view_get_property;
+       object_class->set_property = _gspell_inline_checker_text_view_set_property;
+       object_class->dispose = _gspell_inline_checker_text_view_dispose;
 
        g_object_class_install_property (object_class,
                                         PROP_VIEW,
@@ -178,16 +184,16 @@ _gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
 }
 
 static void
-_gspell_inline_checker_text_init (GspellInlineCheckerText *self)
+_gspell_inline_checker_text_view_init (GspellInlineCheckerTextView *self)
 {
 }
 
-GspellInlineCheckerText *
-_gspell_inline_checker_text_new (GtkTextView *view)
+GspellInlineCheckerTextView *
+_gspell_inline_checker_text_view_new (GtkTextView *view)
 {
        g_return_val_if_fail (GTK_IS_TEXT_VIEW (view), NULL);
 
-       return g_object_new (GSPELL_TYPE_INLINE_CHECKER_TEXT,
+       return g_object_new (GSPELL_TYPE_INLINE_CHECKER_TEXT_VIEW,
                             "view", view,
                             NULL);
 }
diff --git a/gspell/gspell-inline-checker-text.h b/gspell/gspell-inline-checker-text-view.h
similarity index 65%
rename from gspell/gspell-inline-checker-text.h
rename to gspell/gspell-inline-checker-text-view.h
index b069c76..a564937 100644
--- a/gspell/gspell-inline-checker-text.h
+++ b/gspell/gspell-inline-checker-text-view.h
@@ -17,30 +17,30 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#ifndef __GSPELL_INLINE_CHECKER_TEXT_H__
-#define __GSPELL_INLINE_CHECKER_TEXT_H__
+#ifndef __GSPELL_INLINE_CHECKER_TEXT_VIEW_H__
+#define __GSPELL_INLINE_CHECKER_TEXT_VIEW_H__
 
 #include <gtk/gtk.h>
 
 G_BEGIN_DECLS
 
-#define GSPELL_TYPE_INLINE_CHECKER_TEXT (_gspell_inline_checker_text_get_type ())
+#define GSPELL_TYPE_INLINE_CHECKER_TEXT_VIEW (_gspell_inline_checker_text_view_get_type ())
 
 G_GNUC_INTERNAL
-G_DECLARE_DERIVABLE_TYPE (GspellInlineCheckerText, _gspell_inline_checker_text,
-                         GSPELL, INLINE_CHECKER_TEXT,
+G_DECLARE_DERIVABLE_TYPE (GspellInlineCheckerTextView, _gspell_inline_checker_text_view,
+                         GSPELL, INLINE_CHECKER_TEXT_VIEW,
                          GObject)
 
-struct _GspellInlineCheckerTextClass
+struct _GspellInlineCheckerTextViewClass
 {
        GObjectClass parent_class;
 };
 
 G_GNUC_INTERNAL
-GspellInlineCheckerText *      _gspell_inline_checker_text_new         (GtkTextView *view);
+GspellInlineCheckerTextView *  _gspell_inline_checker_text_view_new            (GtkTextView *view);
 
 G_END_DECLS
 
-#endif /* __GSPELL_INLINE_CHECKER_TEXT_H__ */
+#endif /* __GSPELL_INLINE_CHECKER_TEXT_VIEW_H__ */
 
 /* ex:set ts=8 noet: */
diff --git a/gspell/gspell-text-view.c b/gspell/gspell-text-view.c
index faa9bd2..69e3696 100644
--- a/gspell/gspell-text-view.c
+++ b/gspell/gspell-text-view.c
@@ -18,7 +18,7 @@
  */
 
 #include "gspell-text-view.h"
-#include "gspell-inline-checker-text.h"
+#include "gspell-inline-checker-text-view.h"
 
 /**
  * SECTION:text-view
@@ -66,7 +66,7 @@ gspell_text_view_set_inline_checking (GtkTextView *view,
 
                g_object_set_data_full (G_OBJECT (view),
                                        INLINE_CHECKER_KEY,
-                                       _gspell_inline_checker_text_new (view),
+                                       _gspell_inline_checker_text_view_new (view),
                                        g_object_unref);
        }
        else
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 86b44c5..4bc1e0a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -2,8 +2,8 @@
 gspell/gspell-buffer-notifier.c
 gspell/gspell-checker.c
 gspell/gspell-checker-dialog.c
-gspell/gspell-inline-checker-text.c
 gspell/gspell-inline-checker-text-buffer.c
+gspell/gspell-inline-checker-text-view.c
 gspell/gspell-language.c
 gspell/gspell-language-chooser.c
 gspell/gspell-language-chooser-button.c


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]